-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(upgrade): use multiple routes #70
Conversation
15bd958
to
959ff29
Compare
959ff29
to
fb8fc26
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.
OK for a new major release
f06936c
to
5969742
Compare
5969742
to
cfcbce6
Compare
I think that we can avoid new major release by allowing the 2 options (route and routes). |
dda0a7d
to
b7d9f0f
Compare
b7d9f0f
to
8d166a8
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.
LGTM & tested
src/M6Web/Bundle/LogBridgeBundle/Matcher/Dumper/PhpMatcherDumper.php
Outdated
Show resolved
Hide resolved
if (array_key_exists('route', $config) && array_key_exists('routes', $config)) { | ||
throw new ParseException(sprintf('You can\'t use both "route" and "routes" parameter from filter "%s"', $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.
I was not expected this. instead of create a 2 if condition for route(s) config you can use the xor operator.
so in the first condition you can replace (!array_key_exists('route', $config) && !array_key_exists('routes', $config))
by (!(array_key_exists('route', $config) xor array_key_exists('routes', $config)))
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 saw this together like a family, it's ok to have both if
Why
I want to add multiple route for the same configuration and also exclude a route
How
Edit the configuration and code to use multiple route, no breaking changes