Skip to content

Phpunit 12 and 13 compatibility#23

Merged
Bilge merged 15 commits intoScriptFUSION:masterfrom
ireneperezddc1:phpunit-12-compatibility
Mar 10, 2026
Merged

Phpunit 12 and 13 compatibility#23
Bilge merged 15 commits intoScriptFUSION:masterfrom
ireneperezddc1:phpunit-12-compatibility

Conversation

@ireneperezddc1
Copy link
Contributor

adjusts on actions and composer to upgrade compatibility with PHP 8.5 and PHPUnit 12 and 13

Copy link
Member

@Bilge Bilge left a comment

Choose a reason for hiding this comment

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

Please share what you learned whilst making this PR so we can understand the reasons for each change. I cannot merge this without commentary explaining why the changes were necessary.

composer.json Outdated
"require": {
"php": ">=8.1",
"phpunit/phpunit": "^10.5.28|^11.2.8"
"php": ">=8.3",
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PHP 8.1 is EOL, so I don't think is a good option to have a new release with an obsolete PHP version... As I said in the previous comment, maybe we can have here >=8.2

Copy link
Member

Choose a reason for hiding this comment

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

That may be so, but this PR claims to be about adding PHPUnit 12 and 13 compatibility. Nowhere previously have you mentioned that a secondary goal is to change the project's PHP compatibility alignment, nor do I think such a change is necessary to accomplish the (noble) goal of improving PHPUnit upwards compatibility. Please continue adding the invalid combinations to the exclusion matrix and keep PHP compatibility unchanged at this time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. I put back PHP 8.1 version


50% . ScriptFUSIONTest\Pip\CapabilitiesTest::testDataProvider with data set "foo" (%d ms)
100% . ScriptFUSIONTest\Pip\CapabilitiesTest::testDataProvider with data set #0 (%d ms)
50% . ScriptFUSIONTest\Pip\CapabilitiesTest::testDataProvider%swith data%s (%d ms)
Copy link
Member

Choose a reason for hiding this comment

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

Tests should be as precise as possible. This is very lax, having now completely omitted the data set names.

  1. Why is the first %s needed?
  2. Why were data set names replaced with the second %s?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By using phpunit 10/11 the data set and data is detailed always after the test: "with data set '@name or data set'|'#index of dataset' and then the ('data used'), but from Phpunit 12, the dataset is specified just after the test name: testDataProvider@foo|testDataProvider#0 with data ('data'), so, if I wanted to support both I tried by using EXPECTREGEX, but I can't found a way to have it working

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ab262d3) to head (c52e456).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master       #23   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        70        70           
===========================================
  Files              6         6           
  Lines            157       157           
===========================================
  Hits             157       157           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Bilge Bilge merged commit c0b82cb into ScriptFUSION:master Mar 10, 2026
14 checks passed
@Bilge
Copy link
Member

Bilge commented Mar 10, 2026

@ireneperezddc1 Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants