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

Pact-PHP 9.x.x - Support PHPUnit 10 #338

Closed
williamtrevisan opened this issue Sep 15, 2023 · 5 comments
Closed

Pact-PHP 9.x.x - Support PHPUnit 10 #338

williamtrevisan opened this issue Sep 15, 2023 · 5 comments
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@williamtrevisan
Copy link

williamtrevisan commented Sep 15, 2023

Hello, there

Is the package update to support PHPUnit v10 in the plans?

@YOU54F
Copy link
Member

YOU54F commented Sep 18, 2023

It would be useful I am sure, but we don't have planned work to do so (we don't have a large pool of contributors for pact-php), I just help out on the side to ensure contributors PR's are being merged.

Can you provide details, along with source references for the update to PHPUnit v10

  • any new features
  • any breaking changes

We would welcome anyone to fork the repository and have a look at updating to support!

@antonkomarev
Copy link

@YOU54F PHPUnit 10 removed Listeners concept.

1) Test results may not be as expected because the XML configuration file did not pass validation:

  Line 18:
  - Element 'listeners': This element is not expected.

Now it uses new Events concept. You can read about this changes in official announcement and how to work with new concept in one of community guides.

@YOU54F
Copy link
Member

YOU54F commented May 16, 2024

v10.x release / master branch supports v10/v11 of phpunit10, but its only in require-dev.

"phpunit/phpunit": "^10.1|^11",

See this issue for someone blocked in the v8.x release, due to needing to use phpunit v10, but being blocked in doing so.

#345

If someone wishes to backport this change to v9.x.x, we would welcome contributions, but we would equally suggest you prepare and trial out the v10.x release of pact-php, so leverage the benefits of the new Pact core and rewritten codebase

I believe the only place it is used is here

https://github.com/pact-foundation/pact-php/blob/release/9.x/src/PhpPact/Consumer/Listener/PactTestListener.php

@YOU54F YOU54F changed the title Support PHPUnit 10 Pact-PHP 9.x.x - Support PHPUnit 10 May 16, 2024
@YOU54F YOU54F added the help wanted Indicates that a maintainer wants help on an issue or pull request label May 16, 2024
@YOU54F
Copy link
Member

YOU54F commented May 16, 2024

@YOU54F PHPUnit 10 removed Listeners concept.

1) Test results may not be as expected because the XML configuration file did not pass validation:

  Line 18:
  - Element 'listeners': This element is not expected.

Now it uses new Events concept. You can read about this changes in official announcement and how to work with new concept in one of community guides.

Thanks for the additional context @antonkomarev, hopefully this will be helpful is anyone wants to help out.

I don't believe anyone from the Pact team is likely to pick up this request themselves , due to work mainly taking place on the Pact rust core and rewritten v10.x version now mainlined to master

@YOU54F
Copy link
Member

YOU54F commented Aug 13, 2024

10.x beta supports phpunit 10.

We will accept PR's to backport but as we are unlikely to pick this up, I am going to close this issue off.

Thanks for raising

@YOU54F YOU54F closed this as completed Aug 13, 2024
@github-project-automation github-project-automation bot moved this from New Issue to Closed in Pact Triage (not yet in use) Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
Status: Closed
Development

No branches or pull requests

3 participants