Skip to content

Upgrade to PHPUnit 11 #305

@emteknetnz

Description

@emteknetnz

Acceptance criteria

Notes

  • Used https://github.com/emteknetnz/phpunit11-writer to automatically update tests
  • Also manually did updates to fix some tests
  • dataProviders are now static functions
  • annotations converted to attributes, most notably dataProvider
  • old code coverage annotations were removed rather than converted
  • addMethods() changed to onlyMethods()
  • ->will($this->returnValue(...)) manually changed to ->willReturn(...)
  • ->will($this->returnCallback(...)) manually changed to ->willReturnCallback(...)
  • ->withConsecutive(...) manually changed to a willReturnCallback(...) solution
  • abstract tests are no longer allowed (presumably only if in /tests/ dir, because SapphireTest + FunctionalTest are OK)
  • keys in dataProvider data must now match param names
  • expectNotice() / expectWarning() / expectStrict() / expectDeprecation() have all been removed

CMS 5 PRs

Recipe sink CI CMS 6

CMS 6 PRs (ensure CMS 5 PRs are merged, merged-up and rebased on before merging these)

Follow up PRs

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions