-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] [FakeSms] Allow missing optional dependency #48546
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
[Notifier] [FakeSms] Allow missing optional dependency #48546
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
e5bcf6e
to
ddf16cb
Compare
src/Symfony/Component/Notifier/Bridge/FakeSms/FakeSmsTransportFactory.php
Outdated
Show resolved
Hide resolved
Thank you for your PR, that makes sense 👍 I think we should move |
0dda903
to
6291bf9
Compare
Thanks for your feedback. I'll actually reverted the custom exception and moved the mentioned dependencies to require-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.
Test failure unrelated
6291bf9
to
88e6c3e
Compare
Thank you @benschoch. |
…y (Benjamin Schoch) This PR was merged into the 6.3 branch. Discussion ---------- [Notifier] [FakeChat] Allow missing optional dependency | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? |no | New feature? | kind of | Deprecations? | no | Tickets | see #48441 | License | MIT Nearly the same as in this PR: #48546 This allows the `FakeChatTransportFactory` to be used without providing an implementation of `MailerInterface` or `LoggerInterface` if one of them is actually not required during runtime. I did not share any of the implementation now between both components. I could think of pulling out the Exception as well as Parts of the test to something like a `FakeTransportFactoryTestCase` for example. What do you think? Commits ------- 3f312b8 [Notifier] [FakeChat] Allow missing optional dependency
Allow the
FakeSmsTransportFactory
to be used without providing an implementation ofMailerInterface
orLoggerInterface
if one of them is actually not required during runtime.Same could be applied to the
FakeChatTransportFactory
if the provided approach is ok.