Skip to content

Commit

Permalink
minor #33163 [FrameworkBundle] Add parameter types from Translation (…
Browse files Browse the repository at this point in the history
…derrabus)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[FrameworkBundle] Add parameter types from Translation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32179
| License       | MIT
| Doc PR        | N/A

This PR makes FrameworkBundle incompatible with Translation 4.4. Let's merge whenever we feel ready to do the bump.

Commits
-------

0aaba56 [FrameworkBundle] Add parameter types from Translation.
  • Loading branch information
nicolas-grekas committed Aug 16, 2019
2 parents 966491a + 0aaba56 commit e8f4dfc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php
Expand Up @@ -106,7 +106,7 @@ public function warmUp($cacheDir)
}
}

public function addResource($format, $resource, $locale, $domain = null)
public function addResource(string $format, $resource, string $locale, string $domain = null)
{
if ($this->resourceFiles) {
$this->addResourceFiles();
Expand All @@ -117,7 +117,7 @@ public function addResource($format, $resource, $locale, $domain = null)
/**
* {@inheritdoc}
*/
protected function initializeCatalogue($locale)
protected function initializeCatalogue(string $locale)
{
$this->initialize();
parent::initializeCatalogue($locale);
Expand All @@ -126,7 +126,7 @@ protected function initializeCatalogue($locale)
/**
* @internal
*/
protected function doLoadCatalogue($locale): void
protected function doLoadCatalogue(string $locale): void
{
parent::doLoadCatalogue($locale);

Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/composer.json
Expand Up @@ -49,7 +49,7 @@
"symfony/security-http": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0",
"symfony/stopwatch": "^4.4|^5.0",
"symfony/translation": "^4.4|^5.0",
"symfony/translation": "^5.0",
"symfony/twig-bundle": "^4.4|^5.0",
"symfony/validator": "^4.4|^5.0",
"symfony/var-dumper": "^4.4|^5.0",
Expand Down Expand Up @@ -78,7 +78,7 @@
"symfony/property-info": "<4.4",
"symfony/serializer": "<4.4",
"symfony/stopwatch": "<4.4",
"symfony/translation": "<4.4",
"symfony/translation": "<5.0",
"symfony/twig-bridge": "<4.4",
"symfony/twig-bundle": "<4.4",
"symfony/validator": "<4.4",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Translation/Translator.php
Expand Up @@ -353,7 +353,7 @@ private function getCatalogueCachePath(string $locale)
/**
* @internal
*/
protected function doLoadCatalogue($locale): void
protected function doLoadCatalogue(string $locale): void
{
$this->catalogues[$locale] = new MessageCatalogue($locale);

Expand Down

0 comments on commit e8f4dfc

Please sign in to comment.