Package Manager validation is only necessary if the project to install is not already in the filesystem

Created on 17 December 2024, 5 days ago

Problem/Motivation

This is spun off from πŸ“Œ Skip Package Manager validation of using the local recipes source plugin Active .

Project Browser is way too blunt about doing Package Manager validation. It does it even if it's not necessary, and won't be necessary in a particular context. We should be smarter about that, which will be better for UX, and also more performant, since Package Manager's validation is very slow.

Proposed resolution

Move the install readiness checking to \Drupal\project_browser\Controller\InstallerController::begin(). If this method is called at all, it means we're about to create a Package Manager sandbox, and that means we need to validate the state of the system.

This should happen just before we call $this->installer->create();, before the try block. If validation fails, then we need to return an error response and gracefully display it to the user. Tests will certainly need to be adjusted; some tests that were previously functional tests will probably have to be turned into functional JS tests.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024