Skip to content

[Messenger] Rename Adapters to Transports #27129

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

Merged

Conversation

sroze
Copy link
Contributor

@sroze sroze commented May 2, 2018

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets ø
License MIT
Doc PR ø

Last of our tasks on the "plan to beta", renaming "adapters" to "transports". This is a term that makes more sense and is commonly used within the "queue community".

@sroze sroze requested a review from weaverryan May 2, 2018 19:54
@sroze sroze force-pushed the rename-messenger-adapters-to-transports branch 2 times, most recently from 3220182 to 68208f3 Compare May 2, 2018 20:04
Copy link
Contributor

@ogizanagi ogizanagi left a comment

Choose a reason for hiding this comment

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

There are still some occurrences of adapter in the component. Does it make sense to keep those? It doesn't disturb me at those places, but asking anyway :)

screenshot 2018-05-02 a 22 12 56

@Tobion
Copy link
Contributor

Tobion commented May 2, 2018

What I also found is that namespaces of interfaces and implementations are not consistent.
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Messenger/MiddlewareInterface.php is in the messener root. But the implementations are in a sub-namespace https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Messenger/Middleware
But the implemtations of https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Messenger/HandlerLocatorInterface.php are also in the root.
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Messenger/Handler/MessageHandlerInterface.php is not in the root and the implementation neither.

@Tobion
Copy link
Contributor

Tobion commented May 2, 2018

So I'd propose

  1. move the bus stuff to Symfony\Component\Messenger\Bus\
  2. move handler locators to Symfony\Component\Messenger\Handler\Locator\
  3. move Symfony\Component\Messenger\MiddlewareInterface to Symfony\Component\Messenger\Middleware\MiddlewareInterface

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone May 2, 2018
@ogizanagi
Copy link
Contributor

ogizanagi commented May 3, 2018

I agree with @Tobion . But I'd keep MessageBus and MessageBusInterface root as the main component entry point. It seems consistent with what we did with other components.

@sroze sroze added the Messenger label May 3, 2018
@sroze sroze force-pushed the rename-messenger-adapters-to-transports branch from 7d8a7f1 to 2c7730e Compare May 3, 2018 07:52
@sroze
Copy link
Contributor Author

sroze commented May 3, 2018

Good catch @Tobion, it was the right time to move them. I've moved the handler and middleware ones, kept the Bus one at the root like we do on other bundles like the Serializer.

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

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

👍 adapters -> transports & the other renamings.

@nicolas-grekas nicolas-grekas force-pushed the rename-messenger-adapters-to-transports branch from 2c7730e to 13b7475 Compare May 4, 2018 00:10
@nicolas-grekas
Copy link
Member

Thank you @sroze.

@nicolas-grekas nicolas-grekas merged commit 13b7475 into symfony:master May 4, 2018
nicolas-grekas added a commit that referenced this pull request May 4, 2018
This PR was squashed before being merged into the 4.1-dev branch (closes #27129).

Discussion
----------

[Messenger] Rename Adapters to Transports

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ø
| License       | MIT
| Doc PR        | ø

Last of our tasks on the "plan to beta", renaming "adapters" to "transports". This is a term that makes more sense and is commonly used within the "queue community".

Commits
-------

13b7475 [Messenger] Rename Adapters to Transports
@@ -60,16 +60,16 @@
</service>

<!-- Adapters -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this line also should be renamed?

@sroze sroze deleted the rename-messenger-adapters-to-transports branch May 4, 2018 07:40
weaverryan added a commit to symfony/symfony-docs that referenced this pull request May 9, 2018
This PR was submitted for the master branch but it was squashed and merged into the 4.1 branch instead (closes #9727).

Discussion
----------

[Messenger] Update the messenger documentation

- [x] Fixes #9641 with the middleware configuration.
- [x] Fixes #9617 with the multiple bus configuration.
- [x] Change adapters to transports (waiting merge: symfony/symfony#27129)
- [x] middlewares config entry is renamed middleware (symfony/symfony#27177)
- [x] in the config, message buses names are the full service id you'll use (symfony/symfony#27162)
- [x] Add TransportInterface as first class citizen sender+receiver (symfony/symfony#27164)

Commits
-------

c3c3528 Few updates following review
64bfd75 Change wording and don't use `.`-based services so it's just clearer
e1f3b5a Fix the formating of the method name
9b7b85f Update the example of using multiple buses to use DI's `bind`s
c76b2c2 Uses the full service name when configuring the buses from the YAML configuration
2409798 Middleware does not have a plural
a20286d Add a note about the symfony serializer pack
10f46eb Introduce the `TransportInterface`
ef70bc0 Add a documentation about the middlewares
3ff8cfe Add multiple buses configuration and type-hint example
a4bc592 Rename the adapters to transport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants