8000 Installing fake-sms-notifier as a dev packages does not work · Issue #58929 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Installing fake-sms-notifier as a dev packages does not work #58929

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

Closed
toby-griffiths opened this issue Nov 19, 2024 · 7 comments
Closed

Installing fake-sms-notifier as a dev packages does not work #58929

toby-griffiths opened this issue Nov 19, 2024 · 7 comments

Comments

@toby-griffiths
Copy link
Contributor
toby-griffiths commented Nov 19, 2024

Symfony version(s) affected

7.1.8

Description

I wanted to use the fake notifier during testing, but don't need it on the production site, so I installed it as a --dev package… then spent about 45 mins & lots of step debugging, trying to work out why it wasn't working.

How to reproduce

Install the package using composer require --dev symfony/fake-sms-notifier.

Try to send an SMS notification.

Possible Solution

Is it possible to allow this package to be installed just in dev, since it's a primarily development style package?

Or at least lets update the docs to make this clear. Happy to PR, but if we can make it support dev only, all the better.

Additional Context

No response

@xabbuh
Copy link
Member
xabbuh commented Nov 19, 2024

Can you create a small example application that allows to reproduce your issue?

@toby-griffiths
Copy link
Contributor Author
toby-griffiths commented Nov 19, 2024

Can you create a small example application that allows to reproduce your issue?

Here you go…

https://github.com/toby-griffiths/fake-sms-notifier-demo

@nicolas-grekas
Copy link
Member

What does it mean "it doesn't work"? How does it behave?

@xabbuh
Copy link
Member
xabbuh commented Nov 20, 2024

I see where this is coming from. ContainerBuilder::willBeAvailable() will return false for symfony/fake-sms-notifier which means that the transport service will be removed which in turn leads to the following error:

$ php bin/console app:send-fake-sms

In Transport.php line 165:
                                                 
  The "fakesms+logger" scheme is not supported.

@GromNaN
Copy link
Member
GromNaN commented Nov 20, 2024

This logic is in the FrameworkExtension.

@94noni
Copy link
Contributor
94noni commented Nov 20, 2024

I remember commenting such subject back then
https://github.com/symfony/symfony/pull/39949/files#r564443227
#40625 (comment)

I think it could be wise to move such notifier/fake being available for --dev dependencies

@xabbuh
Copy link
Member
xabbuh commented Dec 15, 2024

see #59213

@fabpot fabpot closed this as completed Dec 16, 2024
nicolas-grekas added a commit that referenced this issue Dec 16, 2024
…o be installed as non-dev dependencies (xabbuh)

This PR was merged into the 6.4 branch.

Discussion
----------

[FrameworkBundle] don't require fake notifier transports to be installed as non-dev dependencies

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #58929
| License       | MIT

Commits
-------

cf64a86 don't require fake notifier transports to be installed as non-dev dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
0