Closed (fixed)
Project:
Automatic Updates
Version:
3.0.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2023 at 12:05 UTC
Updated:
20 Apr 2023 at 18:04 UTC
Jump to comment: Most recent
VersionPolicyValidator uses Stage::getActiveComposer(), which returns a ComposerUtility. #3316368: Remove our runtime dependency on composer/composer: remove ComposerUtility is removing that.
Refactor it to use ComposerInspector instead.
Do it!
None.
None.
None.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
tedbowJust gave this a start. Not assigning to myself
Comment #5
tedbowI think this is blocked on #3345754: Updater should use ComposerInspector instead of ComposerUtility because it need to ask the update which versions it is going update to.
Comment #6
wim leers#3345754: Updater should use ComposerInspector instead of ComposerUtility is almost ready.
Comment #7
phenaproximaBlocker is in!
Comment #8
wim leers#3338789: Random failure: "PHP temp directory (/tmp) does not exist or is not writable to Composer." struck again! Re-testing. Although I can reproduce
locally…
Comment #9
wim leersThat failure was caused by
\Drupal\Tests\automatic_updates\Kernel\StatusCheck\VersionPolicyValidatorTest::testNoCorePackagesInstalled()'s reliance on modifying Composer'sinstalled.jsonmanually, which no longer has any effect. Plus by a tiny bug in::getCorePackageName().Comment #10
wim leersComment #11
wim leersI only got it to green, others did 90% of the work.
Comment #13
tedbow🎉
@Wim Leers and/or @phenaproxima what do you think of my follow-up suggestion?
Comment #14
wim leersI had never heard of
drupal/core-dev-pinnedbefore today!You propose
\Drupal\package_manager\InstalledPackageto gain apublic readonly bool $isDevproperty — great — but just yesterday that was being worked on in #3345754: Updater should use ComposerInspector instead of ComposerUtility and was removed in favor ofComposerInspector::getRootPackageInfo()returning adevRequiresflag for each installed package.That is what @phenaproxima settled on and you RTBC'd, @tedbow. I was not involved in that pretty significant shift.
So I think the sensible thing to do next is for you to open that follow-up as you envision it, @tedbow 😊
Comment #15
phenaproximaNot quite.
The property that was originally implemented in that issue, and removed by me, was a change in behavior. Updater needs to see what the dev requirements are, not what the dev packages are. So the implementation was wrong, and was therefore removed.
Comment #16
wim leersThe follow-up doesn't exist yet — clarifying status.
Comment #17
tedbowcreated follow-up #3352731: Remove need for VersionPolicyValidator to know about specific core packages