Skip to content
Snippets Groups Projects

Issue #3382942: Eliminate dependencies on Composer Stager internals

Merged Ted Bowman requested to merge issue/automatic_updates-3382942:3382942-round-3 into 3.0.x
Files
2
+ 34
0
<?php
namespace Drupal\package_manager;
use PhpTuf\ComposerStager\API\Path\Value\PathListInterface;
/**
* Defines a path list that cannot be changed.
*/
final class ImmutablePathList implements PathListInterface {
/**
* Constructs an ImmutablePathList object.
*
* @param \PhpTuf\ComposerStager\API\Path\Value\PathListInterface $decorated
* The decorated path list.
*/
public function __construct(private readonly PathListInterface $decorated) {}
/**
* {@inheritdoc}
*/
public function add(string ...$paths): never {
throw new \LogicException('Paths cannot be added to an immutable path list.');
}
/**
* {@inheritdoc}
*/
public function getAll(): array {
return $this->decorated->getAll();
}
}
Loading