Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds support to phpunit 9.3 and php 8.0 #128

Merged
merged 1 commit into from Aug 8, 2020
Merged

feat: adds support to phpunit 9.3 and php 8.0 #128

merged 1 commit into from Aug 8, 2020

Conversation

GrahamCampbell
Copy link
Collaborator

@GrahamCampbell GrahamCampbell commented Jul 15, 2020

Q A
Bug fix? yes
New feature? yes
Fixed tickets #127

This PR:

  • Drops support for PHPUnit less than 9.3
  • Adds support for PHP 8.0

Note that PHP 8.0.0-beta1 will be released on Aug 06 2020 and PHPUnit 9.3.0 on Aug 07 2020. I think this PR should be released simultaneously with PHPUnit 9.3.

@GrahamCampbell GrahamCampbell changed the title Php8 Support PHPUnit 9.3 and PHP 8.0 Jul 15, 2020
@nunomaduro nunomaduro changed the title Support PHPUnit 9.3 and PHP 8.0 feat: adds support to phpunit 9.3 and php 8.0 Jul 15, 2020
Copy link
Member

@nunomaduro nunomaduro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrahamCampbell already have bootstrapped this pull requests. Here are some notes if someone wants to keep working in this pull request.

composer.json Outdated Show resolved Hide resolved
src/Actions/ValidatesConfiguration.php Outdated Show resolved Hide resolved
@nunomaduro
Copy link
Member

@GrahamCampbell Thank you for this! Will check this tomorrow. 💜

@GrahamCampbell
Copy link
Collaborator Author

GrahamCampbell commented Jul 15, 2020

Cool. I think I can work through the core of the issues in the next 30 minutes or so. I think dropping PHPUnit less than 9.3 is gonna be the right approach. They also changed the signature of this method:

image

The current pest code calls passes an array of strings, and phpunit doesn't check the type, which causes issues down the line. That took some head scratching. 😆

Refs: sebastianbergmann/phpunit@c0cf039#diff-168e01c6fa41b415b301f2d245bf8ccb.

@GrahamCampbell
Copy link
Collaborator Author

GrahamCampbell commented Jul 15, 2020

At least Windows is passing so far. I think it possibly has an older build of PHP 8 than the linux runners (and that I have on my machine), since I think PHP 8 has changed the error format for when there's a call to an undefined method. ;)

EDIT: They were only passing because they had an old version of PHP 8.0. :trollface:

@GrahamCampbell
Copy link
Collaborator Author

I think the Windows image is running PHP 8.0.0-alpha2. We will need to wait until alpha3 to see the tests pass on Windows. They pass on Linux now though, however. I will re-trigger a build on 24 Jul 2020, at which point we should have 100% passing tests.

@GrahamCampbell
Copy link
Collaborator Author

@nunomaduro This is ready for a first review now. :)

Copy link
Member

@nunomaduro nunomaduro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's perfect. Let's wait for Aug 07 2020 to merge and tag this. 👏

@@ -87,4 +87,13 @@ public function call(object $target)
throw $throwable;
}
}

private static function getUndefinedMethodMessage(object $target, string $methodName): string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self note: add tests about this.

@@ -167,5 +159,13 @@
WARN Tests\Visual\Success
- visual snapshot of test suite on success

PASS Tests\Features\Depends
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self note: understand why this snapshot got different.

@GrahamCampbell GrahamCampbell marked this pull request as ready for review August 7, 2020 10:53
composer.json Show resolved Hide resolved
@vincenzoraco
Copy link

Hi guys, this is just to remind you about this PR on a new tag unless you are already working on it. Thank you for your work!

@GrahamCampbell
Copy link
Collaborator Author

We're aware of this PR. It will be released, probably at the start of September.

Copy link
Member

@nunomaduro nunomaduro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds good to me.

@nunomaduro
Copy link
Member

Going to merge this on master, but there is a few things left before tagging the v0.3 version.

@nunomaduro nunomaduro merged commit d854329 into pestphp:master Aug 8, 2020
@nunomaduro
Copy link
Member

Of course, thanks @GrahamCampbell for your work on this. 👍

@GrahamCampbell GrahamCampbell deleted the php8 branch August 8, 2020 22:26
@GrahamCampbell
Copy link
Collaborator Author

🥳

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.

None yet

4 participants