-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBridge] Fix workflow test with deps=low #25458
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
[TwigBridge] Fix workflow test with deps=low #25458
Conversation
Should we plan to remove all the new |
we do not plan to remove but to update when we will update the Bridge to
use the new features. but yeah I agree if we can update now let’s do it :)
|
Keeping these legacy tests do not make sense to me either. |
Oh, maybe we should add a condition like you said and instead of using the
annotation use the method from phpunit ?
|
IMO there is no deprecation to assert here. |
df5c849
to
323168e
Compare
We can remove the deprecation tag ;) |
@@ -57,25 +38,10 @@ protected function setUpLegacyAdd() | |||
$workflow = new Workflow($definition); | |||
|
|||
$registry = new Registry(); | |||
$registry->add($workflow, new InstanceOfSupportStrategy(\stdClass::class)); | |||
|
|||
$registry->{method_exists($registry, $_ = 'addWorkflow') ? $_ : 'add'}($workflow, new InstanceOfSupportStrategy(\stdClass::class)); |
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.
$addWorkflow = method_exists($registry, 'addWorkflow') ? 'addWorkflow' : 'add';
$registry->$addWorkflow($workflow, new InstanceOfSupportStrategy(\stdClass::class));
1cd637b
to
1586984
Compare
$addWorkflow = method_exists($registry, 'addWorkflow') ? 'addWorkflow' : 'add'; | ||
$supportStrategy = class_exists('Symfony\Component\Workflow\SupportStrategy\InstanceOfSupportStrategy') | ||
? new \Symfony\Component\Workflow\SupportStrategy\InstanceOfSupportStrategy(\stdClass::class) | ||
: new \Symfony\Component\Workflow\SupportStrategy\ClassInstanceSupportStrategy(\stdClass::class); |
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.
please keep using use statements :)
1586984
to
e5c6b92
Compare
🍾 it's green ! |
Thank you @Simperfit. |
This PR was merged into the 4.1-dev branch. Discussion ---------- [TwigBridge] Fix workflow test with deps=low | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | none In the original PR the tests were not failling but we should not use the new feature with deps=low until it fetch the branch with the new feature. So this fix the test for the WorkflowExtension in TwigBridge. Commits ------- e5c6b92 [TwigBridge] Fix workflow test with deps=low
In the original PR the tests were not failling but we should not use the new feature with deps=low until it fetch the branch with the new feature. So this fix the test for the WorkflowExtension in TwigBridge.