Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PHPUnit 10 #2564

Merged
merged 3 commits into from Oct 29, 2023
Merged

Use PHPUnit 10 #2564

merged 3 commits into from Oct 29, 2023

Conversation

franmomu
Copy link
Contributor

@franmomu franmomu commented Oct 29, 2023

Closes #2509

Since we are using PHP 8.1, we don't need PHPUnit 9 anymore, I've installed rector locally and replaced annotations with attributes.

@franmomu franmomu added the Task label Oct 29, 2023
@franmomu franmomu added this to the 2.6.0 milestone Oct 29, 2023
@malarzm
Copy link
Member

malarzm commented Oct 29, 2023

I'm surprised so little had to be done :) One thing that is off though is number of tests executed:

This PR's PHP 8.1, Server 6.0, highest executed 2646 tests
2.6.x's counterpart has 2467 tests

Am i looking correctly that there is a test that got lost somewhere?

@malarzm
Copy link
Member

malarzm commented Oct 29, 2023

Actually there's a chance that PHPUnit's deprecation was counted towards number of tests:

There was 1 PHPUnit test runner deprecation:

1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!

but that be weird decision from PHPUnit's team

Copy link
Member

@malarzm malarzm left a comment

Choose a reason for hiding this comment

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

@franmomu feel free to merge once you decide whether my previous comment makes sense or no :)

@franmomu
Copy link
Contributor Author

I'm surprised so little had to be done :) One thing that is off though is number of tests executed:

This PR's PHP 8.1, Server 6.0, highest executed 2646 tests 2.6.x's counterpart has 2467 tests

Am i looking correctly that there is a test that got lost somewhere?

Good catch! it was my fault in https://github.com/doctrine/mongodb-odm/pull/2564/files#diff-62b86ab419dbc39877816e5c1f489b8fa4110e14bb395c2ba9f7cd961720ef60L13-L17

    /**
     * @testWith ["groups"]
     *           ["groupsSimple"]
     */

was changed to

    #[TestWith(['groups', 'groupsSimple'])]

instead of

    #[TestWith(['groups'])]
    #[TestWith(['groupsSimple'])]

@franmomu franmomu merged commit 0aa0e7b into doctrine:2.6.x Oct 29, 2023
13 checks passed
@franmomu franmomu deleted the phpunit_10 branch October 29, 2023 14:18
alcaeus added a commit that referenced this pull request Nov 24, 2023
* 2.6.x: (30 commits)
  Remove API link from README
  Aggregation uses CursorInterface instead of Cursor
  Deprecate legacy commit options (#2578)
  Improve handling of circular type reference errors in Phpstan
  Add missing phpdoc
  Fix return type for overridden methods
  Fix phpstan errors
  Add sort operator to $search stage
  Bump actions/upload-artifact from 2 to 3 (#2572)
  Implement ObjectManager::isUninitializedObject (#2569)
  Use PHPUnit 10 (#2564)
  Test Symfony 7
  Support Symfony 7 by adding return types conditionally
  PHPCS is now happy with new syntax
  Stop suppressing UndefinedAttributeClass
  Drop support for old symfony components
  ReferenceMany: insert an empty array
  feat: Symfony 7 support
  Remove unusable Match classes
  Require PHP 8.1
  ...
alcaeus added a commit that referenced this pull request Nov 24, 2023
* 2.6.x: (32 commits)
  Deprecate DocumentRepository::clear (#2584)
  Support minDistance and maxDistance options for $near and $nearSphere operators (#2583)
  Remove API link from README
  Aggregation uses CursorInterface instead of Cursor
  Deprecate legacy commit options (#2578)
  Improve handling of circular type reference errors in Phpstan
  Add missing phpdoc
  Fix return type for overridden methods
  Fix phpstan errors
  Add sort operator to $search stage
  Bump actions/upload-artifact from 2 to 3 (#2572)
  Implement ObjectManager::isUninitializedObject (#2569)
  Use PHPUnit 10 (#2564)
  Test Symfony 7
  Support Symfony 7 by adding return types conditionally
  PHPCS is now happy with new syntax
  Stop suppressing UndefinedAttributeClass
  Drop support for old symfony components
  ReferenceMany: insert an empty array
  feat: Symfony 7 support
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure PHPUnit 10 compatibility
2 participants