@@ -104,14 +104,10 @@ jobs:
104104
105105 # Run the actual compatibility check
106106 if ! vendor/bin/phpcs --standard=phpcs.xml --extensions=php --ignore=vendor/,node_modules/ .; then
107- echo "Error: The phpcs.xml standard may have issues with PHPCompatibility reference."
108- echo "Trying with direct PHPCompatibility standard..."
109-
110- # Create a backup of the original phpcs.xml
111- cp phpcs.xml phpcs.xml.bak
112-
113- # Create a simple phpcs configuration file that directly references PHPCompatibility
114- cat > phpcs-compat.xml << 'EOF'
107+ echo "Error : The phpcs.xml standard may have issues with PHPCompatibility reference."
108+ echo "Trying with direct PHPCompatibility standard..."
109+ cp phpcs.xml phpcs.xml.bak
110+ cat > phpcs-compat.xml << 'EOF'
115111<?xml version="1.0"?>
116112<ruleset name="PHP Compatibility Check">
117113 <description>Check PHP compatibility for WordPress plugin</description>
@@ -124,11 +120,9 @@ jobs:
124120 <exclude-pattern>/node_modules/*</exclude-pattern>
125121</ruleset>
126122EOF
127-
128- # Try with the temporary configuration and ensure installed_paths is set correctly
129- vendor/bin/phpcs --config-set installed_paths ${ABSOLUTE_PHPCOMP_PATH},${ABSOLUTE_WPCS_PATH}
130- vendor/bin/phpcs --standard=phpcs-compat.xml --extensions=php --ignore=vendor/,node_modules/ .
131- fi
123+ vendor/bin/phpcs --config-set installed_paths ${ABSOLUTE_PHPCOMP_PATH},${ABSOLUTE_WPCS_PATH}
124+ vendor/bin/phpcs --standard=phpcs-compat.xml --extensions=php --ignore=vendor/,node_modules/ .
125+ fi
132126
133127 - name : Fix text argument escaping issues
134128 run : |
0 commit comments