Skip to content
Snippets Groups Projects

Issue #3304365: Do not check excluded folders for symlinks

Merged Adam G-H requested to merge issue/automatic_updates-3304365:3304365-do-not-check into 8.x-2.x
3 files
+ 24
8
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -2,6 +2,8 @@
namespace Drupal\package_manager\Event;
use PhpTuf\ComposerStager\Infrastructure\Value\PathList\PathList;
/**
* Common functionality for events which can collect excluded paths.
*/
@@ -40,11 +42,19 @@ trait ExcludedPathsTrait {
/**
* Returns the paths to exclude from the current operation.
*
* @return string[]
* The paths to exclude.
* @param bool $return_as_object
* (optional) If TRUE, the excluded paths will be returned as an instance
* of \PhpTuf\ComposerStager\Domain\Value\PathList\PathListInterface.
* Defaults to FALSE.
*
* @return string[]|\PhpTuf\ComposerStager\Domain\Value\PathList\PathListInterface
* The paths to exclude, as an instance of
* \PhpTuf\ComposerStager\Domain\Value\PathList\PathListInterface if
* $as_path_list is TRUE, or an array of strings if FALSE.
*/
public function getExcludedPaths(): array {
return array_unique($this->excludedPaths);
public function getExcludedPaths(bool $return_as_object = FALSE) {
$excluded_paths = array_unique($this->excludedPaths);
return $return_as_object ? new PathList($excluded_paths) : $excluded_paths;
}
}
Loading