Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
* 2.7:
  Fix test name
  fixed CS
  Allow new lines in Messages translated with transchoice() (replacement for #14867)
  [Form] Swap new ChoiceView constructor arguments to ease migrating from the deprecated one
  [2.3] Fix tests on Windows
  [Yaml] remove partial deprecation annotation
  Silence invasive deprecation warnings, opt-in for warnings
  Documenting how to keep option value BC - see #14377

Conflicts:
	src/Symfony/Bridge/Doctrine/composer.json
	src/Symfony/Bridge/Twig/composer.json
  • Loading branch information
fabpot committed Jun 11, 2015
2 parents 7195723 + 3c58b1e commit f521aa5
Show file tree
Hide file tree
Showing 32 changed files with 54 additions and 54 deletions.
4 changes: 2 additions & 2 deletions ConstraintValidator.php
Expand Up @@ -65,7 +65,7 @@ public function initialize(ExecutionContextInterface $context)
*/
protected function buildViolation($message, array $parameters = array())
{
trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

if ($this->context instanceof ExecutionContextInterface2Dot5) {
return $this->context->buildViolation($message, $parameters);
Expand All @@ -88,7 +88,7 @@ protected function buildViolation($message, array $parameters = array())
*/
protected function buildViolationInContext(ExecutionContextInterface $context, $message, array $parameters = array())
{
trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

if ($context instanceof ExecutionContextInterface2Dot5) {
return $context->buildViolation($message, $parameters);
Expand Down
4 changes: 2 additions & 2 deletions ConstraintViolation.php
Expand Up @@ -147,7 +147,7 @@ public function getMessageTemplate()
*/
public function getMessageParameters()
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getParameters() method instead.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getParameters() method instead.', E_USER_DEPRECATED);

return $this->parameters;
}
Expand All @@ -168,7 +168,7 @@ public function getParameters()
*/
public function getMessagePluralization()
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getPlural() method instead.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getPlural() method instead.', E_USER_DEPRECATED);

return $this->plural;
}
Expand Down
2 changes: 1 addition & 1 deletion Constraints/Callback.php
Expand Up @@ -48,7 +48,7 @@ public function __construct($options = null)
}

if (is_array($options) && isset($options['methods'])) {
trigger_error('The "methods" option of the '.__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the "callback" option instead.', E_USER_DEPRECATED);
@trigger_error('The "methods" option of the '.__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the "callback" option instead.', E_USER_DEPRECATED);
}

if (is_array($options) && !isset($options['callback']) && !isset($options['methods']) && !isset($options['groups'])) {
Expand Down
2 changes: 1 addition & 1 deletion Constraints/Collection/Optional.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints\Collection;

trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Optional class instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Optional class instead.', E_USER_DEPRECATED);

use Symfony\Component\Validator\Constraints\Optional as BaseOptional;

Expand Down
2 changes: 1 addition & 1 deletion Constraints/Collection/Required.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints\Collection;

trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Required class instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Required class instead.', E_USER_DEPRECATED);

use Symfony\Component\Validator\Constraints\Required as BaseRequired;

Expand Down
2 changes: 1 addition & 1 deletion Constraints/False.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints;

trigger_error('The '.__NAMESPACE__.'\False class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalse class in the same namespace instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\False class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalse class in the same namespace instead.', E_USER_DEPRECATED);

/**
* @Annotation
Expand Down
2 changes: 1 addition & 1 deletion Constraints/FalseValidator.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints;

trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalseValidator class in the same namespace instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalseValidator class in the same namespace instead.', E_USER_DEPRECATED);

/**
* @author Bernhard Schussek <bschussek@gmail.com>
Expand Down
12 changes: 6 additions & 6 deletions Constraints/GroupSequence.php
Expand Up @@ -107,7 +107,7 @@ public function __construct(array $groups)
*/
public function getIterator()
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

return new \ArrayIterator($this->groups);
}
Expand All @@ -125,7 +125,7 @@ public function getIterator()
*/
public function offsetExists($offset)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

return isset($this->groups[$offset]);
}
Expand All @@ -145,7 +145,7 @@ public function offsetExists($offset)
*/
public function offsetGet($offset)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

if (!isset($this->groups[$offset])) {
throw new OutOfBoundsException(sprintf(
Expand All @@ -169,7 +169,7 @@ public function offsetGet($offset)
*/
public function offsetSet($offset, $value)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

if (null !== $offset) {
$this->groups[$offset] = $value;
Expand All @@ -191,7 +191,7 @@ public function offsetSet($offset, $value)
*/
public function offsetUnset($offset)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

unset($this->groups[$offset]);
}
Expand All @@ -207,7 +207,7 @@ public function offsetUnset($offset)
*/
public function count()
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

return count($this->groups);
}
Expand Down
4 changes: 2 additions & 2 deletions Constraints/IsbnValidator.php
Expand Up @@ -49,10 +49,10 @@ public function validate($value, Constraint $constraint)

if (null === $constraint->type) {
if ($constraint->isbn10 && !$constraint->isbn13) {
trigger_error('The "isbn10" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED);
@trigger_error('The "isbn10" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED);
$constraint->type = 'isbn10';
} elseif ($constraint->isbn13 && !$constraint->isbn10) {
trigger_error('The "isbn13" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED);
@trigger_error('The "isbn13" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED);
$constraint->type = 'isbn13';
}
}
Expand Down
2 changes: 1 addition & 1 deletion Constraints/Null.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints;

trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNull class in the same namespace instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNull class in the same namespace instead.', E_USER_DEPRECATED);

/**
* @Annotation
Expand Down
2 changes: 1 addition & 1 deletion Constraints/NullValidator.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints;

trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNullValidator class in the same namespace instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNullValidator class in the same namespace instead.', E_USER_DEPRECATED);

/**
* @author Bernhard Schussek <bschussek@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion Constraints/True.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints;

trigger_error('The '.__NAMESPACE__.'\True class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrue class in the same namespace instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\True class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrue class in the same namespace instead.', E_USER_DEPRECATED);

/**
* @Annotation
Expand Down
2 changes: 1 addition & 1 deletion Constraints/TrueValidator.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Constraints;

trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrueValidator class in the same namespace instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrueValidator class in the same namespace instead.', E_USER_DEPRECATED);

/**
* @author Bernhard Schussek <bschussek@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion Constraints/Valid.php
Expand Up @@ -41,7 +41,7 @@ public function __construct($options = null)
}

if (is_array($options) && array_key_exists('deep', $options)) {
trigger_error('The "deep" option for the Valid constraint is deprecated since version 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED);
@trigger_error('The "deep" option for the Valid constraint is deprecated since version 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED);
}

parent::__construct($options);
Expand Down
10 changes: 5 additions & 5 deletions Context/ExecutionContext.php
Expand Up @@ -188,7 +188,7 @@ public function addViolation($message, array $parameters = array(), $invalidValu
// API, as they are not present in the new interface anymore.
// You should use buildViolation() instead.
if (func_num_args() > 2) {
trigger_error('The parameters $invalidValue, $plural and $code in method '.__METHOD__.' are deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED);
@trigger_error('The parameters $invalidValue, $plural and $code in method '.__METHOD__.' are deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED);

$this
->buildViolation($message, $parameters)
Expand Down Expand Up @@ -317,7 +317,7 @@ public function getPropertyPath($subPath = '')
*/
public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED);

if (func_num_args() > 2) {
$this
Expand All @@ -344,7 +344,7 @@ public function addViolationAt($subPath, $message, array $parameters = array(),
*/
public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED);

if (is_array($value)) {
// The $traverse flag is ignored for arrays
Expand Down Expand Up @@ -382,7 +382,7 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals
*/
public function validateValue($value, $constraints, $subPath = '', $groups = null)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED);

return $this
->getValidator()
Expand All @@ -397,7 +397,7 @@ public function validateValue($value, $constraints, $subPath = '', $groups = nul
*/
public function getMetadataFactory()
{
trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext::getValidator method in combination with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED);
@trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext::getValidator method in combination with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED);

$validator = $this->getValidator();

Expand Down
2 changes: 1 addition & 1 deletion Context/LegacyExecutionContext.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Context;

trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\MetadataFactoryInterface;
Expand Down
2 changes: 1 addition & 1 deletion Context/LegacyExecutionContextFactory.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Context;

trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);

use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\MetadataFactoryInterface;
Expand Down
2 changes: 1 addition & 1 deletion DefaultTranslator.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator;

trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead.', E_USER_DEPRECATED);
@trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead.', E_USER_DEPRECATED);

use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Exception\BadMethodCallException;
Expand Down
2 changes: 1 addition & 1 deletion ExecutionContext.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator;

trigger_error('The '.__NAMESPACE__.'\ExecutionContext class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\ExecutionContext class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED);

use Symfony\Component\Translation\TranslatorInterface;

Expand Down
2 changes: 1 addition & 1 deletion Mapping/BlackholeMetadataFactory.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Mapping;

trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory class instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory class instead.', E_USER_DEPRECATED);

use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory as MappingBlackHoleMetadataFactory;

Expand Down
2 changes: 1 addition & 1 deletion Mapping/Cache/ApcCache.php
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\Validator\Mapping\Cache;

trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since version 2.5 and will be removed in 3.0. Use DoctrineCache with the Doctrine\Common\Cache\ApcCache class instead.', E_USER_DEPRECATED);
@trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since version 2.5 and will be removed in 3.0. Use DoctrineCache with the Doctrine\Common\Cache\ApcCache class instead.', E_USER_DEPRECATED);

use Symfony\Component\Validator\Mapping\ClassMetadata;

Expand Down

0 comments on commit f521aa5

Please sign in to comment.