Skip to content

deps: update phpunit/phpunit requirement from ^11.5 to ^12.5 - #281

Merged
dermatz merged 6 commits into
mainfrom
dependabot/composer/phpunit/phpunit-tw-12.5
Nov 12, 2026
Merged

dermatz merged 6 commits into
mainfrom
dependabot/composer/phpunit/phpunit-tw-12.5

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 10, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on phpunit/phpunit to permit the latest version.

Release notes

Sourced from phpunit/phpunit's releases.

PHPUnit 12.5.43

Changed

  • Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
  • Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)

Fixed

  • When method() is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails with Method name is not configured
  • When a hook method of a test, for instance setUp(), marks the test as incomplete, the hook method is reported as failed
  • When an "after test" method, for instance tearDown(), marks a successful test as incomplete or skips it, the test is reported as failed
  • When a before-first-test method, for instance setUpBeforeClass(), calls markTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is when markTestSkipped() is called
  • When an after-last-test method, for instance tearDownAfterClass(), calls markTestIncomplete() or markTestSkipped() after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolation
  • A failed PHP assertion, made using assert(), in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test method
  • When an assertion fails in an "after test" method, for instance tearDown(), of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once and onNotSuccessfulTest() is called with the failure from the "after test" method instead of the test's own
  • When a test fails because of an exception of a registered failure type, an error or a failure in an "after test" method, for instance tearDown(), is reported in addition to the test's failure, so the test is counted more than once
  • A test that fails because of an exception of a registered failure type is considered risky when it does not perform assertions or, when requireCoverageMetadata="true" is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failed
  • The TestDox output does not show the failure of a before-first-test method or an after-last-test method, for instance an assertion failure in setUpBeforeClass()
  • Control characters and ANSI escape sequences in user-supplied strings are not made visible in the output of --debug and in the logfiles written by --log-events-text and --log-events-verbose-text
  • Groups configured for a test directory or test file using the groups attribute of <directory> or <file> in the XML configuration file are not assigned to PHPT tests, so --group and --exclude-group do not select them and --list-groups and --list-tests-xml report them as being in the default group or not at all

Removed

  • The library PHAR (phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8

Learn how to install or update PHPUnit 12.5 in the documentation.

Keep up to date with PHPUnit:

Changelog

Sourced from phpunit/phpunit's changelog.

[12.5.43] - 2026-11-02

Changed

  • Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
  • Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)

Fixed

  • When method() is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails with Method name is not configured
  • When a hook method of a test, for instance setUp(), marks the test as incomplete, the hook method is reported as failed
  • When an "after test" method, for instance tearDown(), marks a successful test as incomplete or skips it, the test is reported as failed
  • When a before-first-test method, for instance setUpBeforeClass(), calls markTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is when markTestSkipped() is called
  • When an after-last-test method, for instance tearDownAfterClass(), calls markTestIncomplete() or markTestSkipped() after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolation
  • A failed PHP assertion, made using assert(), in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test method
  • When an assertion fails in an "after test" method, for instance tearDown(), of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once and onNotSuccessfulTest() is called with the failure from the "after test" method instead of the test's own
  • When a test fails because of an exception of a registered failure type, an error or a failure in an "after test" method, for instance tearDown(), is reported in addition to the test's failure, so the test is counted more than once
  • A test that fails because of an exception of a registered failure type is considered risky when it does not perform assertions or, when requireCoverageMetadata="true" is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failed
  • The TestDox output does not show the failure of a before-first-test method or an after-last-test method, for instance an assertion failure in setUpBeforeClass()
  • Control characters and ANSI escape sequences in user-supplied strings are not made visible in the output of --debug and in the logfiles written by --log-events-text and --log-events-verbose-text
  • Groups configured for a test directory or test file using the groups attribute of <directory> or <file> in the XML configuration file are not assigned to PHPT tests, so --group and --exclude-group do not select them and --list-groups and --list-tests-xml report them as being in the default group or not at all

Removed

  • The library PHAR (phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8

[12.5.42] - 2026-10-27

Fixed

  • The static analysis cache directory that is automatically created in the operating system's path used for temporary files when no cache directory is configured is not used when the POSIX extension is not loaded

[12.5.41] - 2026-10-27

Fixed

  • The TeamCity logger writes testSuiteFinished twice for a test class when one of its before-first-test methods errors or fails
  • The TestDox output shows a less important outcome of a test that has more than one outcome, for instance the failure in tearDown() of a test that errored
  • When no static analysis cache directory is configured, the cache directory that is automatically created in the operating system's path used for temporary files is also used when it was created by another user or can be written to by other users

[12.5.40] - 2026-10-16

Fixed

  • The dependencies of a test that are listed after a dependency on a test that does not return a value, or after a dependency on a larger test, were not checked, so the test was run instead of being skipped when one of these dependencies had not passed
  • Tests could not be run in process isolation when the namespace of the test class begins with a name that the code of the child process imports, for instance CodeCoverage or Facade
  • A test that is run in process isolation aborts the test run when its data set or a value returned by a test it depends on cannot be serialized, for instance because it is a closure
  • When a before-first-test method or an after-last-test method errors or fails, the remaining methods of the same kind are still called, and each of them that does not error or fail itself is reported with the exception of the earlier method
  • When a hook method of a test, for instance a #[Before] method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errors
  • An error or failure in a before-first-test method or an after-last-test method that is called again in the child process of a test that is run in process isolation is reported twice, once for the test class and once for the test

... (truncated)

Commits
  • 1d5a4a3 Prepare release
  • 0e18ec2 Update cbrgm/mastodon-github-action action to v2.2.6
  • 092e177 Make control characters in user-supplied strings visible in the output of --d...
  • d596570 Merge branch '11.5' into 12.5
  • 89a07f0 Merge branch '10.5' into 11.5
  • 980dbeb Merge branch '9.6' into 10.5
  • 8d2bf9e Merge branch '8.5' into 9.6
  • 3e1dbd3 Copy the LICENSE files of sebastian/object-enumerator and sebastian/object-re...
  • 5bbaab1 Recognize stack frames of code in the PHAR by the path that PHP reports for t...
  • 0a6de0c Merge branch '11.5' into 12.5
  • Additional commits viewable in compare view

Most Recent Ignore Conditions Applied to This Pull Request
Dependency Name Ignore Conditions
phpunit/phpunit [>= 13.a, < 14]

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) to permit the latest version.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/12.5.43/ChangeLog-12.5.md)
- [Commits](sebastianbergmann/phpunit@11.5.0...12.5.43)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 12.5.43
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@Morgy93 Morgy93 self-assigned this Nov 11, 2026
@Morgy93
Morgy93 requested a balanced review from Copilot November 11, 2026 19:31
Morgy93
Morgy93 previously approved these changes Nov 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PHPUnit upgrade leaves mock-without-expectation notices in ModuleScannerTest, adding noise to test results.

1 open issue
What changed in this PR

Updates MageForge’s development test framework to PHPUnit 12.5 and adapts two parameterised tests to its attribute-based metadata.

Changes:

  • Raises the phpunit/phpunit requirement from ^11.5 to ^12.5.
  • Replaces two @dataProvider annotations with #[DataProvider] attributes.
File Description
tests/​Unit/​Service/​TemplateOverride/​TemplateCopierTest.php Migrates data-provider metadata for PHPUnit 12 compatibility.
composer.json Updates the PHPUnit development dependency constraint.

Review effort: Balanced

Comment thread composer.json Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PHPUnit constraint permits 12.5.0, where the new tests fail because getStubBuilder() is unavailable.

2 open issues

Review effort: Balanced

Comment thread composer.json Resolved
…hpunit/phpunit-tw-12.5

# Conflicts:
#	tests/Unit/Console/Command/Theme/BuildCommandTest.php
#	tests/Unit/Console/Command/Theme/WatchCommandTest.php
#	tests/Unit/Service/TemplateOverride/TemplatePathParserTest.php

Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
@dermatz
dermatz merged commit 68fa34c into main Nov 12, 2026
5 checks passed
@dermatz
dermatz deleted the dependabot/composer/phpunit/phpunit-tw-12.5 branch November 12, 2026 21:43
@github-actions github-actions Bot mentioned this pull request Nov 12, 2026
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.

4 participants