-
-
Notifications
You must be signed in to change notification settings - Fork 454
[Messenger] Wire the transaction middleware factory when component is enabled #817
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
[Messenger] Wire the transaction middleware factory when component is enabled #817
Conversation
composer.json
Outdated
@@ -61,5 +62,6 @@ | |||
"branch-alias": { | |||
"dev-master": "1.9.x-dev" | |||
} | |||
} | |||
}, | |||
"minimum-stability": "dev" |
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.
Should that really be added?
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.
That would be required to get the beta2 until released, but I don't think it'll stay here. That was just the way to install it locally for me.
Anyway, I'm waiting some instructions/plans/help to deal with the CI as we're even unlikely to keep the messenger component in require-dev
due to the sf 2.7 support in this bundle.
public function process(ContainerBuilder $container) | ||
{ | ||
// Remove wired services if the Messenger component actually isn't enabled: | ||
if (!$container->hasAlias('message_bus') || !is_subclass_of($container->findDefinition('message_bus')->getClass(), MessageBusInterface::class, true)) { |
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.
The 3rd argument of is_subclass_of()
is already true
by default, right?
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.
true
:)
PHP API consistency (see is_a
) tricked me!
6a7bbc6
to
cf4d445
Compare
1fb8719
to
4fa24cd
Compare
|
@@ -676,6 +677,31 @@ public function testAnnotationsBundleMappingDetectionWithVendorNamespace() | |||
$this->assertEquals('Fixtures\Bundles\Vendor\AnnotationsBundle\Entity', $calls[0][1][1]); | |||
} | |||
|
|||
public function testMessengerIntegration() | |||
{ | |||
if (! interface_exists(MessageBusInterface::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.
I'd argue that it should be a dev-dependency, otherwise it's untested.
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.
Oops, I though symfony/symfony
was used on CI for specific versions. So I expected it to be available in the new build.
The issue with adding it into the dev-dependencies
(see first commit) is that it'll conflict with lowest dependencies tested for this packages due to the component requirements. So it must be explicitly added on a specific build. WDYT?
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.
You can override it for now using ^4.1@beta
, the @beta
part would be dropped once 4.1 is stable. But yes, it wouldn't allow SF pre-3.4. Since there is only one (or two) CI job to test SF 2.x, I think it'd be better to drop this dependency only in such job.
(Another argument for dropping 2.x support soon.)
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.
That would actually require dropping symfony/messenger
for every build without PHP 7.1, a minimum-stability: dev
or with a specific SYMFONY_VERSION
except for the new 4.1-beta2 one, as the component is only available since 4.1 and the required classes would be part of the beta2 (so it'll be quite a mess).
For now, I've just added the symfony/messenger
component on the new build, so this build will pass once the related PR on symfony/symfony
is merged.
But if there is a better strategy to you, please feel free to push the required changes to my branch :) Thank you!
ca8c487
to
1436d7a
Compare
PR has been merged on Symfony 👍 |
1436d7a
to
0a39dc9
Compare
And it's now green. Also tested on a real app, works perfectly fine :) |
Can you open a docs PR on Symfony too? |
@weaverryan : Done in symfony/symfony-docs#9774 |
…iereguiluz) This PR was merged into the 4.1 branch. Discussion ---------- [Messenger] Document middleware factories <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Refs: - Symfony PR: symfony/symfony#27128 - DoctrineBundle PR: doctrine/DoctrineBundle#817 Commits ------- c5ef7c8 Reowrd to restore the original meaning a87f21b Minor rewords 2880027 [Messenger] Document middleware factories
0a39dc9
to
f9ba543
Compare
Symfony 4.1 is released. Could we move forward with this one now? :) (Note: Code styles issues are not related to these changes) |
Hi there 👋 Any update? |
Anybody? :) |
Friendly ping |
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.
@ogizanagi Could you fix the CS issues (see Travis)
Ping @kimhemsoe could you have a look on this PR?
@Nyholm : As mentioned previously, these CS issues aren't actually related to this PR :) |
@ogizanagi Thanks |
🎉
…On Wed, 12 Sep 2018 at 21:54, Kim Hemsø Rasmussen ***@***.***> wrote:
Merged #817 <#817> into
master.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#817 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxHEaaFcNN4pBjnmbsDccvndanceK9Xks5uaWZfgaJpZM4T7YED>
.
|
Relates to symfony/symfony#27128
How should we process for the CI?