Loading core/misc/cspell/dictionary.txt +2 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,8 @@ rowspans rtsp ruleset sameorigin sandboxed sandboxing savepoints sayre schemaapi Loading core/modules/package_manager/package_manager.api.php +7 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,8 @@ * for event subscribers to flag errors before the active directory is * modified, because once that has happened, the changes cannot be undone. * This event may be dispatched multiple times during the stage life cycle. * Note that this event is NOT dispatched when the sandbox manager is * operating in direct-write mode. * * - \Drupal\package_manager\Event\PostApplyEvent * Dispatched after changes in the stage directory have been copied to the Loading @@ -109,6 +111,11 @@ * life cycle, and should *never* be used for schema changes (i.e., operations * that should happen in `hook_update_N()` or a post-update function). * * Since the apply events are not dispatched in direct-write mode, event * subscribers that want to prevent a sandbox from moving through its life cycle * in direct-write mode should do it by subscribing to PreCreateEvent or * StatusCheckEvent. * * @section sec_stage_api Stage API: Public methods * The public API of any stage consists of the following methods: * Loading core/modules/package_manager/package_manager.services.yml +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ services: Drupal\package_manager\EventSubscriber\ChangeLogger: calls: - [setLogger, ['@logger.channel.package_manager_change_log']] Drupal\package_manager\EventSubscriber\DirectWriteSubscriber: {} Drupal\package_manager\ComposerInspector: {} # Validators. Loading Loading @@ -201,3 +202,9 @@ services: PhpTuf\ComposerStager\Internal\Translation\Service\SymfonyTranslatorProxyInterface: class: PhpTuf\ComposerStager\Internal\Translation\Service\SymfonyTranslatorProxy public: false Drupal\package_manager\DirectWritePreconditionBypass: decorates: 'PhpTuf\ComposerStager\API\Precondition\Service\ActiveAndStagingDirsAreDifferentInterface' arguments: - '@.inner' public: false core/modules/package_manager/src/Attribute/AllowDirectWrite.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php declare(strict_types=1); namespace Drupal\package_manager\Attribute; /** * Identifies sandbox managers which can operate on the running code base. * * Package Manager normally creates and operates on a fully separate, sandboxed * copy of the site. This is pretty safe, but not always necessary for certain * kinds of operations (e.g., adding a new module to the site). * SandboxManagerBase subclasses with this attribute are allowed to skip the * sandboxing and operate directly on the live site, but ONLY if the * `package_manager_allow_direct_write` setting is set to TRUE. * * @see \Drupal\package_manager\SandboxManagerBase::isDirectWrite() */ #[\Attribute(\Attribute::TARGET_CLASS)] final class AllowDirectWrite { } core/modules/package_manager/src/ComposerInspector.php +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ class ComposerInspector implements LoggerAwareInterface { * * @var string */ final public const SUPPORTED_VERSION = '^2.6'; final public const SUPPORTED_VERSION = '^2.7'; public function __construct( private readonly ComposerProcessRunnerInterface $runner, Loading Loading
core/misc/cspell/dictionary.txt +2 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,8 @@ rowspans rtsp ruleset sameorigin sandboxed sandboxing savepoints sayre schemaapi Loading
core/modules/package_manager/package_manager.api.php +7 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,8 @@ * for event subscribers to flag errors before the active directory is * modified, because once that has happened, the changes cannot be undone. * This event may be dispatched multiple times during the stage life cycle. * Note that this event is NOT dispatched when the sandbox manager is * operating in direct-write mode. * * - \Drupal\package_manager\Event\PostApplyEvent * Dispatched after changes in the stage directory have been copied to the Loading @@ -109,6 +111,11 @@ * life cycle, and should *never* be used for schema changes (i.e., operations * that should happen in `hook_update_N()` or a post-update function). * * Since the apply events are not dispatched in direct-write mode, event * subscribers that want to prevent a sandbox from moving through its life cycle * in direct-write mode should do it by subscribing to PreCreateEvent or * StatusCheckEvent. * * @section sec_stage_api Stage API: Public methods * The public API of any stage consists of the following methods: * Loading
core/modules/package_manager/package_manager.services.yml +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ services: Drupal\package_manager\EventSubscriber\ChangeLogger: calls: - [setLogger, ['@logger.channel.package_manager_change_log']] Drupal\package_manager\EventSubscriber\DirectWriteSubscriber: {} Drupal\package_manager\ComposerInspector: {} # Validators. Loading Loading @@ -201,3 +202,9 @@ services: PhpTuf\ComposerStager\Internal\Translation\Service\SymfonyTranslatorProxyInterface: class: PhpTuf\ComposerStager\Internal\Translation\Service\SymfonyTranslatorProxy public: false Drupal\package_manager\DirectWritePreconditionBypass: decorates: 'PhpTuf\ComposerStager\API\Precondition\Service\ActiveAndStagingDirsAreDifferentInterface' arguments: - '@.inner' public: false
core/modules/package_manager/src/Attribute/AllowDirectWrite.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php declare(strict_types=1); namespace Drupal\package_manager\Attribute; /** * Identifies sandbox managers which can operate on the running code base. * * Package Manager normally creates and operates on a fully separate, sandboxed * copy of the site. This is pretty safe, but not always necessary for certain * kinds of operations (e.g., adding a new module to the site). * SandboxManagerBase subclasses with this attribute are allowed to skip the * sandboxing and operate directly on the live site, but ONLY if the * `package_manager_allow_direct_write` setting is set to TRUE. * * @see \Drupal\package_manager\SandboxManagerBase::isDirectWrite() */ #[\Attribute(\Attribute::TARGET_CLASS)] final class AllowDirectWrite { }
core/modules/package_manager/src/ComposerInspector.php +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ class ComposerInspector implements LoggerAwareInterface { * * @var string */ final public const SUPPORTED_VERSION = '^2.6'; final public const SUPPORTED_VERSION = '^2.7'; public function __construct( private readonly ComposerProcessRunnerInterface $runner, Loading