Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#54008 new defect (bug)

Fix Grunt tasks for PHPUnit

Reported by: azaozz's profile azaozz Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.8
Component: Build/Test Tools Keywords: needs-patch
Focuses: Cc:


#53015, [51016] made it impossible to use global installations of PHPUnit. Now Grunt requires to have PHPUnit (and Composer?) installed locally in every directory that needs to be tested.

This causes grunt test and grunt phpunit to fail when PHPUnit and the PHPUnit Polyfills are installed globally, like when using wp-env/Docker image.

Change History (5)

#1 @azaozz
3 years ago

  • Keywords needs-patch added

For example:

  1. Install PHPUnit (if not already installed) and the PHPUnit Polyfills as described here: Setting up to run with the PHPUnit PHAR file without Composer.
  2. Build WordPress: npm run build or grunt.
  3. Run phpunit from the cli. Works as expected.
  4. Run grunt phpunit. Fails with Warning: Error: not found: composer Use --force to continue..

This ticket was mentioned in Slack in #core by chaion07. View the logs.

3 years ago

#3 @hellofromTonya
3 years ago

  • Milestone changed from 5.9 to 6.0

With 5.9 Beta 1 in 2 days and no activity on this ticket, moving it to 6.0.

This ticket was mentioned in Slack in #core by mike. View the logs.

2 years ago

#5 @peterwilsoncc
2 years ago

  • Milestone changed from 6.0 to Future Release

With WP 6.0 RC1 in a few days and no activity on this ticket, I am moving it to future release.

Note: See TracTickets for help on using tickets.