-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] [DX] Dsn::getRequiredOption() #39457
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
$consumerKey = $dsn->getOption('consumer_key'); | ||
|
||
if (!$consumerKey) { | ||
throw new IncompleteDsnException('Missing consumer_key.', $dsn->getOriginalDsn()); | ||
} | ||
|
||
$serviceName = $dsn->getOption('service_name'); | ||
|
||
if (!$serviceName) { | ||
throw new IncompleteDsnException('Missing service_name.', $dsn->getOriginalDsn()); | ||
} | ||
|
||
$consumerKey = $dsn->getRequiredOption('consumer_key'); | ||
$serviceName = $dsn->getRequiredOption('service_name'); |
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.
Less noise by using the new method
c2b70b5
to
9c82bd1
Compare
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.
Please fix all the components in the same PR.
Will fix all bridges 👍🏻 |
fb1368d
to
1a8a31c
Compare
aee7330
to
12c7185
Compare
69d50fe
to
18b84d5
Compare
e4de080
to
2b43adc
Compare
cd13710
to
ee16a5d
Compare
Ready to merge from my side ✌🏻 |
@OskarStark Looks like the failing tests are related to the changes of this PR. Can you have a look? |
Sure will do later, will ping you when done |
ee16a5d
to
f04d08d
Compare
All green now @fabpot 👍 |
f04d08d
to
3f095bf
Compare
Thank you @OskarStark. |
Todo
notifer:5.3
This will lead to a much cleaner "communication" between the factory and the transport which option is required and which is optional. This method will also reduce the code duplication in the bridges.
IMHO we should add more of those convenient "helpers" to lower the burden for new bridges.