diff --git a/src/Symfony/Bundle/DoctrineBundle/Command/EnsureProductionSettingsDoctrineCommand.php b/src/Symfony/Bundle/DoctrineBundle/Command/EnsureProductionSettingsDoctrineCommand.php index 1ff8cb08eeec8..33163ddf4ca3e 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Command/EnsureProductionSettingsDoctrineCommand.php +++ b/src/Symfony/Bundle/DoctrineBundle/Command/EnsureProductionSettingsDoctrineCommand.php @@ -34,13 +34,13 @@ protected function configure() ->setName('doctrine:ensure-production-settings') ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command.') ->setHelp(<<doctrine:cache:clear-metadata command clears all metadata cache for the default entity manager: +The doctrine:ensure-production-settings command ensures that Doctrine is properly configured for a production environment.: - ./app/console doctrine:cache:clear-metadata + ./app/console doctrine:ensure-production-settings -You can also optionally specify the --em option to specify which entity manager to clear the cache for: +You can also optionally specify the --em option to specify which entity manager to use: - ./app/console doctrine:cache:clear-metadata --em=default + ./app/console doctrine:ensure-production-settings --em=default EOT ); } diff --git a/src/Symfony/Bundle/TwigBundle/TokenParser/TransChoiceTokenParser.php b/src/Symfony/Bundle/TwigBundle/TokenParser/TransChoiceTokenParser.php index dce3d07034f62..c9f4fe6da83f2 100644 --- a/src/Symfony/Bundle/TwigBundle/TokenParser/TransChoiceTokenParser.php +++ b/src/Symfony/Bundle/TwigBundle/TokenParser/TransChoiceTokenParser.php @@ -55,7 +55,7 @@ public function parse(\Twig_Token $token) $body = $this->parser->subparse(array($this, 'decideTransChoiceFork'), true); if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) { - throw new \Twig_Error_Syntax('A message must be a simple text', -1); + throw new \Twig_Error_Syntax(sprintf('A message must be a simple text (line %s)', $lineno), -1); } $stream->expect(\Twig_Token::BLOCK_END_TYPE); diff --git a/src/Symfony/Component/Validator/Constraints/EmailValidator.php b/src/Symfony/Component/Validator/Constraints/EmailValidator.php index 0933a39de91f2..1532baaf648fa 100644 --- a/src/Symfony/Component/Validator/Constraints/EmailValidator.php +++ b/src/Symfony/Component/Validator/Constraints/EmailValidator.php @@ -17,7 +17,6 @@ class EmailValidator extends ConstraintValidator { - const PATTERN = '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'; public function isValid($value, Constraint $constraint) { @@ -31,7 +30,7 @@ public function isValid($value, Constraint $constraint) $value = (string)$value; - if (!preg_match(self::PATTERN, $value)) { + if (!filter_var($value, FILTER_VALIDATE_EMAIL)) { $this->setMessage($constraint->message, array('{{ value }}' => $value)); return false; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy