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

composer dependency analyser #140

Merged
merged 6 commits into from
Mar 16, 2024
Merged

Conversation

LastDragon-ru
Copy link
Owner

to check dependencies.

@LastDragon-ru LastDragon-ru added this to the 6.x milestone Mar 15, 2024
@LastDragon-ru LastDragon-ru self-assigned this Mar 15, 2024
@LastDragon-ru LastDragon-ru force-pushed the ci/composer-dependency-analyser branch from 0c0667f to 9acd73a Compare March 15, 2024 15:53
@LastDragon-ru LastDragon-ru force-pushed the ci/composer-dependency-analyser branch from 9acd73a to 98bd58b Compare March 15, 2024 16:29
// Assertions
assert(isset($this) && $this instanceof Initializer);
assert(isset($options) && $options instanceof CliOptions);
assert(isset($composerJson) && $composerJson instanceof ComposerJson);

Choose a reason for hiding this comment

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

All this wont be available after shipmonk-rnd/composer-dependency-analyser#102. Instead, you can:

  1. get $cwd just by getcwd()
  2. get the given path to composer.json by getopt('', ['composer-json:'])['composer-json']
  3. parse autoload paths the same way you do for exclude-from-classmap
    • I'll think if I cannot add better support to override dev paths in this config so that you would not need to do disableComposerAutoloadPathScan (and re-adding those by addPathToScan).

Choose a reason for hiding this comment

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

Basically any class or method not mentioned in readme (which is just Configuration and ErrorType) is not considered public API (as CDA is mainly a CI tool) and may change in future, so it is better to avoid using those.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yep, agree. But I will merge it as is (because need it for #117) and update a bit later.

@LastDragon-ru LastDragon-ru merged commit 5192462 into main Mar 16, 2024
116 checks passed
@LastDragon-ru LastDragon-ru deleted the ci/composer-dependency-analyser branch March 16, 2024 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants