- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π Add new InstalledPackagesList which does not rely on Composer API to get package info Fixed landed.
π ComposerPatchesValidator should use ComposerInspector instead of ComposerUtility Fixed needs many more sibling issues. π ScaffoldFilePermissionsValidator should use ComposerInspector instead of ComposerUtility Fixed is the only one that exists so far β we need those for all validators that currently use
ComposerUtility
β as mentioned in#autoupdates
Drupal Slack yesterday. - πΊπΈUnited States effulgentsia
The issues in #16 look like they're relevant to removing a
composer/composer
dependency entirely. However, is there anything left unresolved before we can movecomposer/composer
fromrequire
torequire-dev
? If not, it would be great to do that, close this issue, and open a separate meta for tracking all of the improvements to tests (if our other meta issues aren't already sufficient for that). - πΊπΈUnited States phenaproxima Massachusetts
However, is there anything left unresolved before we can move composer/composer from require to require-dev
I'd say so. Any use of ComposerUtility in our runtime code (and there's still a lot of that) necessitates a runtime dependency on
composer/composer
. - πΊπΈUnited States effulgentsia
Oh, sorry. I see now that π ComposerPatchesValidator should use ComposerInspector instead of ComposerUtility Fixed is runtime code, not just test code.
- Assigned to wim leers
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Per #3343827-29: Update FixtureManipulator to work with InstalledPackagesList, real composer show command β , π ComposerPatchesValidator should use ComposerInspector instead of ComposerUtility Fixed and π ScaffoldFilePermissionsValidator should use ComposerInspector instead of ComposerUtility Fixed are now unblocked.
While working on π Update FixtureManipulator to work with InstalledPackagesList, real composer show command Fixed , I got pretty confident that we should be able to remove all things
ComposerInspector
after those land. Let's see how well-founded that confidence was⦠- @wim-leers opened merge request.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
That confidence seems to have been pretty well-founded! But as I indicated in #16, this needs many more blocking issues, because we need to refactor away the many remaining uses of
Stage::getActiveComposer()
andStage::getStageComposer()
, as well as 2 remaining direct uses ofComposerUtility
:The good news is that that should now be easy ππ€
- Issue was unassigned.
- Status changed to Postponed
almost 2 years ago 12:09pm 3 March 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
This MR is currently
+37, -1113
, but won't be able to land until the following are done, to address #22:ScaffoldFilePermissionsValidator
β π ScaffoldFilePermissionsValidator should use ComposerInspector instead of ComposerUtility FixedComposerPatchesValidator
β π ComposerPatchesValidator should use ComposerInspector instead of ComposerUtility FixedUpdater
β π Updater should use ComposerInspector instead of ComposerUtility FixedExtensionUpdater
β π ExtensionUpdater should use ComposerInspector instead of ComposerUtility Fixed\Drupal\automatic_updates_extensions\Form\UpdateReady
β π \Drupal\automatic_updates_extensions\Form\UpdateReady should use ComposerInspector instead of ComposerUtility Fixed\Drupal\automatic_updates_extensions\Form\UpdaterForm
β π \Drupal\automatic_updates_extensions\Form\UpdaterForm should use ComposerInspector instead of ComposerUtility FixedUpdateReleaseValidator
β π UpdateReleaseValidator should use ComposerInspector instead of ComposerUtility FixedGitExcluder
β π GitExcluder should use ComposerInspector instead of ComposerUtility FixedUnknownPathExcluder
β π UnknownPathExcluder should use ComposerInspector instead of ComposerUtility FixedOverwriteExistingPackagesValidator
β π OverwriteExistingPackagesValidator should use ComposerInspector instead of ComposerUtility FixedSupportedReleaseValidator
β π SupportedReleaseValidator should use ComposerInspector instead of ComposerUtility FixedCollectIgnoredPathsFailValidator
β π CollectIgnoredPathsFailValidator should use ComposerInspector instead of ComposerUtility FixedFakeSiteFixtureTest
β π FakeSiteFixtureTest should use ComposerInspector instead of ComposerUtility FixedStatusCheckTraitTest
β π StatusCheckTraitTest should use ComposerInspector instead of ComposerUtility FixedRequestedUpdateValidator
β π RequestedUpdateValidator should use ComposerInspector instead of ComposerUtility FixedVersionPolicyValidator
β π VersionPolicyValidator should use ComposerInspector instead of ComposerUtility Fixed\Drupal\automatic_updates\Form\UpdateReady
β π \Drupal\automatic_updates\Form\UpdateReady should use ComposerInspector instead of ComposerUtility Fixed
- πΊπΈUnited States tedbow Ithaca, NY, USA
I think any issue not in package_manager but in automatic_updates can be marked as core-post-mvp
Worst case scenario we could move ComposerUtility into automatic_updates as this will not be going into core first
so please work on package_manager issues first - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Sure, but β¦ until the ones in AU/AUE are removed β¦ we cannot actually remove the composer/composer dependency π So not impossible, but definitely would leave things in a confusing state, although π Finalize \Drupal\automatic_updates\Development\Converter script to update core MR Fixed could compensate for it for the
package_manager
-only MR. - πΊπΈUnited States tedbow Ithaca, NY, USA
@joachim very interesting!
What if someone runs a command from the terminal with `--no-plugins`? I don't think we could stop that. Won't this list then be out of date because the yml file not be updated? I guess maybe to get around that you could store a hash of the `composer.lock` in the yml file from that last time the .yml was updated and then anyone reading the file could check it is up-to-date. But still it would be out of date whether you detect I am not sure helps
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
- πΊπΈUnited States phenaproxima Massachusetts
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
- πΊπΈUnited States phenaproxima Massachusetts
As did π ComposerPatchesValidator should use ComposerInspector instead of ComposerUtility Fixed .
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π GitExcluder should use ComposerInspector instead of ComposerUtility Fixed landed.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π UnknownPathExcluder should use ComposerInspector instead of ComposerUtility Fixed landed.
- πΊπΈUnited States phenaproxima Massachusetts
Added π Stage::validatePackageNames() should not use the Composer API Fixed .
- Assigned to phenaproxima
- Status changed to Needs work
almost 2 years ago 11:01pm 9 March 2023 - πΊπΈUnited States phenaproxima Massachusetts
The final blockers are in: π ScaffoldFilePermissionsValidator should use ComposerInspector instead of ComposerUtility Fixed and π Remove FixtureManipulator::modifyPackage() last usage Fixed .
I haven't got π Stage::validatePackageNames() should not use the Composer API Fixed done yet, but I don't think we need to wait for that. Here's why: Composer won't accept a bad constraint, as far as I know. Even if you do
composer require --no-update
. So although it's not very sophisticated, I think the very, very basic validation we have in this merge request is sufficient. In π Stage::validatePackageNames() should not use the Composer API Fixed , I'll restore it by checking against a regex that Composer itself supplies, and using the VersionParser class, which is a safe runtime dependency provided by core.But I don't see any reason we should keep ComposerUtility around a day longer. Self-assiging to finish this now and rip it out.
- πΊπΈUnited States phenaproxima Massachusetts
Hmmm...we might still be blocked by validatePackageNames(). The basic
str_contains($package_name, '/')
validation is not good enough, because it doesn't allow for platform packages, or other legitimate requirements that Composer supports which don't follow that format.The original plan outlined in the issue summary -- writing the requirements to an alternate composer.json and calling
validate
on it -- might be the best approach here. - Issue was unassigned.
- Status changed to Postponed
almost 2 years ago 12:30am 10 March 2023 - πΊπΈUnited States phenaproxima Massachusetts
Yeah, sorry, folks -- this is blocked by π Stage::validatePackageNames() should not use the Composer API Fixed .
However, I'm leaving that one in a reviewable state. Once it's committed, the MR here should pass without any problem.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
There are a bunch of mentions to
installed.json
andinstalled.php
left after this MR:- 99% of them occur in
FixtureManipulatorTest
(for example to verify that the original fixture'sinstalled.json
andinstalled.php
are unchanged) - 1% in
TemplateProjectTestBase
(to help generate a composer project from scratch forBuild
tests)
I think these can all be factored away, but β¦ that doesn't block removing the
composer/composer
dependency, so that's out of scope for this issue. So created follow-up issues for both: - 99% of them occur in
- Assigned to wim leers
- Status changed to Needs work
almost 2 years ago 10:23am 10 March 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π Stage::validatePackageNames() should not use the Composer API Fixed is in, updating this MRβ¦ π₯³
- Status changed to Needs review
almost 2 years ago 10:42am 10 March 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Turns out that those failures are being triggered by @phenaproxima's nice simplification in
\Drupal\fixture_manipulator\FixtureManipulator::removePackage()
β¦ but that simplification was right!Apparently somehow
composer require some/package --no-update
works even forrequire-dev
packages, but only if there's a separate subsequentcomposer update
!@phenaproxima changed it to do
composer require some/package
(without the subsequentcomposer update
), and that now fails. This is simple enough to fix though: make sure we passTRUE
toFixtureManipulator::removePackage()
calls if they're forrequire-dev
packages.Fixed in the commit I just pushed!
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
There is not a single contentious thing in here. It's deleting code that's effectively unused in HEAD.
The diffstat speaks for itself:
+25 -967
The only "change" that is introduced here is described in #46. And adding docs. Those are the last 2 commits. They're tiny in the grand scheme of things.
@phenaproxima did not spot problems in his reviews last night (see #40β#43).
Therefore, going ahead and merging this, so we can get a green core merge request going at β¨ Add Alpha level Experimental Package Manager module Needs review ! π
- Issue was unassigned.
- Status changed to RTBC
almost 2 years ago 11:15am 10 March 2023 -
Wim Leers β
committed ec8949c9 on 3.0.x
Issue #3316368 by Wim Leers, phenaproxima, tedbow: Remove our runtime...
-
Wim Leers β
committed ec8949c9 on 3.0.x
- Status changed to Fixed
almost 2 years ago 11:15am 10 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.