Skip to content

Commit

Permalink
Update dependencies (#17)
Browse files Browse the repository at this point in the history
Change dependencies
  • Loading branch information
paullla authored Jan 17, 2020
1 parent 7be510a commit f1b2bb2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dist: trusty
sudo: false

php:
- 7.1
- 7.3.5

cache:
directories:
Expand All @@ -23,4 +23,4 @@ script:
- export SYMFONY_PHPUNIT_VERSION=5.7.1
- export SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
- export SYMFONY_DEPRECATIONS_HELPER=strict
- vendor/phpunit/phpunit/phpunit --verbose
- vendor/phpunit/phpunit/phpunit --verbose
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
}
],
"require": {
"php": "^7.1",
"php": "^7.2.5",
"api-platform/core": "^2.1",
"doctrine/orm": "^2.4.5",
"doctrine/doctrine-bundle": "^1.6",
"symfony/translation": "^4.2",
"symfony/dependency-injection": "^3.4"
"doctrine/doctrine-bundle": "^1.6 || ^2.0",
"symfony/translation": "*",
"symfony/dependency-injection": "*"
},
"require-dev": {
"phpunit/phpunit": "^7.3"
Expand Down
14 changes: 1 addition & 13 deletions src/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Locastic\ApiPlatformTranslationBundle\Translation;

use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;

/**
* Class Translator
Expand Down Expand Up @@ -55,18 +55,6 @@ public function trans($id, array $parameters = array(), $domain = null, $locale
return $this->translator->trans($id, $parameters, $domain, $locale);
}

/**
* {@inheritdoc}
*/
public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null): string
{
if (!$locale) {
$locale = $this->loadCurrentLocale();
}

return $this->translator->transChoice($id, $number, $parameters, $domain, $locale);
}

/**
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/EventListener/AssignLocaleListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private function loadCurrentLocale()
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp(): void
{
$this->translator = $this->createMock(Translator::class);
$this->defaultLocale = 'en';
Expand Down
4 changes: 2 additions & 2 deletions tests/Translation/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;

/**
* Class TranslatorTest
Expand Down Expand Up @@ -37,7 +37,7 @@ class TranslatorTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp(): void
{
$this->defaultLocale = 'en';
$this->translator = $this->createMock(TranslatorInterface::class);
Expand Down

0 comments on commit f1b2bb2

Please sign in to comment.