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

UHF-10713 #44

Merged
merged 6 commits into from
Dec 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove direct dependencies to developer tools
This simplifies dependencies, since these tools are already provided by
drupal/core-dev metapackage. For full list of core-dev dependencies,
see: https://packagist.org/packages/drupal/core-dev.

After this change, developer tools are kept up to date by
running `composer update drupal/core-dev --with-all-dependencies`.
hyrsky committed Dec 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit e3717fc4437ab912a17aca8ddef04f1282b5c237
28 changes: 28 additions & 0 deletions src/Update/migrations.php
Original file line number Diff line number Diff line change
@@ -244,3 +244,31 @@ function drupal_tools_update_12() : UpdateResult {
'Re-installed dg/bypass-finals as dev dependency.',
]);
}

/**
* Remove direct dependency to packages provided by drupal/core-dev.
*/
function drupal_tools_update_13() : UpdateResult {
// Ensure drupal/core-dev is required.
(new Process(['composer', 'require', 'drupal/core-dev:^10', '--dev', '-W']))
->run();

// For full list of drupal/core-dev dependencies,
// see: https://packagist.org/packages/drupal/core-dev.
// Already provided by drupal/core-dev:
$remove = [
'phpstan/phpstan',
'phpstan/extension-installer',
'mglaman/phpstan-drupal',
'phpunit/phpunit',
'drupal/coder',
'phpspec/prophecy-phpunit',
];

(new Process(array_merge(['composer', 'remove', '--dev'], $remove)))
->run();

return new UpdateResult([
'Removed direct dependency to ' . implode(', ', $remove),
]);
}