Merge ~athos-ribeiro/ubuntu/+source/symfony:merge-lp1973123-kinetic into ubuntu/+source/symfony:debian/sid
- Git
- lp:~athos-ribeiro/ubuntu/+source/symfony
- merge-lp1973123-kinetic
- Merge into debian/sid
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Athos Ribeiro | ||||
Merged at revision: | 43cbb1c974ec1fd6cf073f1a53e92e9153b84ed8 | ||||
Proposed branch: | ~athos-ribeiro/ubuntu/+source/symfony:merge-lp1973123-kinetic | ||||
Merge into: | ubuntu/+source/symfony:debian/sid | ||||
Diff against target: |
2448 lines (+2292/-33) 11 files modified
debian/changelog (+95/-0) debian/control (+2/-1) debian/patches/add-return-types.patch (+1918/-0) debian/patches/drop-conflict-email-validator.patch (+2/-17) debian/patches/implement-psr-cache-3.patch (+31/-0) debian/patches/implement-psr-container-2.patch (+62/-0) debian/patches/implement-psr-link-2.patch (+51/-0) debian/patches/implement-psr-log-3.patch (+110/-0) debian/patches/series (+6/-1) debian/rules (+13/-13) debian/tests/control (+2/-1) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bryce Harrington (community) | Approve | ||
Canonical Server packageset reviewers | Pending | ||
git-ubuntu import | Pending | ||
Review via email: mp+423932@code.launchpad.net |
Commit message
Description of the change
PPA: https:/
Bileto: https:/
The latest Symfony version dropped php-symfony-
However, since Symfony contains circular dependencies, we will need a 2-step build to get rid of those autoload injections for our symfony packages.
The first proposed upload, will build successfully but will fail to migrate, since the reverse dependency tests will require polyfill, which should be no longer in the synfony stack dependencies.
Then, the second upload will get rid of those autoload calls to polyfill and the reverse dependency tests should be able to proceed.
Hence, this MP is proposing an upload for this merge, and a second no change rebuild upload.
Athos Ribeiro (athos-ribeiro) wrote : | # |
Bryce Harrington (bryce) wrote : | # |
Looks good, +1.
I have PTSD looking at the Ubuntu delta here ;-)
Maybe some day we can drop it, but for now it all still looks applicable.
In theory this would be worth forwarding to Debian, however until they move to the same PSR version its not going to be pertinent for them. However, there might be some utility in filing one bug report and/or branch with them containing the patches on top of their package.
The approach of double uploading to clear the build first, then the migration, is the typical pattern for symfony, so +1 on that. I don't think there's an easier solution than that.
If the circular dependencies get confusing, don't be shy about grabbing me, even just for having a 2nd pair of eyes.
Athos Ribeiro (athos-ribeiro) wrote : | # |
Thanks Bryce!
Uploaded and performed a no change rebuild after the first one was complete.
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog |
2 | index fa7943f..706cf8d 100644 |
3 | --- a/debian/changelog |
4 | +++ b/debian/changelog |
5 | @@ -1,3 +1,30 @@ |
6 | +symfony (5.4.9+dfsg-1ubuntu1) kinetic; urgency=medium |
7 | + |
8 | + * Merge with Debian unstable (LP: #1973123). Remaining changes: |
9 | + - d/rules: Disable running phpunit testsuite during build. |
10 | + - d/p/implement-psr-log-3.patch: Implement psr/log 3 |
11 | + - Drop d/p/Adapt-conflict-to-Debian-expectations.patch: |
12 | + Unnecessary and causes conflict for php-email-validator |
13 | + - d/p/implement-psr-link-2.patch: Implement psr/link2 for php8.1 |
14 | + - d/p/drop-conflict-email-validator.patch: Drop conflicts for |
15 | + php-email-validator to allow version 3.1.2-1. |
16 | + - d/p/implement-psr-container-2.patch: Allow php-psr-container 2.0.2 |
17 | + - d/p/implement-psr-cache-3.patch: Allow php-psr-cache 3.0 for php8.1 |
18 | + - d/t/control: Mark tests flaky for now due to remaining php8.1 |
19 | + inadequacies. |
20 | + + Many more routines require return types specified in order for tests |
21 | + to pass successfully with psr/container 3. The upstream patches for |
22 | + this are large and not available until symfony 6.0.0. |
23 | + - d/p/add-return-types.patch: Add return types required for |
24 | + psr components, to resolve autopkgtest failures. |
25 | + * New changes: |
26 | + - d/t/control: require php-cache-tag-interop for cache integration |
27 | + tests autoloader. This was once provided by |
28 | + php-cache-integration-tests, but has been dropped there to allow |
29 | + migration to new PSR stack. |
30 | + |
31 | + -- Athos Ribeiro <athos.ribeiro@canonical.com> Thu, 02 Jun 2022 18:29:45 -0300 |
32 | + |
33 | symfony (5.4.9+dfsg-1) unstable; urgency=medium |
34 | |
35 | [ Fabien Potencier ] |
36 | @@ -25,6 +52,74 @@ symfony (5.4.6+dfsg-1) unstable; urgency=medium |
37 | |
38 | -- David Prévot <taffit@debian.org> Sun, 06 Mar 2022 22:17:14 +0100 |
39 | |
40 | +symfony (5.4.4+dfsg-1ubuntu8) jammy; urgency=medium |
41 | + |
42 | + * d/p/add-return-types.patch: Expand patch to include a bunch of |
43 | + additional param and return types for routines, as required for |
44 | + autopkgtests for php-twig, doctrine-related components, and |
45 | + phpmyadmin. This should bring most things up to conformance with |
46 | + the PSR components shipped in Ubuntu 22.04, yet may differ slightly |
47 | + from what is shipping upstream. |
48 | + |
49 | + -- Bryce Harrington <bryce@canonical.com> Sat, 12 Mar 2022 03:18:25 +0000 |
50 | + |
51 | +symfony (5.4.4+dfsg-1ubuntu7) jammy; urgency=medium |
52 | + |
53 | + * d/p/add-return-types.patch: Modify patch to add another necessary |
54 | + get() return type. |
55 | + |
56 | + -- Bryce Harrington <bryce@canonical.com> Sun, 06 Mar 2022 01:48:46 +0000 |
57 | + |
58 | +symfony (5.4.4+dfsg-1ubuntu6) jammy; urgency=medium |
59 | + |
60 | + * d/p/add-return-types.patch: Add return types required for |
61 | + psr/container 3, to resolve autopkgtest failures. |
62 | + * d/t/control: Mark tests flaky for now due to remaining php8.1 |
63 | + inadequacies. |
64 | + - Many more routines require return types specified in order for tests |
65 | + to pass successfully with psr/container 3. The upstream patches for |
66 | + this are large and not available until symfony 6.0.0. |
67 | + |
68 | + -- Bryce Harrington <bryce@canonical.com> Sat, 05 Mar 2022 12:19:15 +0000 |
69 | + |
70 | +symfony (5.4.4+dfsg-1ubuntu5) jammy; urgency=medium |
71 | + |
72 | + * d/p/implement-psr-link-2.patch: Implement psr/link2 for php8.1 |
73 | + * d/p/implement-psr-container-2.patch: Allow php-psr-container 2.0.2 |
74 | + * d/p/implement-psr-cache-3.patch: Allow php-psr-cache 3.0 for php8.1 |
75 | + * Drop d/p/Adapt-conflict-to-Debian-expectations.patch: - |
76 | + Unnecessary and causes conflict for php-email-validator 3.1.2 |
77 | + now available in Jammy |
78 | + * d/p/drop-conflict-email-validator.patch: Drop conflicts for |
79 | + php-email-validator to allow version 3.1.2-1. |
80 | + |
81 | + -- Bryce Harrington <bryce@canonical.com> Wed, 02 Mar 2022 22:06:38 +0000 |
82 | + |
83 | +symfony (5.4.4+dfsg-1ubuntu4) jammy; urgency=medium |
84 | + |
85 | + * d/p/implement-psr-log-3.patch: Implement psr/log 3 |
86 | + |
87 | + -- Bryce Harrington <bryce@canonical.com> Mon, 28 Feb 2022 17:59:44 +0000 |
88 | + |
89 | +symfony (5.4.4+dfsg-1ubuntu3) jammy; urgency=medium |
90 | + |
91 | + * No change rebuild against newer doctrine |
92 | + |
93 | + -- Bryce Harrington <bryce@canonical.com> Thu, 24 Feb 2022 11:05:07 -0800 |
94 | + |
95 | +symfony (5.4.4+dfsg-1ubuntu2) jammy; urgency=medium |
96 | + |
97 | + * No change rebuild (hopefully against newer php-psr-log) |
98 | + |
99 | + -- Bryce Harrington <bryce@canonical.com> Tue, 15 Feb 2022 22:55:37 +0000 |
100 | + |
101 | +symfony (5.4.4+dfsg-1ubuntu1) jammy; urgency=medium |
102 | + |
103 | + * Merge from Debian. Remaining changes: |
104 | + - d/rules: Disable running phpunit testsuite during build. |
105 | + |
106 | + -- Bryce Harrington <bryce@canonical.com> Fri, 11 Feb 2022 19:42:35 +0000 |
107 | + |
108 | symfony (5.4.4+dfsg-1) unstable; urgency=medium |
109 | |
110 | [ Fabien Potencier ] |
111 | diff --git a/debian/control b/debian/control |
112 | index e6f03b9..faf7a8f 100644 |
113 | --- a/debian/control |
114 | +++ b/debian/control |
115 | @@ -1,5 +1,6 @@ |
116 | Source: symfony |
117 | -Maintainer: Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org> |
118 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
119 | +XSBC-Original-Maintainer: Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org> |
120 | Uploaders: Daniel Beyer <dabe@deb.ymc.ch>, David Prévot <taffit@debian.org> |
121 | Section: php |
122 | Priority: optional |
123 | diff --git a/debian/patches/add-return-types.patch b/debian/patches/add-return-types.patch |
124 | new file mode 100644 |
125 | index 0000000..53ec18a |
126 | --- /dev/null |
127 | +++ b/debian/patches/add-return-types.patch |
128 | @@ -0,0 +1,1918 @@ |
129 | +Origin: https://github.com/symfony/symfony/commit/44b1a7a57eec2a80f94950a7b1a4271f09d94ee9 |
130 | + |
131 | + |
132 | +--- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TranslationsCacheWarmer.php |
133 | ++++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TranslationsCacheWarmer.php |
134 | +@@ -62,7 +62,7 @@ |
135 | + /** |
136 | + * {@inheritdoc} |
137 | + */ |
138 | +- public static function getSubscribedServices() |
139 | ++ public static function getSubscribedServices(): array |
140 | + { |
141 | + return [ |
142 | + 'translator' => TranslatorInterface::class, |
143 | +--- a/src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php |
144 | ++++ b/src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php |
145 | +@@ -86,7 +86,7 @@ |
146 | + return $this->container->get('parameter_bag')->get($name); |
147 | + } |
148 | + |
149 | +- public static function getSubscribedServices() |
150 | ++ public static function getSubscribedServices(): array |
151 | + { |
152 | + return [ |
153 | + 'router' => '?'.RouterInterface::class, |
154 | +--- a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php |
155 | ++++ b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php |
156 | +@@ -201,7 +201,7 @@ |
157 | + /** |
158 | + * {@inheritdoc} |
159 | + */ |
160 | +- public static function getSubscribedServices() |
161 | ++ public static function getSubscribedServices(): array |
162 | + { |
163 | + return [ |
164 | + 'routing.loader' => LoaderInterface::class, |
165 | +--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php |
166 | ++++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php |
167 | +@@ -22,6 +22,7 @@ |
168 | + use Symfony\Component\Translation\Loader\LoaderInterface; |
169 | + use Symfony\Component\Translation\Loader\YamlFileLoader; |
170 | + use Symfony\Component\Translation\MessageCatalogue; |
171 | ++use Symfony\Contracts\Translation\TranslatorInterface; |
172 | + |
173 | + class TranslatorTest extends TestCase |
174 | + { |
175 | +@@ -310,7 +311,7 @@ |
176 | + return $container; |
177 | + } |
178 | + |
179 | +- public function getTranslator($loader, $options = [], $loaderFomat = 'loader', $translatorClass = Translator::class, $defaultLocale = 'en', array $enabledLocales = []) |
180 | ++ public function getTranslator($loader, $options = [], $loaderFomat = 'loader', $translatorClass = Translator::class, $defaultLocale = 'en', array $enabledLocales = []): TranslatorInterface |
181 | + { |
182 | + $translator = $this->createTranslator($loader, $options, $translatorClass, $loaderFomat, $defaultLocale, $enabledLocales); |
183 | + |
184 | +--- a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php |
185 | ++++ b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php |
186 | +@@ -81,7 +81,7 @@ |
187 | + /** |
188 | + * {@inheritdoc} |
189 | + */ |
190 | +- public static function getSubscribedServices() |
191 | ++ public static function getSubscribedServices(): array |
192 | + { |
193 | + return [ |
194 | + 'twig' => Environment::class, |
195 | +--- a/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php |
196 | ++++ b/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php |
197 | +@@ -285,7 +285,7 @@ |
198 | + /** |
199 | + * {@inheritdoc} |
200 | + */ |
201 | +- public function invalidateTags(array $tags) |
202 | ++ public function invalidateTags(array $tags): bool |
203 | + { |
204 | + if (empty($tags)) { |
205 | + return false; |
206 | +--- a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php |
207 | ++++ b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php |
208 | +@@ -73,7 +73,7 @@ |
209 | + /** |
210 | + * {@inheritdoc} |
211 | + */ |
212 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) |
213 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed |
214 | + { |
215 | + $item = $this->getItem($key); |
216 | + $metadata = $item->getMetadata(); |
217 | +@@ -97,10 +97,8 @@ |
218 | + |
219 | + /** |
220 | + * {@inheritdoc} |
221 | +- * |
222 | +- * @return bool |
223 | + */ |
224 | +- public function hasItem($key) |
225 | ++ public function hasItem(mixed $key): bool |
226 | + { |
227 | + if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > microtime(true)) { |
228 | + if ($this->maxItems) { |
229 | +@@ -120,7 +118,7 @@ |
230 | + /** |
231 | + * {@inheritdoc} |
232 | + */ |
233 | +- public function getItem($key) |
234 | ++ public function getItem(mixed $key): CacheItem |
235 | + { |
236 | + if (!$isHit = $this->hasItem($key)) { |
237 | + $value = null; |
238 | +@@ -139,7 +137,7 @@ |
239 | + /** |
240 | + * {@inheritdoc} |
241 | + */ |
242 | +- public function getItems(array $keys = []) |
243 | ++ public function getItems(array $keys = []): iterable |
244 | + { |
245 | + \assert(self::validateKeys($keys)); |
246 | + |
247 | +@@ -148,10 +146,8 @@ |
248 | + |
249 | + /** |
250 | + * {@inheritdoc} |
251 | +- * |
252 | +- * @return bool |
253 | + */ |
254 | +- public function deleteItem($key) |
255 | ++ public function deleteItem(mixed $key): bool |
256 | + { |
257 | + \assert('' !== CacheItem::validateKey($key)); |
258 | + unset($this->values[$key], $this->expiries[$key]); |
259 | +@@ -161,10 +157,8 @@ |
260 | + |
261 | + /** |
262 | + * {@inheritdoc} |
263 | +- * |
264 | +- * @return bool |
265 | + */ |
266 | +- public function deleteItems(array $keys) |
267 | ++ public function deleteItems(array $keys): bool |
268 | + { |
269 | + foreach ($keys as $key) { |
270 | + $this->deleteItem($key); |
271 | +@@ -175,10 +169,8 @@ |
272 | + |
273 | + /** |
274 | + * {@inheritdoc} |
275 | +- * |
276 | +- * @return bool |
277 | + */ |
278 | +- public function save(CacheItemInterface $item) |
279 | ++ public function save(CacheItemInterface $item): bool |
280 | + { |
281 | + if (!$item instanceof CacheItem) { |
282 | + return false; |
283 | +@@ -230,30 +222,24 @@ |
284 | + |
285 | + /** |
286 | + * {@inheritdoc} |
287 | +- * |
288 | +- * @return bool |
289 | + */ |
290 | +- public function saveDeferred(CacheItemInterface $item) |
291 | ++ public function saveDeferred(CacheItemInterface $item): bool |
292 | + { |
293 | + return $this->save($item); |
294 | + } |
295 | + |
296 | + /** |
297 | + * {@inheritdoc} |
298 | +- * |
299 | +- * @return bool |
300 | + */ |
301 | +- public function commit() |
302 | ++ public function commit(): bool |
303 | + { |
304 | + return true; |
305 | + } |
306 | + |
307 | + /** |
308 | + * {@inheritdoc} |
309 | +- * |
310 | +- * @return bool |
311 | + */ |
312 | +- public function clear(string $prefix = '') |
313 | ++ public function clear(string $prefix = ''): bool |
314 | + { |
315 | + if ('' !== $prefix) { |
316 | + $now = microtime(true); |
317 | +@@ -276,10 +262,8 @@ |
318 | + |
319 | + /** |
320 | + * Returns all cached values, with cache miss as null. |
321 | +- * |
322 | +- * @return array |
323 | + */ |
324 | +- public function getValues() |
325 | ++ public function getValues(): array |
326 | + { |
327 | + if (!$this->storeSerialized) { |
328 | + return $this->values; |
329 | +--- a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php |
330 | ++++ b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php |
331 | +@@ -92,7 +92,7 @@ |
332 | + /** |
333 | + * {@inheritdoc} |
334 | + */ |
335 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) |
336 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed |
337 | + { |
338 | + $lastItem = null; |
339 | + $i = 0; |
340 | +@@ -120,7 +120,7 @@ |
341 | + /** |
342 | + * {@inheritdoc} |
343 | + */ |
344 | +- public function getItem($key) |
345 | ++ public function getItem(mixed $key): CacheItem |
346 | + { |
347 | + $syncItem = self::$syncItem; |
348 | + $misses = []; |
349 | +@@ -145,7 +145,7 @@ |
350 | + /** |
351 | + * {@inheritdoc} |
352 | + */ |
353 | +- public function getItems(array $keys = []) |
354 | ++ public function getItems(array $keys = []): iterable |
355 | + { |
356 | + return $this->generateItems($this->adapters[0]->getItems($keys), 0); |
357 | + } |
358 | +@@ -183,10 +183,8 @@ |
359 | + |
360 | + /** |
361 | + * {@inheritdoc} |
362 | +- * |
363 | +- * @return bool |
364 | + */ |
365 | +- public function hasItem($key) |
366 | ++ public function hasItem(mixed $key): bool |
367 | + { |
368 | + foreach ($this->adapters as $adapter) { |
369 | + if ($adapter->hasItem($key)) { |
370 | +@@ -199,10 +197,8 @@ |
371 | + |
372 | + /** |
373 | + * {@inheritdoc} |
374 | +- * |
375 | +- * @return bool |
376 | + */ |
377 | +- public function clear(string $prefix = '') |
378 | ++ public function clear(string $prefix = ''): bool |
379 | + { |
380 | + $cleared = true; |
381 | + $i = $this->adapterCount; |
382 | +@@ -220,10 +216,8 @@ |
383 | + |
384 | + /** |
385 | + * {@inheritdoc} |
386 | +- * |
387 | +- * @return bool |
388 | + */ |
389 | +- public function deleteItem($key) |
390 | ++ public function deleteItem(mixed $key): bool |
391 | + { |
392 | + $deleted = true; |
393 | + $i = $this->adapterCount; |
394 | +@@ -237,10 +231,8 @@ |
395 | + |
396 | + /** |
397 | + * {@inheritdoc} |
398 | +- * |
399 | +- * @return bool |
400 | + */ |
401 | +- public function deleteItems(array $keys) |
402 | ++ public function deleteItems(array $keys): bool |
403 | + { |
404 | + $deleted = true; |
405 | + $i = $this->adapterCount; |
406 | +@@ -254,10 +246,8 @@ |
407 | + |
408 | + /** |
409 | + * {@inheritdoc} |
410 | +- * |
411 | +- * @return bool |
412 | + */ |
413 | +- public function save(CacheItemInterface $item) |
414 | ++ public function save(CacheItemInterface $item): bool |
415 | + { |
416 | + $saved = true; |
417 | + $i = $this->adapterCount; |
418 | +@@ -271,10 +261,8 @@ |
419 | + |
420 | + /** |
421 | + * {@inheritdoc} |
422 | +- * |
423 | +- * @return bool |
424 | + */ |
425 | +- public function saveDeferred(CacheItemInterface $item) |
426 | ++ public function saveDeferred(CacheItemInterface $item): bool |
427 | + { |
428 | + $saved = true; |
429 | + $i = $this->adapterCount; |
430 | +@@ -288,10 +276,8 @@ |
431 | + |
432 | + /** |
433 | + * {@inheritdoc} |
434 | +- * |
435 | +- * @return bool |
436 | + */ |
437 | +- public function commit() |
438 | ++ public function commit(): bool |
439 | + { |
440 | + $committed = true; |
441 | + $i = $this->adapterCount; |
442 | +@@ -306,7 +292,7 @@ |
443 | + /** |
444 | + * {@inheritdoc} |
445 | + */ |
446 | +- public function prune() |
447 | ++ public function prune(): bool |
448 | + { |
449 | + $pruned = true; |
450 | + |
451 | +--- a/src/Symfony/Component/Cache/Adapter/NullAdapter.php |
452 | ++++ b/src/Symfony/Component/Cache/Adapter/NullAdapter.php |
453 | +@@ -40,7 +40,7 @@ |
454 | + /** |
455 | + * {@inheritdoc} |
456 | + */ |
457 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) |
458 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed |
459 | + { |
460 | + $save = true; |
461 | + |
462 | +@@ -50,7 +50,7 @@ |
463 | + /** |
464 | + * {@inheritdoc} |
465 | + */ |
466 | +- public function getItem($key) |
467 | ++ public function getItem(mixed $key): CacheItem |
468 | + { |
469 | + return (self::$createCacheItem)($key); |
470 | + } |
471 | +@@ -58,77 +58,63 @@ |
472 | + /** |
473 | + * {@inheritdoc} |
474 | + */ |
475 | +- public function getItems(array $keys = []) |
476 | ++ public function getItems(array $keys = []): iterable |
477 | + { |
478 | + return $this->generateItems($keys); |
479 | + } |
480 | + |
481 | + /** |
482 | + * {@inheritdoc} |
483 | +- * |
484 | +- * @return bool |
485 | + */ |
486 | +- public function hasItem($key) |
487 | ++ public function hasItem($key): bool |
488 | + { |
489 | + return false; |
490 | + } |
491 | + |
492 | + /** |
493 | + * {@inheritdoc} |
494 | +- * |
495 | +- * @return bool |
496 | + */ |
497 | +- public function clear(string $prefix = '') |
498 | ++ public function clear(string $prefix = ''): bool |
499 | + { |
500 | + return true; |
501 | + } |
502 | + |
503 | + /** |
504 | + * {@inheritdoc} |
505 | +- * |
506 | +- * @return bool |
507 | + */ |
508 | +- public function deleteItem($key) |
509 | ++ public function deleteItem($key): bool |
510 | + { |
511 | + return true; |
512 | + } |
513 | + |
514 | + /** |
515 | + * {@inheritdoc} |
516 | +- * |
517 | +- * @return bool |
518 | + */ |
519 | +- public function deleteItems(array $keys) |
520 | ++ public function deleteItems(array $keys): bool |
521 | + { |
522 | + return true; |
523 | + } |
524 | + |
525 | + /** |
526 | + * {@inheritdoc} |
527 | +- * |
528 | +- * @return bool |
529 | + */ |
530 | +- public function save(CacheItemInterface $item) |
531 | ++ public function save(CacheItemInterface $item): bool |
532 | + { |
533 | + return true; |
534 | + } |
535 | + |
536 | + /** |
537 | + * {@inheritdoc} |
538 | +- * |
539 | +- * @return bool |
540 | + */ |
541 | +- public function saveDeferred(CacheItemInterface $item) |
542 | ++ public function saveDeferred(CacheItemInterface $item): bool |
543 | + { |
544 | + return true; |
545 | + } |
546 | + |
547 | + /** |
548 | + * {@inheritdoc} |
549 | +- * |
550 | +- * @return bool |
551 | + */ |
552 | +- public function commit() |
553 | ++ public function commit(): bool |
554 | + { |
555 | + return true; |
556 | + } |
557 | +--- a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php |
558 | ++++ b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php |
559 | +@@ -71,7 +71,7 @@ |
560 | + * |
561 | + * @return CacheItemPoolInterface |
562 | + */ |
563 | +- public static function create(string $file, CacheItemPoolInterface $fallbackPool) |
564 | ++ public static function create(string $file, CacheItemPoolInterface $fallbackPool): CacheItemPoolInterface |
565 | + { |
566 | + if (!$fallbackPool instanceof AdapterInterface) { |
567 | + $fallbackPool = new ProxyAdapter($fallbackPool); |
568 | +@@ -83,7 +83,7 @@ |
569 | + /** |
570 | + * {@inheritdoc} |
571 | + */ |
572 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) |
573 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed |
574 | + { |
575 | + if (null === $this->values) { |
576 | + $this->initialize(); |
577 | +@@ -116,7 +116,7 @@ |
578 | + /** |
579 | + * {@inheritdoc} |
580 | + */ |
581 | +- public function getItem($key) |
582 | ++ public function getItem(mixed $key): CacheItem |
583 | + { |
584 | + if (!\is_string($key)) { |
585 | + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); |
586 | +@@ -148,7 +148,7 @@ |
587 | + /** |
588 | + * {@inheritdoc} |
589 | + */ |
590 | +- public function getItems(array $keys = []) |
591 | ++ public function getItems(array $keys = []): iterable |
592 | + { |
593 | + foreach ($keys as $key) { |
594 | + if (!\is_string($key)) { |
595 | +@@ -164,10 +164,8 @@ |
596 | + |
597 | + /** |
598 | + * {@inheritdoc} |
599 | +- * |
600 | +- * @return bool |
601 | + */ |
602 | +- public function hasItem($key) |
603 | ++ public function hasItem(mixed $key): bool |
604 | + { |
605 | + if (!\is_string($key)) { |
606 | + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); |
607 | +@@ -181,10 +179,8 @@ |
608 | + |
609 | + /** |
610 | + * {@inheritdoc} |
611 | +- * |
612 | +- * @return bool |
613 | + */ |
614 | +- public function deleteItem($key) |
615 | ++ public function deleteItem(mixed $key): bool |
616 | + { |
617 | + if (!\is_string($key)) { |
618 | + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); |
619 | +@@ -198,10 +194,8 @@ |
620 | + |
621 | + /** |
622 | + * {@inheritdoc} |
623 | +- * |
624 | +- * @return bool |
625 | + */ |
626 | +- public function deleteItems(array $keys) |
627 | ++ public function deleteItems(array $keys): bool |
628 | + { |
629 | + $deleted = true; |
630 | + $fallbackKeys = []; |
631 | +@@ -230,10 +224,8 @@ |
632 | + |
633 | + /** |
634 | + * {@inheritdoc} |
635 | +- * |
636 | +- * @return bool |
637 | + */ |
638 | +- public function save(CacheItemInterface $item) |
639 | ++ public function save(CacheItemInterface $item): bool |
640 | + { |
641 | + if (null === $this->values) { |
642 | + $this->initialize(); |
643 | +@@ -244,10 +236,8 @@ |
644 | + |
645 | + /** |
646 | + * {@inheritdoc} |
647 | +- * |
648 | +- * @return bool |
649 | + */ |
650 | +- public function saveDeferred(CacheItemInterface $item) |
651 | ++ public function saveDeferred(CacheItemInterface $item): bool |
652 | + { |
653 | + if (null === $this->values) { |
654 | + $this->initialize(); |
655 | +@@ -258,20 +248,16 @@ |
656 | + |
657 | + /** |
658 | + * {@inheritdoc} |
659 | +- * |
660 | +- * @return bool |
661 | + */ |
662 | +- public function commit() |
663 | ++ public function commit(): bool |
664 | + { |
665 | + return $this->pool->commit(); |
666 | + } |
667 | + |
668 | + /** |
669 | + * {@inheritdoc} |
670 | +- * |
671 | +- * @return bool |
672 | + */ |
673 | +- public function clear(string $prefix = '') |
674 | ++ public function clear(string $prefix = ''): bool |
675 | + { |
676 | + $this->keys = $this->values = []; |
677 | + |
678 | +@@ -292,7 +278,7 @@ |
679 | + * |
680 | + * @return string[] A list of classes to preload on PHP 7.4+ |
681 | + */ |
682 | +- public function warmUp(array $values) |
683 | ++ public function warmUp(array $values): array |
684 | + { |
685 | + if (file_exists($this->file)) { |
686 | + if (!is_file($this->file)) { |
687 | +--- a/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php |
688 | ++++ b/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php |
689 | +@@ -102,7 +102,7 @@ |
690 | + /** |
691 | + * {@inheritdoc} |
692 | + */ |
693 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) |
694 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed |
695 | + { |
696 | + if (!$this->pool instanceof CacheInterface) { |
697 | + return $this->doGet($this, $key, $callback, $beta, $metadata); |
698 | +--- a/src/Symfony/Component/Cache/Adapter/TagAwareAdapterInterface.php |
699 | ++++ b/src/Symfony/Component/Cache/Adapter/TagAwareAdapterInterface.php |
700 | +@@ -29,5 +29,5 @@ |
701 | + * |
702 | + * @throws InvalidArgumentException When $tags is not valid |
703 | + */ |
704 | +- public function invalidateTags(array $tags); |
705 | ++ public function invalidateTags(array $tags): bool; |
706 | + } |
707 | +--- a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php |
708 | ++++ b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php |
709 | +@@ -114,7 +114,7 @@ |
710 | + /** |
711 | + * {@inheritdoc} |
712 | + */ |
713 | +- public function invalidateTags(array $tags) |
714 | ++ public function invalidateTags(array $tags): bool |
715 | + { |
716 | + $ids = []; |
717 | + foreach ($tags as $tag) { |
718 | +@@ -128,10 +128,8 @@ |
719 | + |
720 | + /** |
721 | + * {@inheritdoc} |
722 | +- * |
723 | +- * @return bool |
724 | + */ |
725 | +- public function hasItem($key) |
726 | ++ public function hasItem(mixed $key): bool |
727 | + { |
728 | + if (\is_string($key) && isset($this->deferred[$key])) { |
729 | + $this->commit(); |
730 | +@@ -163,7 +161,7 @@ |
731 | + /** |
732 | + * {@inheritdoc} |
733 | + */ |
734 | +- public function getItem($key) |
735 | ++ public function getItem(mixed $key): CacheItem |
736 | + { |
737 | + foreach ($this->getItems([$key]) as $item) { |
738 | + return $item; |
739 | +@@ -175,7 +173,7 @@ |
740 | + /** |
741 | + * {@inheritdoc} |
742 | + */ |
743 | +- public function getItems(array $keys = []) |
744 | ++ public function getItems(array $keys = []): iterable |
745 | + { |
746 | + $tagKeys = []; |
747 | + $commit = false; |
748 | +@@ -205,10 +203,8 @@ |
749 | + |
750 | + /** |
751 | + * {@inheritdoc} |
752 | +- * |
753 | +- * @return bool |
754 | + */ |
755 | +- public function clear(string $prefix = '') |
756 | ++ public function clear(string $prefix = ''): bool |
757 | + { |
758 | + if ('' !== $prefix) { |
759 | + foreach ($this->deferred as $key => $item) { |
760 | +@@ -229,20 +225,16 @@ |
761 | + |
762 | + /** |
763 | + * {@inheritdoc} |
764 | +- * |
765 | +- * @return bool |
766 | + */ |
767 | +- public function deleteItem($key) |
768 | ++ public function deleteItem(mixed $key): bool |
769 | + { |
770 | + return $this->deleteItems([$key]); |
771 | + } |
772 | + |
773 | + /** |
774 | + * {@inheritdoc} |
775 | +- * |
776 | +- * @return bool |
777 | + */ |
778 | +- public function deleteItems(array $keys) |
779 | ++ public function deleteItems(array $keys): bool |
780 | + { |
781 | + foreach ($keys as $key) { |
782 | + if ('' !== $key && \is_string($key)) { |
783 | +@@ -255,10 +247,8 @@ |
784 | + |
785 | + /** |
786 | + * {@inheritdoc} |
787 | +- * |
788 | +- * @return bool |
789 | + */ |
790 | +- public function save(CacheItemInterface $item) |
791 | ++ public function save(CacheItemInterface $item): bool |
792 | + { |
793 | + if (!$item instanceof CacheItem) { |
794 | + return false; |
795 | +@@ -270,10 +260,8 @@ |
796 | + |
797 | + /** |
798 | + * {@inheritdoc} |
799 | +- * |
800 | +- * @return bool |
801 | + */ |
802 | +- public function saveDeferred(CacheItemInterface $item) |
803 | ++ public function saveDeferred(CacheItemInterface $item): bool |
804 | + { |
805 | + if (!$item instanceof CacheItem) { |
806 | + return false; |
807 | +@@ -285,10 +273,8 @@ |
808 | + |
809 | + /** |
810 | + * {@inheritdoc} |
811 | +- * |
812 | +- * @return bool |
813 | + */ |
814 | +- public function commit() |
815 | ++ public function commit(): bool |
816 | + { |
817 | + if (!$this->deferred) { |
818 | + return true; |
819 | +@@ -376,7 +362,7 @@ |
820 | + } |
821 | + } |
822 | + |
823 | +- private function getTagVersions(array $tagsByKey) |
824 | ++ private function getTagVersions(array $tagsByKey): array |
825 | + { |
826 | + $tagVersions = []; |
827 | + $fetchTagVersions = false; |
828 | +--- a/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php |
829 | ++++ b/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php |
830 | +@@ -38,7 +38,7 @@ |
831 | + /** |
832 | + * {@inheritdoc} |
833 | + */ |
834 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) |
835 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): get |
836 | + { |
837 | + if (!$this->pool instanceof CacheInterface) { |
838 | + throw new \BadMethodCallException(sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', get_debug_type($this->pool), CacheInterface::class)); |
839 | +--- a/src/Symfony/Component/Cache/Adapter/TraceableTagAwareAdapter.php |
840 | ++++ b/src/Symfony/Component/Cache/Adapter/TraceableTagAwareAdapter.php |
841 | +@@ -26,7 +26,7 @@ |
842 | + /** |
843 | + * {@inheritdoc} |
844 | + */ |
845 | +- public function invalidateTags(array $tags) |
846 | ++ public function invalidateTags(array $tags): bool |
847 | + { |
848 | + $event = $this->start(__FUNCTION__); |
849 | + try { |
850 | +--- a/src/Symfony/Component/Cache/CacheItem.php |
851 | ++++ b/src/Symfony/Component/Cache/CacheItem.php |
852 | +@@ -43,10 +43,8 @@ |
853 | + |
854 | + /** |
855 | + * {@inheritdoc} |
856 | +- * |
857 | +- * @return mixed |
858 | + */ |
859 | +- public function get() |
860 | ++ public function get(): mixed |
861 | + { |
862 | + return $this->value; |
863 | + } |
864 | +@@ -64,7 +62,7 @@ |
865 | + * |
866 | + * @return $this |
867 | + */ |
868 | +- public function set($value): self |
869 | ++ public function set(mixed $value): static |
870 | + { |
871 | + $this->value = $value; |
872 | + |
873 | +@@ -76,7 +74,7 @@ |
874 | + * |
875 | + * @return $this |
876 | + */ |
877 | +- public function expiresAt($expiration): self |
878 | ++ public function expiresAt(?\DateTimeInterface $expiration): static |
879 | + { |
880 | + if (null === $expiration) { |
881 | + $this->expiry = null; |
882 | +@@ -94,7 +92,7 @@ |
883 | + * |
884 | + * @return $this |
885 | + */ |
886 | +- public function expiresAfter($time): self |
887 | ++ public function expiresAfter(mixed $time): static |
888 | + { |
889 | + if (null === $time) { |
890 | + $this->expiry = null; |
891 | +@@ -112,7 +110,7 @@ |
892 | + /** |
893 | + * {@inheritdoc} |
894 | + */ |
895 | +- public function tag($tags): ItemInterface |
896 | ++ public function tag(mixed $tags): static |
897 | + { |
898 | + if (!$this->isTaggable) { |
899 | + throw new LogicException(sprintf('Cache item "%s" comes from a non tag-aware pool: you cannot tag it.', $this->key)); |
900 | +--- a/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php |
901 | ++++ b/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php |
902 | +@@ -79,7 +79,7 @@ |
903 | + $this->value = $value; |
904 | + } |
905 | + |
906 | +- public function __invoke(CacheItemInterface $item, bool &$save) |
907 | ++ public function __invoke(CacheItemInterface $item, bool &$save): mixed |
908 | + { |
909 | + Assert::assertSame('bar', $item->getKey()); |
910 | + |
911 | +--- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php |
912 | ++++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php |
913 | +@@ -194,7 +194,7 @@ |
914 | + * |
915 | + * @return bool |
916 | + */ |
917 | +- public function isTrackingResources() |
918 | ++ public function isTrackingResources(): bool |
919 | + { |
920 | + return $this->trackResources; |
921 | + } |
922 | +@@ -223,7 +223,7 @@ |
923 | + * |
924 | + * @throws LogicException if the extension is not registered |
925 | + */ |
926 | +- public function getExtension(string $name) |
927 | ++ public function getExtension(string $name): ExtensionInterface |
928 | + { |
929 | + if (isset($this->extensions[$name])) { |
930 | + return $this->extensions[$name]; |
931 | +@@ -241,7 +241,7 @@ |
932 | + * |
933 | + * @return array<string, ExtensionInterface> |
934 | + */ |
935 | +- public function getExtensions() |
936 | ++ public function getExtensions(): array |
937 | + { |
938 | + return $this->extensions; |
939 | + } |
940 | +@@ -251,7 +251,7 @@ |
941 | + * |
942 | + * @return bool |
943 | + */ |
944 | +- public function hasExtension(string $name) |
945 | ++ public function hasExtension(string $name): bool |
946 | + { |
947 | + return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]); |
948 | + } |
949 | +@@ -261,7 +261,7 @@ |
950 | + * |
951 | + * @return ResourceInterface[] |
952 | + */ |
953 | +- public function getResources() |
954 | ++ public function getResources(): array |
955 | + { |
956 | + return array_values($this->resources); |
957 | + } |
958 | +@@ -269,7 +269,7 @@ |
959 | + /** |
960 | + * @return $this |
961 | + */ |
962 | +- public function addResource(ResourceInterface $resource) |
963 | ++ public function addResource(ResourceInterface $resource): static |
964 | + { |
965 | + if (!$this->trackResources) { |
966 | + return $this; |
967 | +@@ -291,7 +291,7 @@ |
968 | + * |
969 | + * @return $this |
970 | + */ |
971 | +- public function setResources(array $resources) |
972 | ++ public function setResources(array $resources): static |
973 | + { |
974 | + if (!$this->trackResources) { |
975 | + return $this; |
976 | +@@ -309,7 +309,7 @@ |
977 | + * |
978 | + * @return $this |
979 | + */ |
980 | +- public function addObjectResource($object) |
981 | ++ public function addObjectResource(object|string $object): static |
982 | + { |
983 | + if ($this->trackResources) { |
984 | + if (\is_object($object)) { |
985 | +@@ -402,7 +402,7 @@ |
986 | + * |
987 | + * @final |
988 | + */ |
989 | +- public function fileExists(string $path, $trackContents = true): bool |
990 | ++ public function fileExists(string $path, bool|string $trackContents = true): bool |
991 | + { |
992 | + $exists = file_exists($path); |
993 | + |
994 | +@@ -440,7 +440,7 @@ |
995 | + * @throws BadMethodCallException When this ContainerBuilder is compiled |
996 | + * @throws \LogicException if the extension is not registered |
997 | + */ |
998 | +- public function loadFromExtension(string $extension, array $values = null) |
999 | ++ public function loadFromExtension(string $extension, array $values = null): static |
1000 | + { |
1001 | + if ($this->isCompiled()) { |
1002 | + throw new BadMethodCallException('Cannot load from an extension on a compiled container.'); |
1003 | +@@ -461,7 +461,7 @@ |
1004 | + * |
1005 | + * @return $this |
1006 | + */ |
1007 | +- public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) |
1008 | ++ public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): static |
1009 | + { |
1010 | + $this->getCompiler()->addPass($pass, $type, $priority); |
1011 | + |
1012 | +@@ -475,7 +475,7 @@ |
1013 | + * |
1014 | + * @return PassConfig |
1015 | + */ |
1016 | +- public function getCompilerPassConfig() |
1017 | ++ public function getCompilerPassConfig(): PassConfig |
1018 | + { |
1019 | + return $this->getCompiler()->getPassConfig(); |
1020 | + } |
1021 | +@@ -485,7 +485,7 @@ |
1022 | + * |
1023 | + * @return Compiler |
1024 | + */ |
1025 | +- public function getCompiler() |
1026 | ++ public function getCompiler(): Compiler |
1027 | + { |
1028 | + if (null === $this->compiler) { |
1029 | + $this->compiler = new Compiler(); |
1030 | +@@ -522,14 +522,7 @@ |
1031 | + } |
1032 | + } |
1033 | + |
1034 | +- /** |
1035 | +- * Returns true if the given service is defined. |
1036 | +- * |
1037 | +- * @param string $id The service identifier |
1038 | +- * |
1039 | +- * @return bool |
1040 | +- */ |
1041 | +- public function has(string $id) |
1042 | ++ public function has(string $id): bool |
1043 | + { |
1044 | + return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || parent::has($id); |
1045 | + } |
1046 | +@@ -544,7 +537,7 @@ |
1047 | + * |
1048 | + * @see Reference |
1049 | + */ |
1050 | +- public function get(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) |
1051 | ++ public function get(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): ?object |
1052 | + { |
1053 | + if ($this->isCompiled() && isset($this->removedIds[$id]) && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $invalidBehavior) { |
1054 | + return parent::get($id); |
1055 | +@@ -553,7 +546,7 @@ |
1056 | + return $this->doGet($id, $invalidBehavior); |
1057 | + } |
1058 | + |
1059 | +- private function doGet(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, array &$inlineServices = null, bool $isConstructorArgument = false) |
1060 | ++ private function doGet(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, array &$inlineServices = null, bool $isConstructorArgument = false): mixed |
1061 | + { |
1062 | + if (isset($inlineServices[$id])) { |
1063 | + return $inlineServices[$id]; |
1064 | +@@ -697,7 +690,7 @@ |
1065 | + * |
1066 | + * @return array<array<string, mixed>> |
1067 | + */ |
1068 | +- public function getExtensionConfig(string $name) |
1069 | ++ public function getExtensionConfig(string $name): array |
1070 | + { |
1071 | + if (!isset($this->extensionConfigs[$name])) { |
1072 | + $this->extensionConfigs[$name] = []; |
1073 | +@@ -784,7 +777,7 @@ |
1074 | + /** |
1075 | + * {@inheritdoc} |
1076 | + */ |
1077 | +- public function getServiceIds() |
1078 | ++ public function getServiceIds(): array |
1079 | + { |
1080 | + return array_map('strval', array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds()))); |
1081 | + } |
1082 | +@@ -794,7 +787,7 @@ |
1083 | + * |
1084 | + * @return array<string, bool> |
1085 | + */ |
1086 | +- public function getRemovedIds() |
1087 | ++ public function getRemovedIds(): array |
1088 | + { |
1089 | + return $this->removedIds; |
1090 | + } |
1091 | +@@ -833,7 +826,7 @@ |
1092 | + * @throws InvalidArgumentException if the id is not a string or an Alias |
1093 | + * @throws InvalidArgumentException if the alias is for itself |
1094 | + */ |
1095 | +- public function setAlias(string $alias, $id) |
1096 | ++ public function setAlias(string $alias, string|Alias $id): Alias |
1097 | + { |
1098 | + if ('' === $alias || '\\' === $alias[-1] || \strlen($alias) !== strcspn($alias, "\0\r\n'")) { |
1099 | + throw new InvalidArgumentException(sprintf('Invalid alias id: "%s".', $alias)); |
1100 | +@@ -865,7 +858,7 @@ |
1101 | + /** |
1102 | + * @return bool |
1103 | + */ |
1104 | +- public function hasAlias(string $id) |
1105 | ++ public function hasAlias(string $id): bool |
1106 | + { |
1107 | + return isset($this->aliasDefinitions[$id]); |
1108 | + } |
1109 | +@@ -873,7 +866,7 @@ |
1110 | + /** |
1111 | + * @return array<string, Alias> |
1112 | + */ |
1113 | +- public function getAliases() |
1114 | ++ public function getAliases(): array |
1115 | + { |
1116 | + return $this->aliasDefinitions; |
1117 | + } |
1118 | +@@ -883,7 +876,7 @@ |
1119 | + * |
1120 | + * @throws InvalidArgumentException if the alias does not exist |
1121 | + */ |
1122 | +- public function getAlias(string $id) |
1123 | ++ public function getAlias(string $id): Alias |
1124 | + { |
1125 | + if (!isset($this->aliasDefinitions[$id])) { |
1126 | + throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id)); |
1127 | +@@ -900,7 +893,7 @@ |
1128 | + * |
1129 | + * @return Definition |
1130 | + */ |
1131 | +- public function register(string $id, string $class = null) |
1132 | ++ public function register(string $id, string $class = null): Definition |
1133 | + { |
1134 | + return $this->setDefinition($id, new Definition($class)); |
1135 | + } |
1136 | +@@ -913,7 +906,7 @@ |
1137 | + * |
1138 | + * @return Definition |
1139 | + */ |
1140 | +- public function autowire(string $id, string $class = null) |
1141 | ++ public function autowire(string $id, string $class = null): Definition |
1142 | + { |
1143 | + return $this->setDefinition($id, (new Definition($class))->setAutowired(true)); |
1144 | + } |
1145 | +@@ -946,7 +939,7 @@ |
1146 | + * |
1147 | + * @return array<string, Definition> |
1148 | + */ |
1149 | +- public function getDefinitions() |
1150 | ++ public function getDefinitions(): array |
1151 | + { |
1152 | + return $this->definitions; |
1153 | + } |
1154 | +@@ -958,7 +951,7 @@ |
1155 | + * |
1156 | + * @throws BadMethodCallException When this ContainerBuilder is compiled |
1157 | + */ |
1158 | +- public function setDefinition(string $id, Definition $definition) |
1159 | ++ public function setDefinition(string $id, Definition $definition): Definition |
1160 | + { |
1161 | + if ($this->isCompiled()) { |
1162 | + throw new BadMethodCallException('Adding definition to a compiled container is not allowed.'); |
1163 | +@@ -978,7 +971,7 @@ |
1164 | + * |
1165 | + * @return bool |
1166 | + */ |
1167 | +- public function hasDefinition(string $id) |
1168 | ++ public function hasDefinition(string $id): bool |
1169 | + { |
1170 | + return isset($this->definitions[$id]); |
1171 | + } |
1172 | +@@ -990,7 +983,7 @@ |
1173 | + * |
1174 | + * @throws ServiceNotFoundException if the service definition does not exist |
1175 | + */ |
1176 | +- public function getDefinition(string $id) |
1177 | ++ public function getDefinition(string $id): Definition |
1178 | + { |
1179 | + if (!isset($this->definitions[$id])) { |
1180 | + throw new ServiceNotFoundException($id); |
1181 | +@@ -1008,7 +1001,7 @@ |
1182 | + * |
1183 | + * @throws ServiceNotFoundException if the service definition does not exist |
1184 | + */ |
1185 | +- public function findDefinition(string $id) |
1186 | ++ public function findDefinition(string $id): Definition |
1187 | + { |
1188 | + $seen = []; |
1189 | + while (isset($this->aliasDefinitions[$id])) { |
1190 | +@@ -1037,7 +1030,7 @@ |
1191 | + * @throws RuntimeException When the service is a synthetic service |
1192 | + * @throws InvalidArgumentException When configure callable is not callable |
1193 | + */ |
1194 | +- private function createService(Definition $definition, array &$inlineServices, bool $isConstructorArgument = false, string $id = null, bool $tryProxy = true) |
1195 | ++ private function createService(Definition $definition, array &$inlineServices, bool $isConstructorArgument = false, string $id = null, bool $tryProxy = true): mixed |
1196 | + { |
1197 | + if (null === $id && isset($inlineServices[$h = spl_object_hash($definition)])) { |
1198 | + return $inlineServices[$h]; |
1199 | +@@ -1164,12 +1157,12 @@ |
1200 | + * @return mixed The same value with all service references replaced by |
1201 | + * the real service instances and all expressions evaluated |
1202 | + */ |
1203 | +- public function resolveServices($value) |
1204 | ++ public function resolveServices(mixed $value): mixed |
1205 | + { |
1206 | + return $this->doResolveServices($value); |
1207 | + } |
1208 | + |
1209 | +- private function doResolveServices($value, array &$inlineServices = [], bool $isConstructorArgument = false) |
1210 | ++ private function doResolveServices(mixed $value, array &$inlineServices = [], bool $isConstructorArgument = false): mixed |
1211 | + { |
1212 | + if (\is_array($value)) { |
1213 | + foreach ($value as $k => $v) { |
1214 | +@@ -1255,7 +1248,7 @@ |
1215 | + * |
1216 | + * @return array<string, array> An array of tags with the tagged service as key, holding a list of attribute arrays |
1217 | + */ |
1218 | +- public function findTaggedServiceIds(string $name, bool $throwOnAbstract = false) |
1219 | ++ public function findTaggedServiceIds(string $name, bool $throwOnAbstract = false): array |
1220 | + { |
1221 | + $this->usedTags[] = $name; |
1222 | + $tags = []; |
1223 | +@@ -1276,7 +1269,7 @@ |
1224 | + * |
1225 | + * @return string[] |
1226 | + */ |
1227 | +- public function findTags() |
1228 | ++ public function findTags(): array |
1229 | + { |
1230 | + $tags = []; |
1231 | + foreach ($this->getDefinitions() as $id => $definition) { |
1232 | +@@ -1291,7 +1284,7 @@ |
1233 | + * |
1234 | + * @return string[] |
1235 | + */ |
1236 | +- public function findUnusedTags() |
1237 | ++ public function findUnusedTags(): array |
1238 | + { |
1239 | + return array_values(array_diff($this->findTags(), $this->usedTags)); |
1240 | + } |
1241 | +@@ -1304,7 +1297,7 @@ |
1242 | + /** |
1243 | + * @return ExpressionFunctionProviderInterface[] |
1244 | + */ |
1245 | +- public function getExpressionLanguageProviders() |
1246 | ++ public function getExpressionLanguageProviders(): array |
1247 | + { |
1248 | + return $this->expressionLanguageProviders; |
1249 | + } |
1250 | +@@ -1314,7 +1307,7 @@ |
1251 | + * |
1252 | + * @return ChildDefinition |
1253 | + */ |
1254 | +- public function registerForAutoconfiguration(string $interface) |
1255 | ++ public function registerForAutoconfiguration(string $interface): ChildDefinition |
1256 | + { |
1257 | + if (!isset($this->autoconfiguredInstanceof[$interface])) { |
1258 | + $this->autoconfiguredInstanceof[$interface] = new ChildDefinition(''); |
1259 | +@@ -1365,7 +1358,7 @@ |
1260 | + * |
1261 | + * @return array<string, ChildDefinition> |
1262 | + */ |
1263 | +- public function getAutoconfiguredInstanceof() |
1264 | ++ public function getAutoconfiguredInstanceof(): array |
1265 | + { |
1266 | + return $this->autoconfiguredInstanceof; |
1267 | + } |
1268 | +@@ -1389,7 +1382,7 @@ |
1269 | + * |
1270 | + * @return mixed The value with env parameters resolved if a string or an array is passed |
1271 | + */ |
1272 | +- public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null) |
1273 | ++ public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null): mixed |
1274 | + { |
1275 | + if (null === $format) { |
1276 | + $format = '%%env(%s)%%'; |
1277 | +@@ -1454,7 +1447,7 @@ |
1278 | + * |
1279 | + * @return int[] The number of time each env vars has been resolved |
1280 | + */ |
1281 | +- public function getEnvCounters() |
1282 | ++ public function getEnvCounters(): array |
1283 | + { |
1284 | + $bag = $this->getParameterBag(); |
1285 | + $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; |
1286 | +@@ -1598,7 +1591,7 @@ |
1287 | + * |
1288 | + * @return string |
1289 | + */ |
1290 | +- public static function hash($value) |
1291 | ++ public static function hash(mixed $value): string |
1292 | + { |
1293 | + $hash = substr(base64_encode(hash('sha256', serialize($value), true)), 0, 7); |
1294 | + |
1295 | +@@ -1608,7 +1601,7 @@ |
1296 | + /** |
1297 | + * {@inheritdoc} |
1298 | + */ |
1299 | +- protected function getEnv(string $name) |
1300 | ++ protected function getEnv(string $name): mixed |
1301 | + { |
1302 | + $value = parent::getEnv($name); |
1303 | + $bag = $this->getParameterBag(); |
1304 | +@@ -1637,7 +1630,7 @@ |
1305 | + } |
1306 | + } |
1307 | + |
1308 | +- private function callMethod(object $service, array $call, array &$inlineServices) |
1309 | ++ private function callMethod(object $service, array $call, array &$inlineServices): mixed |
1310 | + { |
1311 | + foreach (self::getServiceConditionals($call[1]) as $s) { |
1312 | + if (!$this->has($s)) { |
1313 | +@@ -1660,7 +1653,7 @@ |
1314 | + * |
1315 | + * @param mixed $service |
1316 | + */ |
1317 | +- private function shareService(Definition $definition, $service, ?string $id, array &$inlineServices) |
1318 | ++ private function shareService(Definition $definition, mixed $service, ?string $id, array &$inlineServices) |
1319 | + { |
1320 | + $inlineServices[$id ?? spl_object_hash($definition)] = $service; |
1321 | + |
1322 | +--- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php |
1323 | ++++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php |
1324 | +@@ -48,12 +48,12 @@ |
1325 | + * |
1326 | + * @see Reference |
1327 | + */ |
1328 | +- public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); |
1329 | ++ public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE): ?object; |
1330 | + |
1331 | + /** |
1332 | + * @return bool |
1333 | + */ |
1334 | +- public function has(string $id); |
1335 | ++ public function has(string $id): bool; |
1336 | + |
1337 | + /** |
1338 | + * Check for whether or not a service has been initialized. |
1339 | +--- a/src/Symfony/Component/DependencyInjection/Container.php |
1340 | ++++ b/src/Symfony/Component/DependencyInjection/Container.php |
1341 | +@@ -89,7 +89,7 @@ |
1342 | + * |
1343 | + * @return bool |
1344 | + */ |
1345 | +- public function isCompiled() |
1346 | ++ public function isCompiled(): bool |
1347 | + { |
1348 | + return $this->compiled; |
1349 | + } |
1350 | +@@ -99,7 +99,7 @@ |
1351 | + * |
1352 | + * @return ParameterBagInterface |
1353 | + */ |
1354 | +- public function getParameterBag() |
1355 | ++ public function getParameterBag(): ParameterBagInterface |
1356 | + { |
1357 | + return $this->parameterBag; |
1358 | + } |
1359 | +@@ -119,7 +119,7 @@ |
1360 | + /** |
1361 | + * @return bool |
1362 | + */ |
1363 | +- public function hasParameter(string $name) |
1364 | ++ public function hasParameter(string $name): bool |
1365 | + { |
1366 | + return $this->parameterBag->has($name); |
1367 | + } |
1368 | +@@ -179,14 +179,7 @@ |
1369 | + $this->services[$id] = $service; |
1370 | + } |
1371 | + |
1372 | +- /** |
1373 | +- * Returns true if the given service is defined. |
1374 | +- * |
1375 | +- * @param string $id The service identifier |
1376 | +- * |
1377 | +- * @return bool |
1378 | +- */ |
1379 | +- public function has(string $id) |
1380 | ++ public function has(string $id): bool |
1381 | + { |
1382 | + if (isset($this->aliases[$id])) { |
1383 | + $id = $this->aliases[$id]; |
1384 | +@@ -212,7 +205,7 @@ |
1385 | + * |
1386 | + * @see Reference |
1387 | + */ |
1388 | +- public function get(string $id, int $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1) |
1389 | ++ public function get(string $id, int $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1): ?object |
1390 | + { |
1391 | + return $this->services[$id] |
1392 | + ?? $this->services[$id = $this->aliases[$id] ?? $id] |
1393 | +@@ -279,7 +272,7 @@ |
1394 | + * |
1395 | + * @return bool |
1396 | + */ |
1397 | +- public function initialized(string $id) |
1398 | ++ public function initialized(string $id): bool |
1399 | + { |
1400 | + if (isset($this->aliases[$id])) { |
1401 | + $id = $this->aliases[$id]; |
1402 | +@@ -316,7 +309,7 @@ |
1403 | + * |
1404 | + * @return string[] |
1405 | + */ |
1406 | +- public function getServiceIds() |
1407 | ++ public function getServiceIds(): array |
1408 | + { |
1409 | + return array_map('strval', array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->aliases), array_keys($this->services)))); |
1410 | + } |
1411 | +@@ -326,7 +319,7 @@ |
1412 | + * |
1413 | + * @return array |
1414 | + */ |
1415 | +- public function getRemovedIds() |
1416 | ++ public function getRemovedIds(): array |
1417 | + { |
1418 | + return []; |
1419 | + } |
1420 | +@@ -336,7 +329,7 @@ |
1421 | + * |
1422 | + * @return string |
1423 | + */ |
1424 | +- public static function camelize(string $id) |
1425 | ++ public static function camelize(string $id): string |
1426 | + { |
1427 | + return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']); |
1428 | + } |
1429 | +@@ -346,7 +339,7 @@ |
1430 | + * |
1431 | + * @return string |
1432 | + */ |
1433 | +- public static function underscore(string $id) |
1434 | ++ public static function underscore(string $id): string |
1435 | + { |
1436 | + return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], str_replace('_', '.', $id))); |
1437 | + } |
1438 | +@@ -366,7 +359,7 @@ |
1439 | + * |
1440 | + * @throws EnvNotFoundException When the environment variable is not found and has no default value |
1441 | + */ |
1442 | +- protected function getEnv(string $name) |
1443 | ++ protected function getEnv(string $name): mixed |
1444 | + { |
1445 | + if (isset($this->resolving[$envName = "env($name)"])) { |
1446 | + throw new ParameterCircularReferenceException(array_keys($this->resolving)); |
1447 | +--- a/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag.php |
1448 | ++++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag.php |
1449 | +@@ -48,7 +48,7 @@ |
1450 | + * |
1451 | + * @return bool |
1452 | + */ |
1453 | +- public function has(string $name) |
1454 | ++ public function has(string $name): bool |
1455 | + { |
1456 | + return $this->container->hasParameter($name); |
1457 | + } |
1458 | +--- a/src/Symfony/Component/DependencyInjection/Tests/ServiceLocatorTest.php |
1459 | ++++ b/src/Symfony/Component/DependencyInjection/Tests/ServiceLocatorTest.php |
1460 | +@@ -22,7 +22,7 @@ |
1461 | + |
1462 | + class ServiceLocatorTest extends BaseServiceLocatorTest |
1463 | + { |
1464 | +- public function getServiceLocator(array $factories): ContainerInterface |
1465 | ++ public function getServiceLocator(array $factories): ServiceLocator |
1466 | + { |
1467 | + return new ServiceLocator($factories); |
1468 | + } |
1469 | +--- a/src/Symfony/Component/HttpClient/Response/AsyncContext.php |
1470 | ++++ b/src/Symfony/Component/HttpClient/Response/AsyncContext.php |
1471 | +@@ -111,7 +111,7 @@ |
1472 | + /** |
1473 | + * Returns the current info of the response. |
1474 | + */ |
1475 | +- public function getInfo(string $type = null) |
1476 | ++ public function getInfo(string $type = null): mixed |
1477 | + { |
1478 | + if (null !== $type) { |
1479 | + return $this->info[$type] ?? $this->response->getInfo($type); |
1480 | +--- a/src/Symfony/Component/HttpClient/Response/MockResponse.php |
1481 | ++++ b/src/Symfony/Component/HttpClient/Response/MockResponse.php |
1482 | +@@ -93,7 +93,7 @@ |
1483 | + /** |
1484 | + * {@inheritdoc} |
1485 | + */ |
1486 | +- public function getInfo(string $type = null) |
1487 | ++ public function getInfo(string $type = null): mixed |
1488 | + { |
1489 | + return null !== $type ? $this->info[$type] ?? null : $this->info; |
1490 | + } |
1491 | +--- a/src/Symfony/Component/String/Slugger/AsciiSlugger.php |
1492 | ++++ b/src/Symfony/Component/String/Slugger/AsciiSlugger.php |
1493 | +@@ -90,7 +90,7 @@ |
1494 | + /** |
1495 | + * {@inheritdoc} |
1496 | + */ |
1497 | +- public function getLocale() |
1498 | ++ public function getLocale(): string |
1499 | + { |
1500 | + return $this->defaultLocale; |
1501 | + } |
1502 | +--- a/src/Symfony/Component/Translation/DataCollectorTranslator.php |
1503 | ++++ b/src/Symfony/Component/Translation/DataCollectorTranslator.php |
1504 | +@@ -43,7 +43,7 @@ |
1505 | + /** |
1506 | + * {@inheritdoc} |
1507 | + */ |
1508 | +- public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) |
1509 | ++ public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string |
1510 | + { |
1511 | + $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); |
1512 | + $this->collectMessage($locale, $domain, $id, $trans, $parameters); |
1513 | +@@ -62,7 +62,7 @@ |
1514 | + /** |
1515 | + * {@inheritdoc} |
1516 | + */ |
1517 | +- public function getLocale() |
1518 | ++ public function getLocale(): string |
1519 | + { |
1520 | + return $this->translator->getLocale(); |
1521 | + } |
1522 | +--- a/src/Symfony/Component/Translation/LoggingTranslator.php |
1523 | ++++ b/src/Symfony/Component/Translation/LoggingTranslator.php |
1524 | +@@ -40,7 +40,7 @@ |
1525 | + /** |
1526 | + * {@inheritdoc} |
1527 | + */ |
1528 | +- public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) |
1529 | ++ public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string |
1530 | + { |
1531 | + $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); |
1532 | + $this->log($id, $domain, $locale); |
1533 | +@@ -65,7 +65,7 @@ |
1534 | + /** |
1535 | + * {@inheritdoc} |
1536 | + */ |
1537 | +- public function getLocale() |
1538 | ++ public function getLocale(): string |
1539 | + { |
1540 | + return $this->translator->getLocale(); |
1541 | + } |
1542 | +--- a/src/Symfony/Component/Translation/MessageCatalogue.php |
1543 | ++++ b/src/Symfony/Component/Translation/MessageCatalogue.php |
1544 | +@@ -38,7 +38,7 @@ |
1545 | + /** |
1546 | + * {@inheritdoc} |
1547 | + */ |
1548 | +- public function getLocale() |
1549 | ++ public function getLocale(): string |
1550 | + { |
1551 | + return $this->locale; |
1552 | + } |
1553 | +--- a/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php |
1554 | ++++ b/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php |
1555 | +@@ -34,7 +34,7 @@ |
1556 | + \Locale::setDefault($this->defaultLocale); |
1557 | + } |
1558 | + |
1559 | +- public function getTranslator(): TranslatorInterface |
1560 | ++ public function getTranslator(): IdentityTranslator |
1561 | + { |
1562 | + return new IdentityTranslator(); |
1563 | + } |
1564 | +--- a/src/Symfony/Component/Translation/Translator.php |
1565 | ++++ b/src/Symfony/Component/Translation/Translator.php |
1566 | +@@ -157,7 +157,7 @@ |
1567 | + /** |
1568 | + * {@inheritdoc} |
1569 | + */ |
1570 | +- public function getLocale() |
1571 | ++ public function getLocale(): string |
1572 | + { |
1573 | + return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); |
1574 | + } |
1575 | +@@ -194,7 +194,7 @@ |
1576 | + /** |
1577 | + * {@inheritdoc} |
1578 | + */ |
1579 | +- public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) |
1580 | ++ public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string |
1581 | + { |
1582 | + if (null === $id || '' === $id) { |
1583 | + return ''; |
1584 | +--- a/src/Symfony/Contracts/Cache/CacheInterface.php |
1585 | ++++ b/src/Symfony/Contracts/Cache/CacheInterface.php |
1586 | +@@ -42,7 +42,7 @@ |
1587 | + * |
1588 | + * @throws InvalidArgumentException When $key is not valid or when $beta is negative |
1589 | + */ |
1590 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null); |
1591 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed; |
1592 | + |
1593 | + /** |
1594 | + * Removes an item from the pool. |
1595 | +--- a/src/Symfony/Contracts/Cache/CacheTrait.php |
1596 | ++++ b/src/Symfony/Contracts/Cache/CacheTrait.php |
1597 | +@@ -27,10 +27,8 @@ |
1598 | + { |
1599 | + /** |
1600 | + * {@inheritdoc} |
1601 | +- * |
1602 | +- * @return mixed |
1603 | + */ |
1604 | +- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) |
1605 | ++ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed |
1606 | + { |
1607 | + return $this->doGet($this, $key, $callback, $beta, $metadata); |
1608 | + } |
1609 | +@@ -43,7 +41,7 @@ |
1610 | + return $this->deleteItem($key); |
1611 | + } |
1612 | + |
1613 | +- private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null) |
1614 | ++ private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null): mixed |
1615 | + { |
1616 | + if (0 > $beta = $beta ?? 1.0) { |
1617 | + throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException { }; |
1618 | +--- a/src/Symfony/Contracts/Cache/CallbackInterface.php |
1619 | ++++ b/src/Symfony/Contracts/Cache/CallbackInterface.php |
1620 | +@@ -26,5 +26,5 @@ |
1621 | + * |
1622 | + * @return mixed The computed value for the passed item |
1623 | + */ |
1624 | +- public function __invoke(CacheItemInterface $item, bool &$save); |
1625 | ++ public function __invoke(CacheItemInterface $item, bool &$save): mixed; |
1626 | + } |
1627 | +--- a/src/Symfony/Contracts/Cache/ItemInterface.php |
1628 | ++++ b/src/Symfony/Contracts/Cache/ItemInterface.php |
1629 | +@@ -54,7 +54,7 @@ |
1630 | + * @throws InvalidArgumentException When $tag is not valid |
1631 | + * @throws CacheException When the item comes from a pool that is not tag-aware |
1632 | + */ |
1633 | +- public function tag($tags): self; |
1634 | ++ public function tag($tags): static; |
1635 | + |
1636 | + /** |
1637 | + * Returns a list of metadata info that were saved alongside with the cached value. |
1638 | +--- a/src/Symfony/Contracts/Cache/TagAwareCacheInterface.php |
1639 | ++++ b/src/Symfony/Contracts/Cache/TagAwareCacheInterface.php |
1640 | +@@ -34,5 +34,5 @@ |
1641 | + * |
1642 | + * @throws InvalidArgumentException When $tags is not valid |
1643 | + */ |
1644 | +- public function invalidateTags(array $tags); |
1645 | ++ public function invalidateTags(array $tags): bool; |
1646 | + } |
1647 | +--- a/src/Symfony/Contracts/HttpClient/ResponseInterface.php |
1648 | ++++ b/src/Symfony/Contracts/HttpClient/ResponseInterface.php |
1649 | +@@ -105,5 +105,5 @@ |
1650 | + * @return mixed An array of all available info, or one of them when $type is |
1651 | + * provided, or null when an unsupported type is requested |
1652 | + */ |
1653 | +- public function getInfo(string $type = null); |
1654 | ++ public function getInfo(string $type = null): mixed; |
1655 | + } |
1656 | +--- a/src/Symfony/Contracts/HttpClient/Test/TestHttpServer.php |
1657 | ++++ b/src/Symfony/Contracts/HttpClient/Test/TestHttpServer.php |
1658 | +@@ -18,10 +18,7 @@ |
1659 | + { |
1660 | + private static $process = []; |
1661 | + |
1662 | +- /** |
1663 | +- * @return Process |
1664 | +- */ |
1665 | +- public static function start(int $port = 8057) |
1666 | ++ public static function start(int $port = 8057): Process |
1667 | + { |
1668 | + if (isset(self::$process[$port])) { |
1669 | + self::$process[$port]->stop(); |
1670 | +--- a/src/Symfony/Contracts/Service/ServiceLocatorTrait.php |
1671 | ++++ b/src/Symfony/Contracts/Service/ServiceLocatorTrait.php |
1672 | +@@ -40,10 +40,8 @@ |
1673 | + |
1674 | + /** |
1675 | + * {@inheritdoc} |
1676 | +- * |
1677 | +- * @return bool |
1678 | + */ |
1679 | +- public function has(string $id) |
1680 | ++ public function has(string $id): bool |
1681 | + { |
1682 | + return isset($this->factories[$id]); |
1683 | + } |
1684 | +--- a/src/Symfony/Contracts/Service/ServiceSubscriberInterface.php |
1685 | ++++ b/src/Symfony/Contracts/Service/ServiceSubscriberInterface.php |
1686 | +@@ -49,5 +49,5 @@ |
1687 | + * |
1688 | + * @return string[] The required service types, optionally keyed by service names |
1689 | + */ |
1690 | +- public static function getSubscribedServices(); |
1691 | ++ public static function getSubscribedServices(): array; |
1692 | + } |
1693 | +--- a/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php |
1694 | ++++ b/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php |
1695 | +@@ -99,10 +99,8 @@ |
1696 | + |
1697 | + /** |
1698 | + * @required |
1699 | +- * |
1700 | +- * @return ContainerInterface|null |
1701 | + */ |
1702 | +- public function setContainer(ContainerInterface $container) |
1703 | ++ public function setContainer(ContainerInterface $container): ?ContainerInterface |
1704 | + { |
1705 | + $this->container = $container; |
1706 | + |
1707 | +--- a/src/Symfony/Contracts/Service/Test/ServiceLocatorTest.php |
1708 | ++++ b/src/Symfony/Contracts/Service/Test/ServiceLocatorTest.php |
1709 | +@@ -17,10 +17,7 @@ |
1710 | + |
1711 | + abstract class ServiceLocatorTest extends TestCase |
1712 | + { |
1713 | +- /** |
1714 | +- * @return ContainerInterface |
1715 | +- */ |
1716 | +- protected function getServiceLocator(array $factories) |
1717 | ++ protected function getServiceLocator(array $factories): ContainerInterface |
1718 | + { |
1719 | + return new class($factories) implements ContainerInterface { |
1720 | + use ServiceLocatorTrait; |
1721 | +--- a/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php |
1722 | ++++ b/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php |
1723 | +@@ -99,7 +99,7 @@ |
1724 | + { |
1725 | + } |
1726 | + |
1727 | +- public function setContainer(ContainerInterface $container) |
1728 | ++ public function setContainer(ContainerInterface $container): ?ContainerInterface |
1729 | + { |
1730 | + return $container; |
1731 | + } |
1732 | +--- a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php |
1733 | ++++ b/src/Symfony/Contracts/Translation/LocaleAwareInterface.php |
1734 | +@@ -16,16 +16,12 @@ |
1735 | + /** |
1736 | + * Sets the current locale. |
1737 | + * |
1738 | +- * @param string $locale The locale |
1739 | +- * |
1740 | + * @throws \InvalidArgumentException If the locale contains invalid characters |
1741 | + */ |
1742 | + public function setLocale(string $locale); |
1743 | + |
1744 | + /** |
1745 | + * Returns the current locale. |
1746 | +- * |
1747 | +- * @return string |
1748 | + */ |
1749 | +- public function getLocale(); |
1750 | ++ public function getLocale(): string; |
1751 | + } |
1752 | +--- a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php |
1753 | ++++ b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php |
1754 | +@@ -43,10 +43,7 @@ |
1755 | + \Locale::setDefault($this->defaultLocale); |
1756 | + } |
1757 | + |
1758 | +- /** |
1759 | +- * @return TranslatorInterface |
1760 | +- */ |
1761 | +- public function getTranslator() |
1762 | ++ public function getTranslator(): TranslatorInterface |
1763 | + { |
1764 | + return new class() implements TranslatorInterface { |
1765 | + use TranslatorTrait; |
1766 | +@@ -317,10 +314,8 @@ |
1767 | + * This array should contain all currently known langcodes. |
1768 | + * |
1769 | + * As it is impossible to have this ever complete we should try as hard as possible to have it almost complete. |
1770 | +- * |
1771 | +- * @return array |
1772 | + */ |
1773 | +- public function successLangcodes() |
1774 | ++ public function successLangcodes(): array |
1775 | + { |
1776 | + return [ |
1777 | + ['1', ['ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky']], |
1778 | +@@ -339,7 +334,7 @@ |
1779 | + * |
1780 | + * @return array with nplural together with langcodes |
1781 | + */ |
1782 | +- public function failingLangcodes() |
1783 | ++ public function failingLangcodes(): array |
1784 | + { |
1785 | + return [ |
1786 | + ['1', ['fa']], |
1787 | +@@ -353,11 +348,10 @@ |
1788 | + /** |
1789 | + * We validate only on the plural coverage. Thus the real rules is not tested. |
1790 | + * |
1791 | +- * @param string $nplural Plural expected |
1792 | +- * @param array $matrix Containing langcodes and their plural index values |
1793 | +- * @param bool $expectSuccess |
1794 | ++ * @param string $nplural Plural expected |
1795 | ++ * @param array $matrix Containing langcodes and their plural index values |
1796 | + */ |
1797 | +- protected function validateMatrix($nplural, $matrix, $expectSuccess = true) |
1798 | ++ protected function validateMatrix(string $nplural, array $matrix, bool $expectSuccess = true) |
1799 | + { |
1800 | + foreach ($matrix as $langCode => $data) { |
1801 | + $indexes = array_flip($data); |
1802 | +--- a/src/Symfony/Contracts/Translation/TranslatorInterface.php |
1803 | ++++ b/src/Symfony/Contracts/Translation/TranslatorInterface.php |
1804 | +@@ -63,5 +63,5 @@ |
1805 | + * |
1806 | + * @throws \InvalidArgumentException If the locale contains invalid characters |
1807 | + */ |
1808 | +- public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null); |
1809 | ++ public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string; |
1810 | + } |
1811 | +--- a/src/Symfony/Contracts/Translation/TranslatorTrait.php |
1812 | ++++ b/src/Symfony/Contracts/Translation/TranslatorTrait.php |
1813 | +@@ -32,10 +32,8 @@ |
1814 | + |
1815 | + /** |
1816 | + * {@inheritdoc} |
1817 | +- * |
1818 | +- * @return string |
1819 | + */ |
1820 | +- public function getLocale() |
1821 | ++ public function getLocale(): string |
1822 | + { |
1823 | + return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); |
1824 | + } |
1825 | +--- a/src/Symfony/Component/Cache/Adapter/AdapterInterface.php |
1826 | ++++ b/src/Symfony/Component/Cache/Adapter/AdapterInterface.php |
1827 | +@@ -26,22 +26,18 @@ |
1828 | + { |
1829 | + /** |
1830 | + * {@inheritdoc} |
1831 | +- * |
1832 | +- * @return CacheItem |
1833 | + */ |
1834 | +- public function getItem($key); |
1835 | ++ public function getItem(mixed $key): CacheItem; |
1836 | + |
1837 | + /** |
1838 | + * {@inheritdoc} |
1839 | + * |
1840 | +- * @return \Traversable<string, CacheItem> |
1841 | ++ * @return iterable<string, CacheItem> |
1842 | + */ |
1843 | +- public function getItems(array $keys = []); |
1844 | ++ public function getItems(array $keys = []): iterable; |
1845 | + |
1846 | + /** |
1847 | + * {@inheritdoc} |
1848 | +- * |
1849 | +- * @return bool |
1850 | + */ |
1851 | +- public function clear(string $prefix = ''); |
1852 | ++ public function clear(string $prefix = ''): bool; |
1853 | + } |
1854 | +--- a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php |
1855 | ++++ b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php |
1856 | +@@ -163,7 +163,7 @@ |
1857 | + /** |
1858 | + * {@inheritdoc} |
1859 | + */ |
1860 | +- public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): self |
1861 | ++ public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): static |
1862 | + { |
1863 | + throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', get_debug_type($pass), $this->extensionClass)); |
1864 | + } |
1865 | +@@ -187,7 +187,7 @@ |
1866 | + /** |
1867 | + * {@inheritdoc} |
1868 | + */ |
1869 | +- public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null) |
1870 | ++ public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null): mixed |
1871 | + { |
1872 | + if (true !== $format || !\is_string($value)) { |
1873 | + return parent::resolveEnvPlaceholders($value, $format, $usedEnvs); |
1874 | +--- a/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php |
1875 | ++++ b/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php |
1876 | +@@ -95,10 +95,8 @@ |
1877 | + |
1878 | + /** |
1879 | + * {@inheritdoc} |
1880 | +- * |
1881 | +- * @return bool |
1882 | + */ |
1883 | +- public function hasItem($key) |
1884 | ++ public function hasItem($key): bool |
1885 | + { |
1886 | + $id = $this->getId($key); |
1887 | + |
1888 | +@@ -117,10 +115,8 @@ |
1889 | + |
1890 | + /** |
1891 | + * {@inheritdoc} |
1892 | +- * |
1893 | +- * @return bool |
1894 | + */ |
1895 | +- public function clear(string $prefix = '') |
1896 | ++ public function clear(string $prefix = ''): bool |
1897 | + { |
1898 | + $this->deferred = []; |
1899 | + if ($cleared = $this->versioningIsEnabled) { |
1900 | +@@ -158,20 +154,16 @@ |
1901 | + |
1902 | + /** |
1903 | + * {@inheritdoc} |
1904 | +- * |
1905 | +- * @return bool |
1906 | + */ |
1907 | +- public function deleteItem($key) |
1908 | ++ public function deleteItem($key): bool |
1909 | + { |
1910 | + return $this->deleteItems([$key]); |
1911 | + } |
1912 | + |
1913 | + /** |
1914 | + * {@inheritdoc} |
1915 | +- * |
1916 | +- * @return bool |
1917 | + */ |
1918 | +- public function deleteItems(array $keys) |
1919 | ++ public function deleteItems(array $keys): bool |
1920 | + { |
1921 | + $ids = []; |
1922 | + |
1923 | +@@ -209,7 +201,7 @@ |
1924 | + /** |
1925 | + * {@inheritdoc} |
1926 | + */ |
1927 | +- public function getItem($key) |
1928 | ++ public function getItem(mixed $key): CacheItem |
1929 | + { |
1930 | + $id = $this->getId($key); |
1931 | + |
1932 | +@@ -236,7 +228,7 @@ |
1933 | + /** |
1934 | + * {@inheritdoc} |
1935 | + */ |
1936 | +- public function getItems(array $keys = []) |
1937 | ++ public function getItems(array $keys = []): iterable |
1938 | + { |
1939 | + $ids = []; |
1940 | + $commit = false; |
1941 | +@@ -263,10 +255,8 @@ |
1942 | + |
1943 | + /** |
1944 | + * {@inheritdoc} |
1945 | +- * |
1946 | +- * @return bool |
1947 | + */ |
1948 | +- public function save(CacheItemInterface $item) |
1949 | ++ public function save(CacheItemInterface $item): bool |
1950 | + { |
1951 | + if (!$item instanceof CacheItem) { |
1952 | + return false; |
1953 | +@@ -278,10 +268,8 @@ |
1954 | + |
1955 | + /** |
1956 | + * {@inheritdoc} |
1957 | +- * |
1958 | +- * @return bool |
1959 | + */ |
1960 | +- public function saveDeferred(CacheItemInterface $item) |
1961 | ++ public function saveDeferred(CacheItemInterface $item): bool |
1962 | + { |
1963 | + if (!$item instanceof CacheItem) { |
1964 | + return false; |
1965 | +@@ -298,10 +286,8 @@ |
1966 | + * but old keys may need garbage collection and extra round-trips to the back-end are required. |
1967 | + * |
1968 | + * Calling this method also clears the memoized namespace version and thus forces a resynchonization of it. |
1969 | +- * |
1970 | +- * @return bool the previous state of versioning |
1971 | + */ |
1972 | +- public function enableVersioning(bool $enable = true) |
1973 | ++ public function enableVersioning(bool $enable = true): bool |
1974 | + { |
1975 | + $wasEnabled = $this->versioningIsEnabled; |
1976 | + $this->versioningIsEnabled = $enable; |
1977 | +--- a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php |
1978 | ++++ b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php |
1979 | +@@ -101,7 +101,7 @@ |
1980 | + * |
1981 | + * @return AdapterInterface |
1982 | + */ |
1983 | +- public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null) |
1984 | ++ public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null): AdapterInterface |
1985 | + { |
1986 | + $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true); |
1987 | + if (null !== $logger) { |
1988 | +@@ -145,10 +145,8 @@ |
1989 | + |
1990 | + /** |
1991 | + * {@inheritdoc} |
1992 | +- * |
1993 | +- * @return bool |
1994 | + */ |
1995 | +- public function commit() |
1996 | ++ public function commit(): bool |
1997 | + { |
1998 | + $ok = true; |
1999 | + $byLifetime = (self::$mergeByLifetime)($this->deferred, $this->namespace, $expiredIds, \Closure::fromCallable([$this, 'getId']), $this->defaultLifetime); |
2000 | +--- a/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php |
2001 | ++++ b/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php |
2002 | +@@ -43,7 +43,7 @@ |
2003 | + /** |
2004 | + * {@inheritdoc} |
2005 | + */ |
2006 | +- protected function doFetch(array $ids) |
2007 | ++ protected function doFetch(array $ids): iterable |
2008 | + { |
2009 | + foreach ($this->pool->getMultiple($ids, $this->miss) as $key => $value) { |
2010 | + if ($this->miss !== $value) { |
2011 | +@@ -55,7 +55,7 @@ |
2012 | + /** |
2013 | + * {@inheritdoc} |
2014 | + */ |
2015 | +- protected function doHave(string $id) |
2016 | ++ protected function doHave(string $id): bool |
2017 | + { |
2018 | + return $this->pool->has($id); |
2019 | + } |
2020 | +@@ -63,7 +63,7 @@ |
2021 | + /** |
2022 | + * {@inheritdoc} |
2023 | + */ |
2024 | +- protected function doClear(string $namespace) |
2025 | ++ protected function doClear(string $namespace): bool |
2026 | + { |
2027 | + return $this->pool->clear(); |
2028 | + } |
2029 | +@@ -71,7 +71,7 @@ |
2030 | + /** |
2031 | + * {@inheritdoc} |
2032 | + */ |
2033 | +- protected function doDelete(array $ids) |
2034 | ++ protected function doDelete(array $ids): bool |
2035 | + { |
2036 | + return $this->pool->deleteMultiple($ids); |
2037 | + } |
2038 | +@@ -79,7 +79,7 @@ |
2039 | + /** |
2040 | + * {@inheritdoc} |
2041 | + */ |
2042 | +- protected function doSave(array $values, int $lifetime) |
2043 | ++ protected function doSave(array $values, int $lifetime): array|bool |
2044 | + { |
2045 | + return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime); |
2046 | + } |
2047 | diff --git a/debian/patches/Adapt-conflict-to-Debian-expectations.patch b/debian/patches/drop-conflict-email-validator.patch |
2048 | similarity index 66% |
2049 | rename from debian/patches/Adapt-conflict-to-Debian-expectations.patch |
2050 | rename to debian/patches/drop-conflict-email-validator.patch |
2051 | index e176cb6..097a40d 100644 |
2052 | --- a/debian/patches/Adapt-conflict-to-Debian-expectations.patch |
2053 | +++ b/debian/patches/drop-conflict-email-validator.patch |
2054 | @@ -1,35 +1,20 @@ |
2055 | -From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org> |
2056 | -Date: Thu, 8 Apr 2021 16:55:56 -0400 |
2057 | -Subject: Adapt conflict to Debian expectations |
2058 | - |
2059 | ---- |
2060 | - composer.json | 2 +- |
2061 | - src/Symfony/Component/Mime/composer.json | 2 +- |
2062 | - 2 files changed, 2 insertions(+), 2 deletions(-) |
2063 | - |
2064 | -diff --git a/composer.json b/composer.json |
2065 | -index 8ba28df..7460467 100644 |
2066 | --- a/composer.json |
2067 | +++ b/composer.json |
2068 | -@@ -155,7 +155,7 @@ |
2069 | +@@ -155,7 +155,6 @@ |
2070 | "async-aws/core": "<1.5", |
2071 | "doctrine/annotations": "<1.13.1", |
2072 | "doctrine/dbal": "<2.13.1", |
2073 | - "egulias/email-validator": "~3.0.0", |
2074 | -+ "egulias/email-validator": ">3", |
2075 | "masterminds/html5": "<2.6", |
2076 | "phpdocumentor/reflection-docblock": "<3.2.2", |
2077 | "phpdocumentor/type-resolver": "<1.4.0", |
2078 | -diff --git a/src/Symfony/Component/Mime/composer.json b/src/Symfony/Component/Mime/composer.json |
2079 | -index cd04969..049cba6 100644 |
2080 | --- a/src/Symfony/Component/Mime/composer.json |
2081 | +++ b/src/Symfony/Component/Mime/composer.json |
2082 | -@@ -31,7 +31,7 @@ |
2083 | +@@ -31,7 +31,6 @@ |
2084 | "symfony/serializer": "^5.2|^6.0" |
2085 | }, |
2086 | "conflict": { |
2087 | - "egulias/email-validator": "~3.0.0", |
2088 | -+ "egulias/email-validator": ">3", |
2089 | "phpdocumentor/reflection-docblock": "<3.2.2", |
2090 | "phpdocumentor/type-resolver": "<1.4.0", |
2091 | "symfony/mailer": "<4.4" |
2092 | diff --git a/debian/patches/implement-psr-cache-3.patch b/debian/patches/implement-psr-cache-3.patch |
2093 | new file mode 100644 |
2094 | index 0000000..c11453f |
2095 | --- /dev/null |
2096 | +++ b/debian/patches/implement-psr-cache-3.patch |
2097 | @@ -0,0 +1,31 @@ |
2098 | +--- a/composer.json |
2099 | ++++ b/composer.json |
2100 | +@@ -18,7 +18,7 @@ |
2101 | + "provide": { |
2102 | + "php-http/async-client-implementation": "*", |
2103 | + "php-http/client-implementation": "*", |
2104 | +- "psr/cache-implementation": "1.0|2.0", |
2105 | ++ "psr/cache-implementation": "1.0|2.0|3.0", |
2106 | + "psr/container-implementation": "1.0|2.0", |
2107 | + "psr/event-dispatcher-implementation": "1.0", |
2108 | + "psr/http-client-implementation": "1.0", |
2109 | +@@ -38,7 +38,7 @@ |
2110 | + "doctrine/event-manager": "~1.0", |
2111 | + "doctrine/persistence": "^2|^3", |
2112 | + "twig/twig": "^2.13|^3.0.4", |
2113 | +- "psr/cache": "^1.0|^2.0", |
2114 | ++ "psr/cache": "^1.0|^2.0|^3.0", |
2115 | + "psr/container": "^1.1.1|^2.0", |
2116 | + "psr/event-dispatcher": "^1.0", |
2117 | + "psr/link": "^1.0|^2.0", |
2118 | +--- a/src/Symfony/Component/Cache/composer.json |
2119 | ++++ b/src/Symfony/Component/Cache/composer.json |
2120 | +@@ -18,7 +18,7 @@ |
2121 | + "provide": { |
2122 | + "psr/cache-implementation": "1.0|2.0", |
2123 | + "psr/simple-cache-implementation": "1.0|2.0", |
2124 | +- "symfony/cache-implementation": "1.0|2.0" |
2125 | ++ "symfony/cache-implementation": "1.0|2.0|3.0" |
2126 | + }, |
2127 | + "require": { |
2128 | + "php": ">=7.2.5", |
2129 | diff --git a/debian/patches/implement-psr-container-2.patch b/debian/patches/implement-psr-container-2.patch |
2130 | new file mode 100644 |
2131 | index 0000000..0cddde2 |
2132 | --- /dev/null |
2133 | +++ b/debian/patches/implement-psr-container-2.patch |
2134 | @@ -0,0 +1,62 @@ |
2135 | +--- a/composer.json |
2136 | ++++ b/composer.json |
2137 | +@@ -19,7 +19,7 @@ |
2138 | + "php-http/async-client-implementation": "*", |
2139 | + "php-http/client-implementation": "*", |
2140 | + "psr/cache-implementation": "1.0|2.0", |
2141 | +- "psr/container-implementation": "1.0", |
2142 | ++ "psr/container-implementation": "1.0|2.0", |
2143 | + "psr/event-dispatcher-implementation": "1.0", |
2144 | + "psr/http-client-implementation": "1.0", |
2145 | + "psr/link-implementation": "1.0|2.0", |
2146 | +@@ -39,7 +39,7 @@ |
2147 | + "doctrine/persistence": "^2|^3", |
2148 | + "twig/twig": "^2.13|^3.0.4", |
2149 | + "psr/cache": "^1.0|^2.0", |
2150 | +- "psr/container": "^1.1.1", |
2151 | ++ "psr/container": "^1.1.1|^2.0", |
2152 | + "psr/event-dispatcher": "^1.0", |
2153 | + "psr/link": "^1.0|^2.0", |
2154 | + "psr/log": "^1|^2|^3", |
2155 | +--- a/src/Symfony/Component/DependencyInjection/composer.json |
2156 | ++++ b/src/Symfony/Component/DependencyInjection/composer.json |
2157 | +@@ -17,7 +17,7 @@ |
2158 | + ], |
2159 | + "require": { |
2160 | + "php": ">=7.2.5", |
2161 | +- "psr/container": "^1.1.1", |
2162 | ++ "psr/container": "^1.1.1|^2.0", |
2163 | + "symfony/deprecation-contracts": "^2.1|^3", |
2164 | + "symfony/polyfill-php80": "^1.16", |
2165 | + "symfony/polyfill-php81": "^1.22", |
2166 | +@@ -43,7 +43,7 @@ |
2167 | + "symfony/yaml": "<4.4.26" |
2168 | + }, |
2169 | + "provide": { |
2170 | +- "psr/container-implementation": "1.0", |
2171 | ++ "psr/container-implementation": "1.0|2.0", |
2172 | + "symfony/service-implementation": "1.0|2.0" |
2173 | + }, |
2174 | + "autoload": { |
2175 | +--- a/src/Symfony/Contracts/Service/composer.json |
2176 | ++++ b/src/Symfony/Contracts/Service/composer.json |
2177 | +@@ -17,7 +17,7 @@ |
2178 | + ], |
2179 | + "require": { |
2180 | + "php": ">=7.2.5", |
2181 | +- "psr/container": "^1.1", |
2182 | ++ "psr/container": "^1.1|^2.0", |
2183 | + "symfony/deprecation-contracts": "^2.1|^3" |
2184 | + }, |
2185 | + "conflict": { |
2186 | +--- a/src/Symfony/Contracts/composer.json |
2187 | ++++ b/src/Symfony/Contracts/composer.json |
2188 | +@@ -18,7 +18,7 @@ |
2189 | + "require": { |
2190 | + "php": ">=7.2.5", |
2191 | + "psr/cache": "^1.0|^2.0|^3.0", |
2192 | +- "psr/container": "^1.1", |
2193 | ++ "psr/container": "^1.1|^2.0", |
2194 | + "psr/event-dispatcher": "^1.0" |
2195 | + }, |
2196 | + "require-dev": { |
2197 | diff --git a/debian/patches/implement-psr-link-2.patch b/debian/patches/implement-psr-link-2.patch |
2198 | new file mode 100644 |
2199 | index 0000000..0839235 |
2200 | --- /dev/null |
2201 | +++ b/debian/patches/implement-psr-link-2.patch |
2202 | @@ -0,0 +1,51 @@ |
2203 | +From 7fa11cf974c7f006bfdb43d55605cd75c6b4ff38 Mon Sep 17 00:00:00 2001 |
2204 | +From: Nicolas Grekas <nicolas.grekas@gmail.com> |
2205 | +Date: Fri, 24 Sep 2021 16:10:07 +0200 |
2206 | +Subject: [PATCH] [WebLink] allow psr/link v2 |
2207 | + |
2208 | +--- |
2209 | + composer.json | 4 ++-- |
2210 | + src/Symfony/Component/WebLink/composer.json | 4 ++-- |
2211 | + 2 files changed, 4 insertions(+), 4 deletions(-) |
2212 | + |
2213 | +Origin: backport, https://github.com/symfony/symfony/commit/7fa11cf974c7f006bfdb43d55605cd75c6b4ff38.patch |
2214 | +Applied-Upstream: 6.0.0, 7fa11cf974c7f006bfdb43d55605cd75c6b4ff38 |
2215 | +Reviewed-By: Bryce Harrington <bryce@canonical.com> |
2216 | +Last-Update: 2022-02-28 |
2217 | + |
2218 | +--- a/composer.json |
2219 | ++++ b/composer.json |
2220 | +@@ -22,7 +22,7 @@ |
2221 | + "psr/container-implementation": "1.0", |
2222 | + "psr/event-dispatcher-implementation": "1.0", |
2223 | + "psr/http-client-implementation": "1.0", |
2224 | +- "psr/link-implementation": "1.0", |
2225 | ++ "psr/link-implementation": "1.0|2.0", |
2226 | + "psr/log-implementation": "1.0|2.0|3.0", |
2227 | + "psr/simple-cache-implementation": "1.0|2.0", |
2228 | + "symfony/cache-implementation": "1.0|2.0", |
2229 | +@@ -41,7 +41,7 @@ |
2230 | + "psr/cache": "^1.0|^2.0", |
2231 | + "psr/container": "^1.1.1", |
2232 | + "psr/event-dispatcher": "^1.0", |
2233 | +- "psr/link": "^1.0", |
2234 | ++ "psr/link": "^1.0|^2.0", |
2235 | + "psr/log": "^1|^2|^3", |
2236 | + "symfony/contracts": "^2.1", |
2237 | + "symfony/polyfill-ctype": "~1.8", |
2238 | +--- a/src/Symfony/Component/WebLink/composer.json |
2239 | ++++ b/src/Symfony/Component/WebLink/composer.json |
2240 | +@@ -16,11 +16,11 @@ |
2241 | + } |
2242 | + ], |
2243 | + "provide": { |
2244 | +- "psr/link-implementation": "1.0" |
2245 | ++ "psr/link-implementation": "1.0|2.0" |
2246 | + }, |
2247 | + "require": { |
2248 | + "php": ">=7.2.5", |
2249 | +- "psr/link": "^1.0", |
2250 | ++ "psr/link": "^1.0|^2.0", |
2251 | + "symfony/polyfill-php80": "^1.16" |
2252 | + }, |
2253 | + "suggest": { |
2254 | diff --git a/debian/patches/implement-psr-log-3.patch b/debian/patches/implement-psr-log-3.patch |
2255 | new file mode 100644 |
2256 | index 0000000..5b5b964 |
2257 | --- /dev/null |
2258 | +++ b/debian/patches/implement-psr-log-3.patch |
2259 | @@ -0,0 +1,110 @@ |
2260 | +From 95029e560d8805efaac9399496028c2ccdac6c24 Mon Sep 17 00:00:00 2001 |
2261 | +From: "Alexander M. Turek" <me@derrabus.de> |
2262 | +Date: Sun, 18 Jul 2021 18:39:07 +0200 |
2263 | +Subject: [PATCH] Implement psr/log 3 |
2264 | + |
2265 | +Signed-off-by: Alexander M. Turek <me@derrabus.de> |
2266 | +--- |
2267 | + composer.json | 4 ++-- |
2268 | + src/Symfony/Component/Console/Logger/ConsoleLogger.php | 4 +--- |
2269 | + src/Symfony/Component/Console/composer.json | 5 ++--- |
2270 | + src/Symfony/Component/HttpKernel/Log/Logger.php | 4 +--- |
2271 | + src/Symfony/Component/HttpKernel/composer.json | 4 ++-- |
2272 | + 5 files changed, 8 insertions(+), 13 deletions(-) |
2273 | + |
2274 | +Origin: backport, https://github.com/symfony/symfony/commit/95029e560d8805efaac9399496028c2ccdac6c24 |
2275 | +Applied-Upstream: 6.0.0, 95029e560d8805efaac9399496028c2ccdac6c24 |
2276 | +Reviewed-By: Bryce Harrington <bryce@canonical.com> |
2277 | +Last-Update: 2022-02-28 |
2278 | + |
2279 | +--- a/composer.json |
2280 | ++++ b/composer.json |
2281 | +@@ -23,7 +23,7 @@ |
2282 | + "psr/event-dispatcher-implementation": "1.0", |
2283 | + "psr/http-client-implementation": "1.0", |
2284 | + "psr/link-implementation": "1.0", |
2285 | +- "psr/log-implementation": "1.0|2.0", |
2286 | ++ "psr/log-implementation": "1.0|2.0|3.0", |
2287 | + "psr/simple-cache-implementation": "1.0|2.0", |
2288 | + "symfony/cache-implementation": "1.0|2.0", |
2289 | + "symfony/event-dispatcher-implementation": "2.0", |
2290 | +@@ -42,7 +42,7 @@ |
2291 | + "psr/container": "^1.1.1", |
2292 | + "psr/event-dispatcher": "^1.0", |
2293 | + "psr/link": "^1.0", |
2294 | +- "psr/log": "^1|^2", |
2295 | ++ "psr/log": "^1|^2|^3", |
2296 | + "symfony/contracts": "^2.1", |
2297 | + "symfony/polyfill-ctype": "~1.8", |
2298 | + "symfony/polyfill-intl-grapheme": "~1.0", |
2299 | +--- a/src/Symfony/Component/Console/composer.json |
2300 | ++++ b/src/Symfony/Component/Console/composer.json |
2301 | +@@ -31,10 +31,10 @@ |
2302 | + "symfony/lock": "^4.4|^5.0|^6.0", |
2303 | + "symfony/process": "^4.4|^5.0|^6.0", |
2304 | + "symfony/var-dumper": "^4.4|^5.0|^6.0", |
2305 | +- "psr/log": "^1|^2" |
2306 | ++ "psr/log": "^1|^2|^3" |
2307 | + }, |
2308 | + "provide": { |
2309 | +- "psr/log-implementation": "1.0|2.0" |
2310 | ++ "psr/log-implementation": "1.0|2.0|3.0" |
2311 | + }, |
2312 | + "suggest": { |
2313 | + "symfony/event-dispatcher": "", |
2314 | +@@ -43,7 +43,6 @@ |
2315 | + "psr/log": "For using the console logger" |
2316 | + }, |
2317 | + "conflict": { |
2318 | +- "psr/log": ">=3", |
2319 | + "symfony/dependency-injection": "<4.4", |
2320 | + "symfony/dotenv": "<5.1", |
2321 | + "symfony/event-dispatcher": "<4.4", |
2322 | +--- a/src/Symfony/Component/Console/Logger/ConsoleLogger.php |
2323 | ++++ b/src/Symfony/Component/Console/Logger/ConsoleLogger.php |
2324 | +@@ -61,10 +61,8 @@ |
2325 | + |
2326 | + /** |
2327 | + * {@inheritdoc} |
2328 | +- * |
2329 | +- * @return void |
2330 | + */ |
2331 | +- public function log($level, $message, array $context = []) |
2332 | ++ public function log($level, $message, array $context = []): void |
2333 | + { |
2334 | + if (!isset($this->verbosityLevelMap[$level])) { |
2335 | + throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); |
2336 | +--- a/src/Symfony/Component/HttpKernel/composer.json |
2337 | ++++ b/src/Symfony/Component/HttpKernel/composer.json |
2338 | +@@ -24,7 +24,7 @@ |
2339 | + "symfony/polyfill-ctype": "^1.8", |
2340 | + "symfony/polyfill-php73": "^1.9", |
2341 | + "symfony/polyfill-php80": "^1.16", |
2342 | +- "psr/log": "^1|^2" |
2343 | ++ "psr/log": "^1|^2|^3" |
2344 | + }, |
2345 | + "require-dev": { |
2346 | + "symfony/browser-kit": "^5.4|^6.0", |
2347 | +@@ -45,7 +45,7 @@ |
2348 | + "twig/twig": "^2.13|^3.0.4" |
2349 | + }, |
2350 | + "provide": { |
2351 | +- "psr/log-implementation": "1.0|2.0" |
2352 | ++ "psr/log-implementation": "1.0|2.0|3.0" |
2353 | + }, |
2354 | + "conflict": { |
2355 | + "symfony/browser-kit": "<5.4", |
2356 | +--- a/src/Symfony/Component/HttpKernel/Log/Logger.php |
2357 | ++++ b/src/Symfony/Component/HttpKernel/Log/Logger.php |
2358 | +@@ -70,10 +70,8 @@ |
2359 | + |
2360 | + /** |
2361 | + * {@inheritdoc} |
2362 | +- * |
2363 | +- * @return void |
2364 | + */ |
2365 | +- public function log($level, $message, array $context = []) |
2366 | ++ public function log($level, $message, array $context = []): void |
2367 | + { |
2368 | + if (!isset(self::LEVELS[$level])) { |
2369 | + throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); |
2370 | diff --git a/debian/patches/series b/debian/patches/series |
2371 | index 523c753..39129e3 100644 |
2372 | --- a/debian/patches/series |
2373 | +++ b/debian/patches/series |
2374 | @@ -20,7 +20,6 @@ Workaround-failing-tests-with-php7.4.patch |
2375 | String-Drop-data-causing-tests-to-fail.patch |
2376 | HttpClient-Skip-tests-relying-on-amphp-http-client.patch |
2377 | PhpUnit-Skip-test-currently-failing.patch |
2378 | -Adapt-conflict-to-Debian-expectations.patch |
2379 | Drop-composer-plugin-api-that-confuses-pkg-php-tools.patch |
2380 | Revert-ErrorHandler-Skip-same-vendor-method-deprecations-.patch |
2381 | Config-Partially-revert-4c2c5c9ba76ba8db9e88748ae519605c0.patch |
2382 | @@ -29,3 +28,9 @@ Console-Skip-test-failing-on-CI.patch |
2383 | Lock-Drop-test-currently-failing-on-buildd.patch |
2384 | Intl-Fix-QQQQQ-date-format.patch |
2385 | Form-Drop-tests-currently-failing.patch |
2386 | +implement-psr-log-3.patch |
2387 | +implement-psr-link-2.patch |
2388 | +drop-conflict-email-validator.patch |
2389 | +implement-psr-container-2.patch |
2390 | +implement-psr-cache-3.patch |
2391 | +add-return-types.patch |
2392 | diff --git a/debian/rules b/debian/rules |
2393 | index 2ae0dc1..92e2ac9 100755 |
2394 | --- a/debian/rules |
2395 | +++ b/debian/rules |
2396 | @@ -110,20 +110,20 @@ endif |
2397 | done |
2398 | |
2399 | override_dh_auto_test: |
2400 | - ln -s ./src/Symfony ./Symfony |
2401 | - mkdir --parents vendor |
2402 | - cp debian/autoload_runtime.php vendor |
2403 | - phpab --output vendor/autoload.php \ |
2404 | - --whitelist '*\\tests\\*' \ |
2405 | - --tolerant \ |
2406 | - --template debian/autoload.php.tests.tpl \ |
2407 | - --blacklist 'symfony\\component\\dependencyinjection\\tests\\fixtures\\container\\projectservicecontainer' \ |
2408 | - --exclude 'Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/Fixtures/proxy-implem.php' \ |
2409 | - --exclude 'Symfony/Component/Routing/Tests/Fixtures/AttributesFixtures/*' \ |
2410 | - Symfony |
2411 | + #ln -s ./src/Symfony ./Symfony |
2412 | + #mkdir --parents vendor |
2413 | + #cp debian/autoload_runtime.php vendor |
2414 | + #phpab --output vendor/autoload.php \ |
2415 | + # --whitelist '*\\tests\\*' \ |
2416 | + # --tolerant \ |
2417 | + # --template debian/autoload.php.tests.tpl \ |
2418 | + # --blacklist 'symfony\\component\\dependencyinjection\\tests\\fixtures\\container\\projectservicecontainer' \ |
2419 | + # --exclude 'Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/Fixtures/proxy-implem.php' \ |
2420 | + # --exclude 'Symfony/Component/Routing/Tests/Fixtures/AttributesFixtures/*' \ |
2421 | + # Symfony |
2422 | # Actual tests suite |
2423 | - components=$$(find src/Symfony -mindepth 3 -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n') && \ |
2424 | - echo "$$components" | parallel --gnu --keep-order '/bin/echo -e "\\nRunning {} tests"; SYMFONY_DEPRECATIONS_HELPER=weak phpunit -v --colors=always --exclude-group network,tty,benchmark,intl-data,functional,composer {} || (/bin/echo -e "\\e[41mKO\\e[0m {}" && $$(exit 1));'; |
2425 | + #components=$$(find src/Symfony -mindepth 3 -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n') && \ |
2426 | + # echo "$$components" | parallel --gnu --keep-order '/bin/echo -e "\\nRunning {} tests"; SYMFONY_DEPRECATIONS_HELPER=weak phpunit -v --colors=always --exclude-group network,tty,benchmark,intl-data,functional,composer {} || (/bin/echo -e "\\e[41mKO\\e[0m {}" && $$(exit 1));'; |
2427 | |
2428 | override_dh_phpcomposer: |
2429 | dh_phpcomposer --package=php-symfony --sourcedirectory=./ |
2430 | diff --git a/debian/tests/control b/debian/tests/control |
2431 | index f3f596b..e0222e8 100644 |
2432 | --- a/debian/tests/control |
2433 | +++ b/debian/tests/control |
2434 | @@ -1,5 +1,5 @@ |
2435 | Tests: phpunit |
2436 | -Restrictions: rw-build-tree, allow-stderr |
2437 | +Restrictions: rw-build-tree, allow-stderr, flaky |
2438 | Depends: composer, |
2439 | locales-all, |
2440 | parallel, |
2441 | @@ -7,6 +7,7 @@ Depends: composer, |
2442 | php-amqp, |
2443 | php-async-aws-sqs, |
2444 | php-cache-integration-tests, |
2445 | + php-cache-tag-interop, |
2446 | php-curl, |
2447 | php-doctrine-annotations, |
2448 | php-doctrine-data-fixtures, |
This is ready for review. As seen in Bileto, doctrine will also need a rebuild to get things set after polyfill being dropped.