Skip to content

PHP 7.4 + PHPUnit 8.2 support #32844

Closed
Closed
@nicolas-grekas

Description

@nicolas-grekas

In #32842, I implemented a new ForwardCompatTestTrait in the phpunit-bridge to allow tests to run on the new php74-snapshot job, see #32289 This trait adds the void return type that phpunit 8 requires, while preserving compatibility with branch 3.4, which supports PHP 5.5. As a reminder, we target to make 3.4 run on PHP 7.4.

As of #32882, the phpunit-bridge is able to run phpunit 4.8 to 8 and PHP 5.5 to 7.4. It does so by polyfilling some missing methods and by patching the return type of setUp*/tearDown* methods when needed.

Now, there are failures we need to overcome on PHP 7.4 + phpunit 8, as reported here:
https://travis-ci.org/symfony/symfony/jobs/567908746

We need to implement polyfill methods in ForwardCompatTestTrait to allow fixing the deprecation warnings that phpunit 8 displays.

With #32887 in place, the process would be:

  1. open a PR against branch 4.4 to make the phpunit-bridge polyfill a missing feature when needed
  2. open a PR against branch 3.4 with the fix applied, and with the SYMFONY_PHPUNIT_BRIDGE_PR set to the number of the previous PR in .travis.yaml
  3. we'll merge 1. once things are validated, and you'll have to revert the change on .travis.yaml before we merge 2.

Here is the list of things that phpunit 8 reports and should be fixed:

And fix PHP 7.4 deprecations:

Then:

I'm opening this issue to ask for help to the community, this is a lot of work that can be split efficiently I believe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueIdeal for your first contribution! (some Symfony experience may be required)Help wantedIssues and PRs which are looking for volunteers to complete them.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions