WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 3 weeks ago

#54008 new defect (bug)

Fix Grunt tasks for PHPUnit

Reported by: azaozz Owned by:
Milestone: 6.0 Priority: normal
Severity: normal Version: 5.8
Component: Build/Test Tools Keywords: needs-patch
Focuses: Cc:

Description

#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 (3)

#1 @azaozz
3 months 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 weeks ago

#3 @hellofromTonya
3 weeks 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.

Note: See TracTickets for help on using tickets.