Skip to content

Commit 48aa9dc

Browse files
minor #30035 Mark some/most implementations of Serializable as @internal (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- Mark some/most implementations of Serializable as `@internal` | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - There are more usages of `Serializable` in the code base, but the remaining are unfortunately exposed as part of interfaces. All these places are IMHO already considered internal, this just makes it explicit. Will ease moving away from `Serializable`. Commits ------- 7b9d73d891 Mark some/most implementations of Serializable as `@internal`
2 parents 2554e23 + e06ed6f commit 48aa9dc

7 files changed

+34
-4
lines changed

Resource/ClassExistenceResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function isFresh($timestamp)
9797
}
9898

9999
/**
100-
* {@inheritdoc}
100+
* @internal
101101
*/
102102
public function serialize()
103103
{
@@ -109,7 +109,7 @@ public function serialize()
109109
}
110110

111111
/**
112-
* {@inheritdoc}
112+
* @internal
113113
*/
114114
public function unserialize($serialized)
115115
{

Resource/ComposerResource.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,17 @@ public function isFresh($timestamp)
5151
return self::$runtimeVendors === $this->vendors;
5252
}
5353

54+
/**
55+
* @internal
56+
*/
5457
public function serialize()
5558
{
5659
return serialize($this->vendors);
5760
}
5861

62+
/**
63+
* @internal
64+
*/
5965
public function unserialize($serialized)
6066
{
6167
$this->vendors = unserialize($serialized);

Resource/DirectoryResource.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,17 @@ public function isFresh($timestamp)
104104
return true;
105105
}
106106

107+
/**
108+
* @internal
109+
*/
107110
public function serialize()
108111
{
109112
return serialize([$this->resource, $this->pattern]);
110113
}
111114

115+
/**
116+
* @internal
117+
*/
112118
public function unserialize($serialized)
113119
{
114120
list($this->resource, $this->pattern) = unserialize($serialized);

Resource/FileExistenceResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ public function isFresh($timestamp)
5959
}
6060

6161
/**
62-
* {@inheritdoc}
62+
* @internal
6363
*/
6464
public function serialize()
6565
{
6666
return serialize([$this->resource, $this->exists]);
6767
}
6868

6969
/**
70-
* {@inheritdoc}
70+
* @internal
7171
*/
7272
public function unserialize($serialized)
7373
{

Resource/FileResource.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,17 @@ public function isFresh($timestamp)
6363
return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp;
6464
}
6565

66+
/**
67+
* @internal
68+
*/
6669
public function serialize()
6770
{
6871
return serialize($this->resource);
6972
}
7073

74+
/**
75+
* @internal
76+
*/
7177
public function unserialize($serialized)
7278
{
7379
$this->resource = unserialize($serialized);

Resource/GlobResource.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public function isFresh($timestamp)
7373
return $this->hash === $hash;
7474
}
7575

76+
/**
77+
* @internal
78+
*/
7679
public function serialize()
7780
{
7881
if (null === $this->hash) {
@@ -82,6 +85,9 @@ public function serialize()
8285
return serialize([$this->prefix, $this->pattern, $this->recursive, $this->hash]);
8386
}
8487

88+
/**
89+
* @internal
90+
*/
8591
public function unserialize($serialized)
8692
{
8793
list($this->prefix, $this->pattern, $this->recursive, $this->hash) = unserialize($serialized);

Resource/ReflectionClassResource.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public function __toString()
5757
return 'reflection.'.$this->className;
5858
}
5959

60+
/**
61+
* @internal
62+
*/
6063
public function serialize()
6164
{
6265
if (null === $this->hash) {
@@ -67,6 +70,9 @@ public function serialize()
6770
return serialize([$this->files, $this->className, $this->hash]);
6871
}
6972

73+
/**
74+
* @internal
75+
*/
7076
public function unserialize($serialized)
7177
{
7278
list($this->files, $this->className, $this->hash) = unserialize($serialized);

0 commit comments

Comments
 (0)