Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b9d08a

Browse files
[Contracts] Add missing return types
1 parent 5d557de commit 8b9d08a

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

.github/expected-missing-return-types.diff

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ sed -i 's/ *"\*\*\/Tests\/"//' composer.json
33
composer u -o
44
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php
55
head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff)
6+
git checkout src/Symfony/Contracts/Service/ResetInterface.php
67
(echo "$head" && echo && git diff -U2 src/) > .github/expected-missing-return-types.diff
78
git checkout composer.json src/
89

@@ -6726,6 +6727,17 @@ index f05db1533b..0e67c63c66 100644
67266727
+ public function finishView(FormView $view, FormInterface $form, array $options): void
67276728
{
67286729
$this->parent?->finishView($view, $form, $options);
6730+
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php
6731+
index 0533883f70..96c39c5cae 100644
6732+
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php
6733+
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php
6734+
@@ -43,5 +43,5 @@ class DummyTranslator implements TranslatorInterface, LocaleAwareInterface
6735+
}
6736+
6737+
- public function setLocale($locale)
6738+
+ public function setLocale($locale): void
6739+
{
6740+
}
67296741
diff --git a/src/Symfony/Component/HttpClient/CachingHttpClient.php b/src/Symfony/Component/HttpClient/CachingHttpClient.php
67306742
index 05a8e6b4c6..232bed6fac 100644
67316743
--- a/src/Symfony/Component/HttpClient/CachingHttpClient.php
@@ -13417,6 +13429,17 @@ index c1a77ad157..1e926dc83a 100644
1341713429
+ public function setParsedLine(int $parsedLine): void
1341813430
{
1341913431
$this->parsedLine = $parsedLine;
13432+
diff --git a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php b/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
13433+
index db40ba13e0..48928ca959 100644
13434+
--- a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
13435+
+++ b/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
13436+
@@ -21,5 +21,5 @@ interface LocaleAwareInterface
13437+
* @throws \InvalidArgumentException If the locale contains invalid characters
13438+
*/
13439+
- public function setLocale(string $locale);
13440+
+ public function setLocale(string $locale): void;
13441+
13442+
/**
1342013443
diff --git a/src/Symfony/Contracts/Translation/TranslatorTrait.php b/src/Symfony/Contracts/Translation/TranslatorTrait.php
1342113444
index e3b0adff05..19d90162ab 100644
1342213445
--- a/src/Symfony/Contracts/Translation/TranslatorTrait.php

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ jobs:
143143
git add .
144144
composer install -q --optimize-autoloader
145145
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php
146+
git checkout src/Symfony/Contracts/Service/ResetInterface.php
146147
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php # ensure the script is idempotent
148+
git checkout src/Symfony/Contracts/Service/ResetInterface.php
147149
git diff --exit-code
148150
149151
- name: Run tests

src/Symfony/Component/HttpClient/Response/MockResponse.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
class MockResponse implements ResponseInterface, StreamableInterface
2727
{
2828
use CommonResponseTrait;
29-
use TransportResponseTrait {
30-
doDestruct as public __destruct;
31-
}
29+
use TransportResponseTrait;
3230

3331
private string|iterable $body;
3432
private array $requestOptions = [];
@@ -106,6 +104,11 @@ public function cancel(): void
106104
}
107105
}
108106

107+
public function __destruct()
108+
{
109+
$this->doDestruct();
110+
}
111+
109112
protected function close(): void
110113
{
111114
$this->inflate = null;

src/Symfony/Contracts/Service/ResetInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@
2626
*/
2727
interface ResetInterface
2828
{
29+
/**
30+
* @return void
31+
*/
2932
public function reset();
3033
}

src/Symfony/Contracts/Translation/LocaleAwareInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ interface LocaleAwareInterface
1616
/**
1717
* Sets the current locale.
1818
*
19+
* @return void
20+
*
1921
* @throws \InvalidArgumentException If the locale contains invalid characters
2022
*/
2123
public function setLocale(string $locale);

0 commit comments

Comments
 (0)