Resolve #3503699 "Make package manager"
Closes #3503699
Merge request reports
Activity
added 1 commit
- 9ed6ad3b - Allow certain Composer Stager preconditions to be bypassed
added 1 commit
- 68da2527 - Allow certain Composer Stager preconditions to be bypassed
added 1 commit
- 41aae795 - Allow certain Composer Stager preconditions to be bypassed
added 69 commits
-
41aae795...4b2f0104 - 66 commits from branch
project:11.x
- 38f73d3e - Merge branch '11.x' into 3503699-make-package-manager
- 56951d1f - Merge remote-tracking branch 'origin/11.x' into 3503699-make-package-manager
- 059f9dc6 - Require Composer 2.7+ and use minimal-changes
Toggle commit list-
41aae795...4b2f0104 - 66 commits from branch
- Resolved by Adam G-H
added 2 commits
111 111 public function validate(PreOperationStageEvent $event): void { 112 112 $stage = $event->stage; 113 113 114 // If the stage is going to change the active directory directly, we don't 115 // need to validate the lock file's consistency. 116 if ($stage->isDirectWrite()) { We don't need explicit test coverage of this.
\Drupal\Tests\package_manager\Kernel\DirectWriteTest
would fail hard if this wasn't there.Edited by Adam G-Hchanged this line in version 25 of the diff
464 481 $stage_dir = $this->pathFactory->create($this->getStageDirectory()); 465 482 466 483 $excluded_paths = $this->getPathsToExclude(); 467 484 $event = new PreApplyEvent($this, $excluded_paths); Well, it is not actually pre apply. The changes have already been applied to the site. So any subscriber that assumes it is pre-apply and thinks they can stop the changes via
\Drupal\package_manager\Event\PreOperationStageEvent::addError
is going have a nasty supriseI haven't look through the docs yet, but from my memory of them is that that change would not be very obvious. Subscribers would need to
PreRequireEvent
to stop things applying to their siteWould it be more reasonable in the direct situation to not actually make the change in
\Drupal\package_manager\StageBase::require
but just save them all up until\Drupal\package_manager\StageBase::apply
? I am not saying you should make that change but this is the kind of thing I thinking about as I review itchanged this line in version 23 of the diff
- Resolved by Adam G-H
475 492 $this->failureMarker->write($this, $this->getFailureMarkerMessage()); 476 493 477 494 try { 495 if ($this->isDirectWrite()) { 496 $this->logger?->info($this->t('Direct-write is enabled. Changes have been made to the running code base.')); changed this line in version 12 of the diff
345 347 $stage_dir = $this->pathFactory->create($this->getStageDirectory()); 346 348 347 349 $excluded_paths = $this->getPathsToExclude(); 348 350 $event = new PreCreateEvent($this, $excluded_paths); - Comment on lines 347 to 348
Isn't this event useless if you are not creating a stage? or at least sending the
$excluded_paths
is misleading. Should we even be doing$this->getPathsToExclude()
in if there won't be sandbox?Edited by Ted Bowman changed this line in version 23 of the diff
- Resolved by Adam G-H
added 208 commits
-
59fdd452...d81484de - 206 commits from branch
project:11.x
- 52c61e8f - Merge branch '11.x' into 3503699-make-package-manager
- a2fb21a9 - Don't do anything in apply() in direct-write mode
-
59fdd452...d81484de - 206 commits from branch