Skip to content
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

Merged
merged 8 commits into from
Jun 23, 2021
Merged

Transitive dependencies #579

merged 8 commits into from
Jun 23, 2021

Conversation

patrickkusebauch
Copy link
Collaborator

@patrickkusebauch patrickkusebauch commented Jun 12, 2021

Closes: #202
Closes: #158

In the end, since I was able to contain the changes to one class, it is easier than expected.

@patrickkusebauch patrickkusebauch changed the title WIP: transitive dependencies Transitive dependencies Jun 15, 2021
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));
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

@dbrumann
Copy link
Collaborator

And another one 👍
As always, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Transitive Dependencies Add ability to inherit from a parent layer
3 participants