upskill-event-manager/wordpress-dev/wordpress/wp-content/plugins/astra-pro-sites/phpstan.neon
bengizmo d1509b3d60 feat(dev-env): implement backup-based development workflow
This commit introduces a more reliable and consistent approach to setting up
the development environment using backups:

- Add setup-from-backup.sh script for environment setup from existing backups
- Standardize script naming and organization
- Move obsolete scripts to bin/obsolete directory
- Update documentation with new workflow instructions
- Create migration guide for transitioning to new workflow
- Update Memory Bank with workflow improvements

The new workflow provides:
- More reliable environment setup
- Faster setup process
- Offline development capability
- Consistent development environments across team members

Breaking changes:
- setup-dev.sh is replaced by setup-from-backup.sh
- sync-and-setup.sh is replaced by separate scripts
- verify-with-wpcli.sh is no longer used

Migration path is documented in MIGRATION_GUIDE.md
2025-03-26 11:26:18 -03:00

64 lines
2.7 KiB
Text

# Start command: composer update --classmap-authoritative && vendor/bin/phpstan analyze
includes:
- phpstan-baseline.neon # Baseline to ignore error temporary
# https://github.com/phpstan/phpstan/blob/master/conf/bleedingEdge.neon
# - vendor/phpstan/phpstan/conf/bleedingEdge.neon
# - phar://phpstan.phar/conf/bleedingEdge.neon
- vendor/szepeviktor/phpstan-wordpress/extension.neon
# - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
parameters:
level: 8
inferPrivatePropertyTypeFromConstructor: true
checkGenericClassInNonGenericObjectType: false
stubFiles:
- tests/php/stubs/wordpress-override.php
scanFiles:
- %rootDir%/../../php-stubs/wordpress-stubs/wordpress-stubs.php
- %rootDir%/../../php-stubs/wp-cli-stubs/wp-cli-stubs.php
- %rootDir%/../../php-stubs/wp-cli-stubs/wp-cli-commands-stubs.php
- %rootDir%/../../php-stubs/wp-cli-stubs/wp-cli-i18n-stubs.php
bootstrapFiles:
- tests/php/stubs/elementor-stubs.php
- tests/php/stubs/astra-sites-external-stubs.php
- tests/php/stubs/astra-pro-sites-constants.php
- tests/php/stubs/astra-pro-sites-stubs.php
#- tests/php/stubs/zipai-stubs.php
#- tests/php/stubs/astra-stubs.php
paths:
- astra-sites.php
- astra-pro-sites.php
- class-brainstorm-update-astra-pro-sites.php
- classes
- inc/lib/onboarding
- inc/lib/class-astra-sites-ast-block-templates.php
- inc/lib/class-astra-sites-zip-ai.php
excludePaths:
- node_modules
- wordpress
- vendor
- tests
# autoload_files:
# # Missing constants, function and class stubs
# - %currentWorkingDirectory%/tests/phpstan/bootstrap.php
# # Plugin stubs
# - %currentWorkingDirectory%/tests/phpstan/PLUGIN-stubs.php
# # Procedural code
# - %currentWorkingDirectory%/myplugin-functions.php
# autoload_directories:
# - %currentWorkingDirectory%/inc/
ignoreErrors:
# Uses func_get_args()
# - '#^Function apply_filters invoked with [34567] parameters, 2 required\.$#'
# - '#^Function do_action invoked with [3456] parameters, 1-2 required\.$#'
# - '#^Function current_user_can invoked with 2 parameters, 1 required\.$#'
# - '#^Function add_query_arg invoked with [123] parameters?, 0 required\.$#'
# - '#^Function add_theme_support invoked with [2345] parameters, 1 required\.$#'
# - '#^Function wp_sprintf invoked with [23456] parameters, 1 required\.$#'
# https://core.trac.wordpress.org/ticket/43304
# - '/^Parameter #2 \$deprecated of function load_plugin_textdomain expects string, false given\.$/'
# WP-CLI accepts a class as callable
# - '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/'
# Please consider commenting ignores: issue URL or reason of ignore