8000 bug #33734 [Intl] Fix compile type errors (ro0NL) · symfony/symfony@86d7efa · GitHub
[go: up one dir, main page]

Skip to content

Commit 86d7efa

Browse files
committed
bug #33734 [Intl] Fix compile type errors (ro0NL)
This PR was merged into the 4.4 branch. Discussion ---------- [Intl] Fix compile type errors | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Fixes e.g. `TypeError: Return value of Symfony\Component\Intl\Data\Generator\LanguageDataGenerator::generateDataForRoot() must be of the type array or null, none returned` Adding typehints in `FallbackTrait` seems forgotten, now added as all generator stuff is `@internal` anyway ran on latest PHP. Commits ------- 96fae63 [Intl] Fix compile type errors
2 parents b829439 + 96fae63 commit 86d7efa

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

src/Symfony/Component/Intl/Data/Generator/FallbackTrait.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,14 @@ trait FallbackTrait
2525
private $generatingFallback = false;
2626

2727
/**
28-
* @param string $tempDir
29-
* @param string $displayLocale
30-
*
31-
* @return array|null
32-
*
3328
* @see AbstractDataGenerator::generateDataForLocale()
3429
*/
35-
abstract protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale);
30+
abstract protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array;
3631

3732
/**
38-
* @param string $tempDir
39-
*
40-
* @return array|null
41-
*
4233
* @see AbstractDataGenerator::generateDataForRoot()
4334
*/
44-
abstract protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir);
35+
abstract protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array;
4536

4637
private function generateFallbackData(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): array
4738
{

src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str
150150
*/
151151
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
152152
{
153+
return null;
153154
}
154155

155156
/**

src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str
135135
*/
136136
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
137137
{
138+
return null;
138139
}
139140

140141
/**

src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str
133133
*/
134134
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
135135
{
136+ return null;
136137
}
137138

138139
/**

src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str
8686
*/
8787
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
8888
{
89+
return null;
8990
}
9091

9192
/**

0 commit comments

Comments
 (0)
0