Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ public function isFresh(int $timestamp): bool
return $this->exists[0] xor !$exists[0];
}

/**
* @internal
*/
public function __serialize(): array
{
if (null === $this->exists) {
Expand All @@ -116,9 +113,6 @@ public function __serialize(): array
];
}

/**
* @internal
*/
public function __unserialize(array $data): void
{
$this->resource = array_shift($data);
Expand Down
7 changes: 7 additions & 0 deletions src/Symfony/Component/Config/Resource/ComposerResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public function isFresh(int $timestamp): bool
return array_values(self::$runtimeVendors) === array_values($this->vendors);
}

public function __serialize(): array
{
return [
'vendors' => $this->vendors,
];
}

private static function refresh(): void
{
self::$runtimeVendors = [];
Expand Down
8 changes: 8 additions & 0 deletions src/Symfony/Component/Config/Resource/DirectoryResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,12 @@ public function isFresh(int $timestamp): bool

return true;
}

public function __serialize(): array
{
return [
'resource' => $this->resource,
'pattern' => $this->pattern,
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ public function isFresh(int $timestamp): bool
{
return file_exists($this->resource) === $this->exists;
}

public function __serialize(): array
{
return [
'resource' => $this->resource,
'exists' => $this->exists,
];
}
}
7 changes: 7 additions & 0 deletions src/Symfony/Component/Config/Resource/FileResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,11 @@ public function isFresh(int $timestamp): bool
{
return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp;
}

public function __serialize(): array
{
return [
'resource' => $this->resource,
];
}
}
6 changes: 0 additions & 6 deletions src/Symfony/Component/Config/Resource/GlobResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ public function isFresh(int $timestamp): bool
return $this->hash === $hash;
}

/**
* @internal
*/
public function __serialize(): array
{
$this->hash ??= $this->computeHash();
Expand All @@ -93,9 +90,6 @@ public function __serialize(): array
];
}

/**
* @internal
*/
public function __unserialize(array $data): void
{
$this->prefix = array_shift($data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ public function __toString(): string
return 'reflection.'.$this->className;
}

/**
* @internal
*/
public function __serialize(): array
{
if (!isset($this->hash)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@ public function isFresh(ResourceInterface $resource, int $timestamp): bool
{
return true;
}

public function __serialize(): array
{
return [
'skippedResourceTypes' => $this->skippedResourceTypes,
];
}
}
Loading