-
Notifications
You must be signed in to change notification settings - Fork 136
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
Transitive dependencies #579
Transitive dependencies #579
Conversation
private function getTransitiveDependencies(string $layerName, array $previousLayers): array | ||
{ | ||
if (in_array($layerName, $previousLayers, true)) { | ||
throw new InvalidArgumentException('Circular ruleset dependency for layer '.$layerName.' depending on: '.implode('->', $previousLayers)); |
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.
How about a specific exception class, e.g. CircularTransitiveRulesetDependencyDetectedException
?
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 tend to not create specialized exception classes if the code that is catching the exceptions does not need it to differentiate it from another exception. But that is my style/convention, if you insist, I can create it.
And another one 👍 |
Closes: #202
Closes: #158
In the end, since I was able to contain the changes to one class, it is easier than expected.