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

Make allowed layer resolution public #897

Merged

Conversation

patrickkusebauch
Copy link
Collaborator

Making AllowDependencyHandler::getAllowedLayers public and static. This helper method is useful for integrations.

@@ -38,7 +38,7 @@ public function __invoke(ProcessEvent $event): void

foreach ($event->getDependentLayers() as $dependentLayer) {
try {
$allowedLayers = $this->getAllowedLayers($dependerLayer);
$allowedLayers = self::getAllowedLayers($dependerLayer, $this->allowedLayers);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan of using static methods as its harder to switch out their implementation in tests. Can we extract the logic into its own class instead? How about something like Qossmic\Deptrac\Analyser\LayerProvider or LayerResolver?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can do that. 😀

@patrickkusebauch
Copy link
Collaborator Author

@dbrumann is there something preventing the merge for this one? I need it to make deptrac-awesome work again.

@dbrumann dbrumann merged commit 97ca011 into qossmic:main Jun 2, 2022
@patrickkusebauch patrickkusebauch deleted the feature/allowedDependencies branch June 2, 2022 22:38
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.

None yet

2 participants