some backports from master
MODIFY
Data/Generator/CurrencyDataGenerator.php
Data/Generator/CurrencyDataGenerator.php
@@ -51,7 +51,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
+ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
{
return $scanner->scanLocales($sourceDir.'/curr');
}
@@ -59,7 +59,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
+ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
{
$compiler->compile($sourceDir.'/curr', $tempDir);
$compiler->compile($sourceDir.'/misc/currencyNumericCodes.txt', $tempDir);
@@ -76,7 +76,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
+ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
{
$localeBundle = $reader->read($tempDir, $displayLocale);
@@ -97,7 +97,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
$rootBundle = $reader->read($tempDir, 'root');
@@ -110,7 +110,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
$rootBundle = $reader->read($tempDir, 'root');
$supplementalDataBundle = $reader->read($tempDir, 'supplementalData');

MODIFY
Data/Generator/LanguageDataGenerator.php
Data/Generator/LanguageDataGenerator.php
@@ -101,7 +101,7 @@ class LanguageDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
+ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
{
return $scanner->scanLocales($sourceDir.'/lang');
}
@@ -109,7 +109,7 @@ class LanguageDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
+ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
{
$compiler->compile($sourceDir.'/lang', $tempDir);
$compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir);
@@ -126,7 +126,7 @@ class LanguageDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
+ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
{
$localeBundle = $reader->read($tempDir, $displayLocale);
@@ -148,14 +148,14 @@ class LanguageDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
}
/**
* {@inheritdoc}
*/
- protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
$rootBundle = $reader->read($tempDir, 'root');
$metadataBundle = $reader->read($tempDir, 'metadata');

MODIFY
Data/Generator/LocaleDataGenerator.php
Data/Generator/LocaleDataGenerator.php
@@ -36,7 +36,7 @@ class LocaleDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
+ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
{
$this->locales = $scanner->scanLocales($sourceDir.'/locales');
$this->localeAliases = $scanner->scanAliases($sourceDir.'/locales');
@@ -48,7 +48,7 @@ class LocaleDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
+ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
{
$filesystem = new Filesystem();
$filesystem->mkdir([
@@ -74,7 +74,7 @@ class LocaleDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
+ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
{
// Don't generate aliases, as they are resolved during runtime
// Unless an alias is needed as fallback for de-duplication purposes
@@ -133,14 +133,14 @@ class LocaleDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
}
/**
* {@inheritdoc}
*/
- protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
return [
'Locales' => $this->locales,

MODIFY
Data/Generator/RegionDataGenerator.php
Data/Generator/RegionDataGenerator.php
@@ -84,7 +84,7 @@ class RegionDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
+ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
{
return $scanner->scanLocales($sourceDir.'/region');
}
@@ -92,7 +92,7 @@ class RegionDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
+ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
{
$compiler->compile($sourceDir.'/region', $tempDir);
$compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir);
@@ -109,7 +109,7 @@ class RegionDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
+ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
{
$localeBundle = $reader->read($tempDir, $displayLocale);
@@ -131,14 +131,14 @@ class RegionDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
}
/**
* {@inheritdoc}
*/
- protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
$rootBundle = $reader->read($tempDir, 'root');
$metadataBundle = $reader->read($tempDir, 'metadata');

MODIFY
Data/Generator/ScriptDataGenerator.php
Data/Generator/ScriptDataGenerator.php
@@ -38,7 +38,7 @@ class ScriptDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
+ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
{
return $scanner->scanLocales($sourceDir.'/lang');
}
@@ -46,7 +46,7 @@ class ScriptDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
+ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
{
$compiler->compile($sourceDir.'/lang', $tempDir);
}
@@ -62,7 +62,7 @@ class ScriptDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
+ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
{
$localeBundle = $reader->read($tempDir, $displayLocale);
@@ -84,14 +84,14 @@ class ScriptDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
}
/**
* {@inheritdoc}
*/
- protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
$rootBundle = $reader->read($tempDir, 'root');

MODIFY
Data/Generator/TimezoneDataGenerator.php
Data/Generator/TimezoneDataGenerator.php
@@ -42,7 +42,7 @@ class TimezoneDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
+ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
{
$this->localeAliases = $scanner->scanAliases($sourceDir.'/locales');
@@ -52,7 +52,7 @@ class TimezoneDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
+ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
{
$filesystem = new Filesystem();
$filesystem->mkdir($tempDir.'/region');
@@ -75,7 +75,7 @@ class TimezoneDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
+ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
{
if (!$this->zoneToCountryMapping) {
$this->zoneToCountryMapping = self::generateZoneToCountryMapping($reader->read($tempDir, 'windowsZones'));
@@ -126,7 +126,7 @@ class TimezoneDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
$rootBundle = $reader->read($tempDir, 'root');
@@ -139,7 +139,7 @@ class TimezoneDataGenerator extends AbstractDataGenerator
/**
* {@inheritdoc}
*/
- protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
+ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
{
$rootBundle = $reader->read($tempDir, 'root');

some backports from master