N°8910 - Upgrade Symfony packages (#811)

This commit is contained in:
Benjamin Dalsass
2026-02-23 06:54:26 +01:00
committed by GitHub
parent b91e6c384a
commit 4853ca444e
224 changed files with 4758 additions and 1778 deletions

View File

@@ -77,21 +77,28 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface
return $this->hash === $hash;
}
/**
* @internal
*/
public function __sleep(): array
public function __serialize(): array
{
$this->hash ??= $this->computeHash();
return ['prefix', 'pattern', 'recursive', 'hash', 'forExclusion', 'excludedPrefixes'];
return [
'prefix' => $this->prefix,
'pattern' => $this->pattern,
'recursive' => $this->recursive,
'hash' => $this->hash,
'forExclusion' => $this->forExclusion,
'excludedPrefixes' => $this->excludedPrefixes,
];
}
/**
* @internal
*/
public function __wakeup(): void
public function __unserialize(array $data): void
{
$this->prefix = array_shift($data);
$this->pattern = array_shift($data);
$this->recursive = array_shift($data);
$this->hash = array_shift($data);
$this->forExclusion = array_shift($data);
$this->excludedPrefixes = array_shift($data);
$this->globBrace = \defined('GLOB_BRACE') ? \GLOB_BRACE : 0;
}
@@ -111,7 +118,7 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface
if (class_exists(Finder::class)) {
$regex = Glob::toRegex($pattern);
if ($this->recursive) {
$regex = substr_replace($regex, '(/|$)', -2, 1);
$regex = substr_replace($regex, str_ends_with($pattern, '/') ? '' : '(/|$)', -2, 1);
}
} else {
$regex = null;