Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 25, 2026

The @less-than-php-7.2 tag was added as a workaround when scaffolded PHPUnit tests were incompatible with PHP 7.2+. With minimum PHP requirement now at 7.2, the tag excludes tests unnecessarily.

Changes

  • Removed @less-than-php-7.2 from scaffold-theme-tests.feature scenario
  • Test now runs on PHP 7.0+ without upper bound restriction
- @require-php-7.0 @less-than-php-7.2 @require-mysql
+ @require-php-7.0 @require-mysql
  Scenario: Scaffold theme tests

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-command/scaffold-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core install --url=REDACTED --title=WP CLI Site --admin_user=admin [email protected] --admin_password=password1 --skip-email (dns block)
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-command/scaffold-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core install --url=REDACTED --title=WP CLI Site --admin_user=admin [email protected] --admin_password=password1 --skip-email k/scaffold-comma--snippets-for=WP_CLI\Tests\Context\FeatureContext /usr/bin/php and/�� scaffold post-type h --textdomain=zommysql taxonomy k/scaffold-command/scaffold-command/vendor/bin/sscaffold sh (dns block)
  • underscores.me
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-command/scaffold-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php scaffold _s starter-theme /* '/tmp/wp-cli---plugin_author=Hello World Author install /home/REDACTED/.local/bin/sh --force movies and/vendor/wp-clscaffold sh i/wp�� and/vendor/wp-cl--activate theme-tests h 9642b02bfdc2a3bbsh stty size 2>&1 and/vendor/bin/sscaffold sh (dns block)
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-command/scaffold-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php scaffold _s starter-theme --sassify sh p/bin/sh 99//wp-content/msh block cal/bin/sh sh i/wp�� scaffold child-theme tnet/tools/sh mbrella bieland ssee ps://wp-cli.org (dns block)
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-command/scaffold-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php scaffold _s starter-theme --woocommerce -core-install-cache-6.9/install_34f3da9689642b02bfdc2a3bb7dc5325/wp-content nd/scaffold-command/vendor/bin/sh orld --dir=non-esh path h sh i/wp�� scaffold theme-tests k/scaffold-command/scaffold-command/vendor/bin/wp imple-life sh h dirname (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Scaffolded PHPUnit is not compatible with PHP 7.2+</issue_title>
<issue_description>The scaffolded PHPUnit tests are not compatible with PHP 7.2+. This currently breaks our tests: https://travis-ci.org/wp-cli/scaffold-command/jobs/368878591#L616

There's no PHPUnit that officially supports PHP 7.2 any anything below PHP7.0 at the same time: https://phpunit.de/

Related: https://www.drupal.org/project/drupal/issues/2927806</issue_description>

<agent_instructions>Revert #145 to remove the @less-than-php-7.2 tags and see whether it works</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@ernilambar Now at 2024, we already have made minimum PHP requirement to 7.2. This issue has become now a non-issue I guess. Ref - https://core.trac.wordpress.org/ticket/58719

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Revert PHPUnit compatibility changes for PHP 7.2 support Remove obsolete @less-than-php-7.2 test tag Jan 25, 2026
Copilot AI requested a review from swissspidy January 25, 2026 17:12
@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy marked this pull request as ready for review January 25, 2026 17:22
@swissspidy swissspidy requested a review from a team as a code owner January 25, 2026 17:22
@swissspidy swissspidy merged commit c421ce6 into main Jan 25, 2026
44 checks passed
@swissspidy swissspidy deleted the copilot/revert-phpunit-compatibility branch January 25, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scaffolded PHPUnit is not compatible with PHP 7.2+

2 participants