Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8381 closed defect (bug) (fixed)

Some composer dependencies fail to install with composer v2.0.0

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 8.0.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Cc:

Description

It only happens for PHP 5.6 jobs.

For now, I will include a quick fix to .travis.yml to rollback to composer v1.10.16.

But I believe we should look into it more deeply during next release.

Attachments (3)

8381.patch (6.7 KB) - added by imath 3 years ago.
8381.2.patch (89.1 KB) - added by imath 3 years ago.
8381.3.patch (2.4 KB) - added by imath 3 years ago.
It should fix Travis fails

Download all attachments as: .zip

Change History (14)

#1 @imath
3 years ago

In 12766:

Build Tools: Make sure to use composer v1.10.16

This is a quick fix to avoid some composer dependencies to fail to install with composer v2.0.0 for PHP 5.6 jobs.

See #8381

#2 @imath
3 years ago

In 12786:

Build Tools: Make sure to use composer v1.10.16

This is a quick fix to avoid some composer dependencies to fail to install with composer v2.0.0 for PHP 5.6 jobs.

See #8381 (6.0 branch)

#3 @imath
3 years ago

  • Milestone changed from Up Next to 8.0.0

This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.


3 years ago

@imath
3 years ago

#5 @imath
3 years ago

  • Keywords has-patch added

In 8381.patch, I'm making sure all dependencies are installed by updating them to their compatible versions with composer v2.0+. I'm also taking this opportunity to add the phpunit/phpunit dependency to be able to run PHP Unit tests with version 8.0 of PHP.

To test PHP 8.0 using @wordpress/env, you then simply need to run:

  1. composer update
  2. export WP_ENV_PHP_VERSION="8.0"
  3. npm run wp-env start
  4. npm run test-php:composer or npm run test-php-multisite:composer

We should then be able to use @wordpress/env to create a first GitHub action to test PHP 8.0 see #8421

@imath
3 years ago

#6 @imath
3 years ago

  • Keywords commit added

I believe 8381.2.patch is our way forward with Composer v2. The main difference with first patch is that it uses the PHPUnit composer version for all tests. It allows us to test PHP 7.x and PHP 8.0. It will also fix #8420

I'm going to commit it asap.

#7 @imath
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 12852:

Update Composer dependencies to match its v2 requirements

  • Updates composer/installers to 1.10
  • Updates phpcompatibility/phpcompatibility-wp to 2.1
  • Updates dealerdirect/phpcodesniffer-composer-installer to 0.7.1
  • Updates wp-phpunit/wp-phpunit to latest
  • Adds a dependency to phpunit/phpunit v7.5+ to be able to run PHP 8.0 unit tests using @wordpress/env.

Props slaFFik

Fixes #8381
Fixes #8420

@imath
3 years ago

It should fix Travis fails

#8 @imath
3 years ago

  • Keywords commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

I'm reopening this ticket as Travis doesn't like too much the changes I've introduced in .2.patch. I believe .3.patch should satisfy Travis & @wordpress/env. I still need to test @wordpress/env to check it doesn't introduce regressions.

Last edited 3 years ago by imath (previous) (diff)

#9 @imath
3 years ago

In 12853:

Use the PHPUnit Composer dependency to run Travis tests

  • Adds version 5.7 to the WordPress matrix
  • Only run tests about PHP 5.6 with WP 4.9

See #8381

#10 @imath
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12854:

Downgrade the PHPUnit Composer deps when running Travis PHP 5.6 tests

This move is needed to still be able to test BuddyPress against PHP 5.6 in Travis. This commit also adds a PHP 7.4 job.

Fixes #8381

#11 @imath
3 years ago

In 12855:

Travis : only test BuddyPress against WP < 5.1 with PHP 5.6

PHPUnit 7 WordPress support was introduced in WordPress 5.1. For older versions of WordPress (4.9 & 5.0), let's use the specific before_script we're using to downgrade Composer PHPUnit dependency to its 5.7.27 version to be able to test PHP 5.6.

See #8381

Note: See TracTickets for help on using tickets.