Package manager's Stage classes should always fetch a fresh tempstore

Created on 11 December 2024, 15 days ago

Problem/Motivation

\Drupal\package_manager\StageBase::__construct fetches the temp store from the factory in the constructor.
This locks the temp store to the user at that time.
The current user can change in the life of the request.

Steps to reproduce

Proposed resolution

Remove the factory call from the constructor and put it in a method.
Remove the tempStore property
Change all calls to $this->tempStore to fetch a fresh store from the factory. Multiple calls in one method should be avoided - a local variable can be used.
Fix tests that do a container rebuild after changing users - this shouldn't be needed anymore

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

package_manager.module

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

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

Comments & Activities

Production build 0.71.5 2024