Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[PhpUnitBridge] Enable configuring mock namespaces with attributes#59384
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
run: find ./src/Symfony/Bridge/PhpUnit -name '*.php' | grep -v -e /Tests/ -e ForV7 -e ForV8 -e ForV9 -e ConstraintLogicTrait | parallel -j 4 php -l {} | ||
run: find ./src/Symfony/Bridge/PhpUnit -name '*.php' | grep -v -e /Tests/ -e/Attribute/ -e /Extension/ -e /Metadata/ -eForV7 -e ForV8 -e ForV9 -e ConstraintLogicTrait | parallel -j 4 php -l {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
PhpUnit 10+ is PHP >=8.1, so it should be ok for the extension classes to use PHP >=8 syntax.
@@ -33,7 +40,12 @@ public function notify(Finished $event): void | |||
foreach ($test->metadata() as $metadata) { | |||
if ($metadata instanceof Group && 'time-sensitive' === $metadata->groupName()) { | |||
ClockMock::withClockMock(false); | |||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Minor optimization
src/Symfony/Bridge/PhpUnit/Extension/RegisterClockMockSubscriber.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
3199197
to54c59f7
CompareUh oh!
There was an error while loading.Please reload this page.
54c59f7
to42cc6d2
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM (after composer.json change is reverted)
42cc6d2
to130cc26
CompareThank you@HypeMC. |
4c071c2
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
This PR was merged into the 7.3 branch.Discussion----------[PhpUnitBridge] Mark `AttributeReader` as internal| Q | A| ------------- | ---| Branch? | 7.3| Bug fix? | no| New feature? | no| Deprecations? | no| Issues | -| License | MITFollow-up to#59384Didn't notice this in my original PR, but it'd make sense for the `AttributeReader` class to be marked as internal.Commits-------ba073c2 [PhpUnitBridge] Mark `AttributeReader` as internal
…butes (HypeMC)This PR was merged into the 7.3 branch.Discussion----------[PhpUnitBridge] Fix cleaning up mocked features with attributes| Q | A| ------------- | ---| Branch? | 7.3| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues | -| License | MITFixes usage of the attributes introduced in#59384 to reflect changes made in#60484.Commits-------62da782 [PhpUnitBridge] Fix cleaning up mocked features with attributes
This PR adds the ability to configure clock and DNS mock namespaces through attributes, removing the need to add them to
phpunit.xml
: