Use the original service ID instead of its alias #25

Merged
merged 1 commit into from Oct 16, 2012

Projects

None yet

3 participants

@elnur
Contributor
elnur commented Oct 6, 2012

mailer is just an alias and an app-specific service can use this name instead. To avoid collisions, use the original swiftmailer.mailer service ID.

@elnur
Contributor
elnur commented Oct 11, 2012

@fabpot, ping.

@fabpot
Member
fabpot commented Oct 11, 2012

I don't see the point. The mailer service/alias is declared by this bundle, so it makes sense to use it.

@elnur
Contributor
elnur commented Oct 11, 2012

The point is that I want to use the mailer ID for my own mailer service that is built on top of Swiftmailer. It all works great — except this command because it relies on the mailer ID.

Why depend on an alias instead of the original service name? Is there a reason I don't see yet?

@elnur
Contributor
elnur commented Oct 16, 2012

So, @fabpot, what do you think?

@fabpot fabpot added a commit that referenced this pull request Oct 16, 2012
@fabpot fabpot merged branch elnur/stop-using-alias (PR #25)
This PR was merged into the 2.0 branch.

Commits
-------

29dbd93 Use the original service ID instead of its alias.

Discussion
----------

Use the original service ID instead of its alias

`mailer` is just an alias and an app-specific service can use this name instead. To avoid collisions, use the original `swiftmailer.mailer` service ID.

---------------------------------------------------------------------------

by elnur at 2012-10-11T09:58:46Z

@fabpot, ping.

---------------------------------------------------------------------------

by fabpot at 2012-10-11T12:18:49Z

I don't see the point. The mailer service/alias is declared by this bundle, so it makes sense to use it.

---------------------------------------------------------------------------

by elnur at 2012-10-11T13:00:59Z

The point is that I want to use the `mailer` ID for my own mailer service that is built on top of Swiftmailer. It all works great — except this command because it relies on the `mailer` ID.

Why depend on an alias instead of the original service name? Is there a reason I don't see yet?

---------------------------------------------------------------------------

by elnur at 2012-10-16T06:58:21Z

So, @fabpot, what do you think?
a7a0152
@fabpot fabpot merged commit 29dbd93 into symfony:2.0 Oct 16, 2012
@fabpot fabpot added a commit that referenced this pull request Oct 17, 2012
@fabpot fabpot Revert "merged branch elnur/stop-using-alias (PR #25)"
This reverts commit a7a0152, reversing
changes made to 5f1b50d.
8d7a554
@fabpot fabpot added a commit that referenced this pull request Oct 17, 2012
@fabpot fabpot Merge branch '2.0'
* 2.0:
  Revert "merged branch elnur/stop-using-alias (PR #25)"
2393ba6
@elnur
Contributor
elnur commented Oct 24, 2012

Could you please tell me why did you revert this PR?

Also, I came up with an additional argument against using the alias: a 3rd party bundle should not reserve for itself such a common name without a prefix. A lot of developers might want to use such a name for their own service.

Actually, the bundle itself isn't reserving it because I can override an alias with an ID of my own service, but the command stops working in this case. So, the only problem is the command.

@stof
Member
stof commented Oct 24, 2012

@elnur It has been reverted because it was simply broken: 11b9117#commitcomment-2004041

@elnur
Contributor
elnur commented Oct 24, 2012

Can we just make the swiftmailer.mailer service public then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment