From 478375d66424edfe8c9b40cd7f36ed784fba3b62 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 26 Nov 2015 18:53:25 +0100 Subject: [PATCH 1/3] [DI] remove useless condition around unset --- src/Symfony/Component/DependencyInjection/Container.php | 5 +---- src/Symfony/Component/DependencyInjection/Definition.php | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 443a65fb41..fb0e31911b 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -312,10 +312,7 @@ class Container implements IntrospectableContainerInterface $service = $this->$method(); } catch (\Exception $e) { unset($this->loading[$id]); - - if (array_key_exists($id, $this->services)) { - unset($this->services[$id]); - } + unset($this->services[$id]); if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) { return; diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index e2b40ff4b9..690daa9c6a 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -409,9 +409,7 @@ class Definition */ public function clearTag($name) { - if (isset($this->tags[$name])) { - unset($this->tags[$name]); - } + unset($this->tags[$name]); return $this; } From 55f84a3369091e4fcf718472952a6bcb689c491c Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 26 Nov 2015 20:19:29 +0100 Subject: [PATCH 2/3] [SecurityBundle] disable the init:acl command if ACL is not used --- .../Bundle/SecurityBundle/Command/InitAclCommand.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index fff5b1e929..14271dc459 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -23,6 +23,18 @@ use Doctrine\DBAL\Schema\SchemaException; */ class InitAclCommand extends ContainerAwareCommand { + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (!$this->getContainer()->has('security.acl.dbal.connection')) { + return false; + } + + return parent::isEnabled(); + } + /** * {@inheritdoc} */ From 90f3b941d34d9c868bc21a096f96045207e493df Mon Sep 17 00:00:00 2001 From: hainey Date: Fri, 27 Nov 2015 13:33:49 +0900 Subject: [PATCH 3/3] Fixed the wrong source name and the ja translation --- .../Component/Form/Resources/translations/validators.ja.xlf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf index 2e8585a75c..0db5eddbe6 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf @@ -11,8 +11,8 @@ アップロードされたファイルが大きすぎます。小さなファイルで再度アップロードしてください。 - The CSRF token is invalid. - CSRFトークンが無効です。 + The CSRF token is invalid. Please try to resubmit the form. + CSRFトークンが無効です、再送信してください。