-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] [DX] Abstract test cases #39495
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
Conversation
59dc394
to
2996190
Compare
… (OskarStark) This PR was merged into the 5.1 branch. Discussion ---------- [Notifier] [Free Mobile] Could not use custom host in DSN | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | --- | License | MIT | Doc PR | --- While working on #39509 I discovered, that you cannot set a custom host through the DSN string itself, only by calling `setHost()` method in the transport, which is only possible by **not** using the factory.... I changed it the way all other bridges work. I don't add a testcase for the port, because non of the others have that test. I plan to implement it in #39495 As this is a bugfix I created an extra PR. Cheers EDIT: Also the host is not allowed to contain `https://` otherwise calling `__toString()` will result in: `freemobile://https://......` Commits ------- 63350cc [Notifier] [Free Mobile] Could not use custom host in DSN
9db839b
to
30f9436
Compare
src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportTest.php
Show resolved
Hide resolved
a030df5
to
8d7700f
Compare
@@ -18,7 +18,7 @@ | |||
"require": { | |||
"php": ">=7.2.5", | |||
"symfony/http-client": "^4.3|^5.0", | |||
"symfony/notifier": "~5.1.0" | |||
"symfony/notifier": "~5.1.10" |
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 guess I need to bump this to ~5.1.11, now that 5.1.10 was released, right?
8d60f8b
to
c7d773a
Compare
Ready to merge from my side 👍 |
src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportFactoryTest.php
Show resolved
Hide resolved
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.
Okay, first of all, I really like the new test case classes. They give the tests of all bridges more structure and makes it easier to maintain.
But:
- We're basically rewriting the test suites of all notifier bridges for the 5.1 branch here. That branch is going to die next month.
- I have merged several tests refactorings from 5.1 to 5.2 and had to solve quite a few conflicts each time. Slack bridge, I'm looking at you.
- Quite a few bridges have changed fundamentally in 5.2. It is close to impossible to merge this PR cleanly to 5.2 and beyond.
So, this PR certainly improves things, but I wonder if we should really target 5.1.
67a1a5b
to
7614cdf
Compare
If you like you can just merge it in |
7614cdf
to
79379b7
Compare
Thank you Oskar. |
This PR was squashed before being merged into the 5.2 branch. Discussion ---------- [Notifier] Use abstract test cases in 5.2 | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Follows #39495 | License | MIT | Doc PR | --- Same as #39495, but for `5.2` cc @derrabus Commits ------- 8f6b08c [Notifier] Use abstract test cases in 5.2
This PR
TransportTestCase
TransportFactoryTestCase
(code is mainly taken from theMailer/TransportFactoryTestCase
)We have a lot of code duplication in the notifier bridges
Todos
~5.1.10
Questions
5.1
?Abstract
? As we did the same for Mailer, I would say no@symfony/mergers have to change ^5.2 into ^5.2.1