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

Modularization #923

Merged
merged 17 commits into from
Jul 15, 2022
Merged

Modularization #923

merged 17 commits into from
Jul 15, 2022

Conversation

patrickkusebauch
Copy link
Collaborator

@patrickkusebauch patrickkusebauch commented Jun 24, 2022

Closes #924

The idea is to split the application into independent parts. Clearly define the stable public API. Along the way, dogfood our own features like private collectors and sample extensions.

I have build this PR to be reviewed commit by commit, otherwise I think it will be too large to review.

The best place to start on the first commit is the deptrac.yaml file. One layer per directory, no fancy collector magic.

 - Dependency and DependencyInjection
 - Ast and Console
 - Result and Ast
 - OutputFormatter and Ast (this one is a silly hack since deptrac does not recognize transitive dependencies yet, if it did, this refactor would not fly)
 - Analyser -> Console
 - DependencyInjection -> Console
 - OutputFormatter -> Console
@patrickkusebauch patrickkusebauch marked this pull request as ready for review June 25, 2022 18:18
Copy link
Collaborator

@dbrumann dbrumann left a comment

Choose a reason for hiding this comment

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

As discussed, we should probably discuss the namespace changes in an Issue. Otherwise we run the risk of moving code around every so often. I'd much rather have an issue we can refer to for why the directory/namespace structure is the way it is, in case someone proposes changes.

codeQuality/deptrac/IgnoreDependenciesOnUtils.php Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
deptrac.yaml Outdated Show resolved Hide resolved
docs/contributing.md Show resolved Hide resolved
docs/contributing.md Outdated Show resolved Hide resolved
docs/contributing.md Outdated Show resolved Hide resolved
docs/contributing.md Outdated Show resolved Hide resolved
src/Analyser/TokenInLayerAnalyser.php Show resolved Hide resolved
src/OutputFormatter/ConsoleOutputFormatter.php Outdated Show resolved Hide resolved
src/Result/Warning.php Show resolved Hide resolved
@dbrumann
Copy link
Collaborator

Sorry for taking so long to review this. Looks good to me. 👍

Just as a heads up, I might revert your change in the DependencyEmitters switching from getAlias to the key again at some point. I want to get rid of checking for certain keys outside the class itself, like we do with EmitterTypes. I am afraid that this will cause issues with extensions at some point or force them to overwrite our keys instead of providing their own. By not using them we will (hopefully) make sure, that our code is not restricted or behave weirdly when a new, unknown emitter type is introduced by an extension.

@dbrumann dbrumann merged commit 215e30a into qossmic:main Jul 15, 2022
@patrickkusebauch patrickkusebauch deleted the refactor/modularization branch July 28, 2022 15:11
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.

Namespace and directory changes
2 participants