-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] [Telegram] Fix version and exception signature #51994
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] [Telegram] Fix version and exception signature #51994
Conversation
src/Symfony/Component/Notifier/Exception/MultipleExclusiveOptionsUsedException.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Exception/MultipleExclusiveOptionsUsedException.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Exception/MultipleExclusiveOptionsUsedException.php
Outdated
Show resolved
Hide resolved
Good catch, thank you. |
src/Symfony/Component/Notifier/Tests/Exception/MultipleExclusiveOptionsUsedExceptionTest.php
Outdated
Show resolved
Hide resolved
9b069ad
to
c8701d8
Compare
Ready to merge from my side |
src/Symfony/Component/Notifier/Tests/Exception/MultipleExclusiveOptionsUsedExceptionTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Tests/Exception/MultipleExclusiveOptionsUsedExceptionTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Exception/MultipleExclusiveOptionsUsedException.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Exception/MultipleExclusiveOptionsUsedException.php
Outdated
Show resolved
Hide resolved
The telegram tests are failing on CI with an error about an undefined key. Is it coming from that PR as well ? |
src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php
Show resolved
Hide resolved
I will check later |
I cannot reproduce the missing key, I tried to composer update --prefer-lowest, but tests are still passing 🤔 Besides that, I think we should not write json and decode it, but write an array and encode it in the assertion. But that should be a floor up PR once green |
df41238
to
d384f8f
Compare
@igrizzli any idea? |
As far as @xabbuh and I can find out so far, dropping For the errors itself, maybe is related.... |
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.
LGTM thanks, just minor details
src/Symfony/Component/Notifier/Tests/Exception/MultipleExclusiveOptionsUsedExceptionTest.php
Outdated
Show resolved
Hide resolved
@@ -17,8 +17,8 @@ | |||
], | |||
"require": { | |||
"php": ">=8.1", | |||
"symfony/http-client": "^5.4|^6.0|^7.0", | |||
"symfony/notifier": "^6.2.7|^7.0" | |||
"symfony/http-client": "^6.3|^7.0", |
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.
why this bump?
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.
we need #49911
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.
and for this we need symfony/mime
also
Thanks @xabbuh, looks like |
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\Notifier\Exception\MultipleExclusiveOptionsUsedException; | ||
|
||
final class MultipleExclusiveOptionsUsedExceptionTest extends TestCase |
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'm removing final
: a test case is not an API, we don't need extra visual debt (same as void
) ;)
6753c99
to
74e0c9c
Compare
Thank you @OskarStark. |
The PR
location
,document
,audio
,video
,venue
,photo
,animation
,sticker
&contact
#51717introduced a new exception in the Notifier component. I tested this locally and faced the following error:
The version bump of the notifier was missing.
I also added tests for the exception class.
I am wondering about the parameter signature, and I am not sure if the second parameter should be nullable:
symfony/src/Symfony/Component/Notifier/Exception/MultipleExclusiveOptionsUsedException.php
Lines 17 to 31 in c868be4
@igrizzli is there anything I am missing or can e adjust the signature: