You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: accepted/PSR-16-simple-cache-meta.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,22 +72,22 @@ For being an early reviewer
72
72
## 8. Errata
73
73
### 8.1 Type additions
74
74
75
-
The 2.0 release of the `psr/simple-cache` package includs scalar parameter types and increases the minimum PHP version to 8.0 respectively. This is considered a backwards compatible change for implementations as PHP 7.2 introduces covariance for parameters. Any implementation of 1.0 is compatible with 2.0. For consumers, however, this reduces the types that they may pass (as previously any `string`parameter could accept a `Stringable`) and as such requires the increment of the major version.
75
+
The 2.0 release of the `psr/simple-cache` package includs scalar parameter types and increases the minimum PHP version to 8.0 respectively. This is considered a backwards compatible change for implementing libraries as PHP 7.2 introduces covariance for parameters. Any implementation of 1.0 is compatible with 2.0. For calling libraries, however, this reduces the types that they may pass (as previously any parameter that could be cast to string could be accepted) and as such requires incrementing the major version.
76
76
77
-
The 3.0 release includes return types. Return types break backwards compatibility as PHP does not support return type covariance.
77
+
The 3.0 release includes return types. Return types break backwards compatibility for implementing libraries as PHP does not support return type covariance.
78
78
79
-
Implementers MAY add return types to their own packages at their discretion, provided that:
79
+
Implementing libraries **MAY** add return types to their own packages at their discretion, provided that:
80
80
81
81
* the return types match those in the 3.0 package.
82
82
* the implementation specifies a minimum PHP version of 8.0.0 or later
83
83
* the implementation depends on `"psr/simple-cache": "^2 || ^3"` so as to exclude the untyped 1.0 version.
84
84
85
-
Implementers MAY add parameter types to their own package in a new minor release, either at the same time as adding return types or in a subsequent release, provided that:
85
+
Implementing libraries **MAY** add parameter types to their own package in a new minor release, either at the same time as adding return types or in a subsequent release, provided that:
86
86
87
87
* the parameter types match or widen those in the 2.0 package
88
88
* the implementation specifies a minimum PHP version of 8.0 if using mixed or union types or later.
89
89
* the implementation depends on `"psr/simple-cache": "^2 || ^3"` so as to exclude the untyped 1.0 version.
90
90
91
-
Implementers are encouraged, but not required to transition their packages toward the 3.0 version of the package at their earliest convenience.
91
+
Implementing libraries are encouraged, but not required to transition their packages toward the 3.0 version of the package at their earliest convenience.
92
92
93
-
Consumers are encouraged to ensure they are sending the correct types and to update their requirement to `"psr/simple-cache": "^1 || ^2 || ^3"` at their earliest convenience.
93
+
Calling libraries are encouraged to ensure they are sending the correct types and to update their requirement to `"psr/simple-cache": "^1 || ^2 || ^3"` at their earliest convenience.
0 commit comments