File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 9090 # Install PHP compatibility standards and required packages
9191 composer require --dev phpcompatibility/php-compatibility squizlabs/php_codesniffer wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer --no-interaction || true
9292
93- # Set up PHPCompatibility standards properly
94- vendor/bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility,vendor/wp-coding-standards/wpcs
93+ # Set up PHPCompatibility standards properly with absolute paths
94+ ABSOLUTE_PHPCOMP_PATH=$(composer config vendor-dir)/phpcompatibility/php-compatibility
95+ ABSOLUTE_WPCS_PATH=$(composer config vendor-dir)/wp-coding-standards/wpcs
96+ vendor/bin/phpcs --config-set installed_paths $ABSOLUTE_PHPCOMP_PATH,$ABSOLUTE_WPCS_PATH
9597
9698 # Verify configured standards
9799 echo "Available coding standards:"
@@ -112,6 +114,7 @@ jobs:
112114 echo '<?xml version="1.0"?>' > phpcs-compat.xml
113115 echo '<ruleset name="PHP Compatibility Check">' >> phpcs-compat.xml
114116 echo ' <description>Check PHP compatibility for WordPress plugin</description>' >> phpcs-compat.xml
117+ echo ' <config name="installed_paths" value="'$(composer config vendor-dir)'/phpcompatibility/php-compatibility"/>' >> phpcs-compat.xml
115118 echo ' <rule ref="PHPCompatibility"/>' >> phpcs-compat.xml
116119 echo ' <config name="testVersion" value="7.4-8.4"/>' >> phpcs-compat.xml
117120 echo ' <arg name="extensions" value="php"/>' >> phpcs-compat.xml
You can’t perform that action at this time.
0 commit comments