Skip to content

[4.x] resolve PHPUnit Notices#369

Open
heelc29 wants to merge 10 commits into
joomla-framework:4.x-devfrom
heelc29:4.x/phpunit/notices
Open

[4.x] resolve PHPUnit Notices#369
heelc29 wants to merge 10 commits into
joomla-framework:4.x-devfrom
heelc29:4.x/phpunit/notices

Conversation

@heelc29

@heelc29 heelc29 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Pull Request for Issue #

Summary of Changes

  • add RequiresPhpExtension attribute to get better message if php extension is missing

  • use Stub instead of Mock with no configured expectations or call any()

    If you create a mock object but do not configure any expectations on it, PHPUnit will emit a notice.

    The any() matcher, used as $this->expects($this->any()), is deprecated. It will be removed in PHPUnit 14.

  • replace old php unit doc comments @doesNotPerformAssertions to DoesNotPerformAssertions attributes

  • refactor dataprovider dataGetTableColumns

    All data providers are executed before both the call to a before-class method such as setUpBeforeClass() and the first call to a before-test method such as setUp(). Because of this, you cannot access any properties of the actual test case object within a data provider. [...]

    The data sets provided by a data provider method should only contain (arrays of) scalar values, immutable value objects, or test stubs. Services or large object graphs should not be created in a data provider method. [...]

  • fix some php deprecations in test code

Testing Instructions

ci/cd

Documentation Changes Required

no

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.

1 participant