[ 
https://issues.apache.org/jira/browse/THRIFT-5962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Volodymyr Panivko updated THRIFT-5962:
--------------------------------------
    Description: 
With THRIFT-5956 raising the floor to PHP 8.1 and the test suite
migrated to PHP 8 attributes, we can upgrade PHPUnit:

  * PHPUnit 10 requires PHP 8.1 — works for our floor.
  * PHPUnit 11 requires PHP 8.2.

This ticket:

  * Bumps phpunit/phpunit constraint in composer.json.
  * Bumps lib/php/phpunit.xml schema URL to match.
  * Removes deprecated phpunit.xml options
    (convertErrorsToExceptions, convertNoticesToExceptions,
    convertWarningsToExceptions) which are removed in 10+.
  * Updates php-mock/php-mock-phpunit constraint to a version that
    supports the chosen PHPUnit major (likely ^3.x for PHPUnit 10).
  * Fixes any test code that breaks under the new PHPUnit (assertion
    aliases removed, data provider signature changes, etc.).

Decision to make in PR:
  * Pin to PHPUnit 10 (broader, supports PHP 8.1 floor) or 11 (newer,
    requires also bumping floor to 8.2).

  was:
The PHP test suite at lib/php/test/ (59 Unit + 9 Integration files)
uses annotation-style PHPUnit 9.5: @dataProvider, @test,
@expectedException, @group, etc. PHPUnit 10 dropped annotation
support; tests must use PHP 8 attributes (#[DataProvider], #[Test],
#[Group]) before we can upgrade.

This ticket converts every test file in lib/php/test/\{Unit,Integration}
to attribute syntax:

  * @dataProvider Foo::bar  ->  #[DataProvider('bar')] (or
    #[DataProviderExternal(Foo::class, 'bar')])
  * @test  ->  #[Test]
  * @group foo  ->  #[Group('foo')]
  * @covers \Foo  ->  #[CoversClass(Foo::class)]
  * @before / @after  ->  #[Before] / #[After]

Pure mechanical conversion; no behaviour change.


> Upgrade PHPUnit to 10 / 11
> --------------------------
>
>                 Key: THRIFT-5962
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5962
>             Project: Thrift
>          Issue Type: New Feature
>          Components: PHP - Library
>    Affects Versions: 0.24.0
>            Reporter: Volodymyr Panivko
>            Assignee: Volodymyr Panivko
>            Priority: Major
>
> With THRIFT-5956 raising the floor to PHP 8.1 and the test suite
> migrated to PHP 8 attributes, we can upgrade PHPUnit:
>   * PHPUnit 10 requires PHP 8.1 — works for our floor.
>   * PHPUnit 11 requires PHP 8.2.
> This ticket:
>   * Bumps phpunit/phpunit constraint in composer.json.
>   * Bumps lib/php/phpunit.xml schema URL to match.
>   * Removes deprecated phpunit.xml options
>     (convertErrorsToExceptions, convertNoticesToExceptions,
>     convertWarningsToExceptions) which are removed in 10+.
>   * Updates php-mock/php-mock-phpunit constraint to a version that
>     supports the chosen PHPUnit major (likely ^3.x for PHPUnit 10).
>   * Fixes any test code that breaks under the new PHPUnit (assertion
>     aliases removed, data provider signature changes, etc.).
> Decision to make in PR:
>   * Pin to PHPUnit 10 (broader, supports PHP 8.1 floor) or 11 (newer,
>     requires also bumping floor to 8.2).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to