Skip to content

Commit

Permalink
Merge 2.x into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Oct 5, 2017
2 parents 007b3d9 + 8879679 commit 3e60778
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Admin/Extension/AbstractTranslatableAdminExtension.php
Expand Up @@ -68,7 +68,7 @@ public function getTranslatableChecker()
public function getTranslatableLocale(AdminInterface $admin)
{
if ($this->translatableLocale == null) {
if ($admin->getRequest()) {
if ($admin->hasRequest()) {
$this->translatableLocale = $admin->getRequest()->get(self::TRANSLATABLE_LOCALE_PARAMETER);
}
if ($this->translatableLocale == null) {
Expand Down
Expand Up @@ -50,6 +50,7 @@ protected function setUp()

$this->admin = $this->prophesize('Sonata\AdminBundle\Admin\AdminInterface');
$this->admin->getRequest()->willReturn($request->reveal());
$this->admin->hasRequest()->willReturn(true);

$this->object = new TranslatableEntity();
}
Expand All @@ -61,7 +62,7 @@ public function testSetLocaleForTranslatableObject()
$this->assertEquals('es', $this->object->getLocale());
}

public function testAlertObjectForTranslatableObject()
public function testAlterObjectForTranslatableObject()
{
$this->extension->alterObject($this->admin->reveal(), $this->object);

Expand Down
2 changes: 2 additions & 0 deletions composer.json
Expand Up @@ -29,12 +29,14 @@
"knplabs/doctrine-behaviors": "^1.0",
"matthiasnoback/symfony-dependency-injection-test": "^0.5 || ^1.0",
"sllh/php-cs-fixer-styleci-bridge": "^2.0",
"sonata-project/doctrine-orm-admin-bundle": "^3.1",
"stof/doctrine-extensions-bundle": "^1.1",
"symfony/phpunit-bridge": "^2.7 || ^3.0"
},
"suggest": {
"doctrine/phpcr-odm": "if you translate odm documents",
"knplabs/doctrine-behaviors": "if you translate orm entities with the knplabs behaviours",
"sonata-project/doctrine-orm-admin-bundle": "if you translate orm entities and search on translated fields",
"stof/doctrine-extensions-bundle": "if you translate orm entities with the gedmo extensions"
},
"conflict": {
Expand Down

0 comments on commit 3e60778

Please sign in to comment.