v-wordpress-plugin-updater/vendor/php-stubs/wp-cli-stubs/generate.sh
nikolai@vontainment.com afe656c55b modified: .gitignore
modified:   composer.lock
	modified:   mu-plugin/v-sys-plugin-updater-mu.php
	modified:   mu-plugin/v-sys-plugin-updater.php
	modified:   mu-plugin/v-sys-theme-updater-mu.php
	modified:   mu-plugin/v-sys-theme-updater.php
	modified:   tests/ApiKeyHelperTest.php
	modified:   update-api/app/Controllers/ApiController.php
	modified:   update-api/app/Controllers/HomeController.php
	deleted:    update-api/app/Controllers/KeyController.php
	modified:   update-api/app/Core/Router.php
	modified:   update-api/app/Models/HostsModel.php
	modified:   update-api/config.php
	modified:   update-api/public/install.php
	deleted:    update-api/storage/test.sqlite
2025-10-20 06:55:25 -04:00

68 lines
1.5 KiB
Bash

#!/usr/bin/env bash
HEADER=$'/**\n * Generated stub declarations for WP-CLI\n * @see https://wp-cli.org/\n * @see https://github.com/php-stubs/wp-cli-stubs\n */'
FILE="wp-cli-stubs.php"
FILE_PKGS="wp-cli-commands-stubs.php"
FILE_I18N="wp-cli-i18n-stubs.php"
FILE_TOOLS="wp-cli-tools-stubs.php"
set -e
test -f "$FILE"
test -f "$FILE_PKGS"
test -f "$FILE_I18N"
test -d "source/vendor/wp-cli"
# Download dependencies
if [ ! -d vendor ]; then
composer update --no-interaction
fi
# wp-cli/wp-cli
"$(dirname "$0")/vendor/bin/generate-stubs" \
--include-inaccessible-class-nodes \
--force \
--finder=finder.php \
--header="$HEADER" \
--functions \
--classes \
--interfaces \
--traits \
--out="$FILE"
# Commands
"$(dirname "$0")/vendor/bin/generate-stubs" \
--include-inaccessible-class-nodes \
--force \
--finder=finder-commands.php \
--header="$HEADER" \
--functions \
--classes \
--interfaces \
--traits \
--out="$FILE_PKGS"
# wp-cli/i18n-command
"$(dirname "$0")/vendor/bin/generate-stubs" \
--include-inaccessible-class-nodes \
--force \
--finder=finder-i18n.php \
--header="$HEADER" \
--functions \
--classes \
--interfaces \
--traits \
--out="$FILE_I18N"
# wp-cli/php-cli-tools
"$(dirname "$0")/vendor/bin/generate-stubs" \
--include-inaccessible-class-nodes \
--force \
--finder=finder-tools.php \
--header="$HEADER" \
--functions \
--classes \
--interfaces \
--traits \
--out="$FILE_TOOLS"