Merge branch '2.8' into 3.1

* 2.8:
  [VarDumper] Fix test
  Revert "minor #20011 Use UUID for error codes for Form validator. (Koc)"
  Use UUID for error codes for Form validator.
  Use UUID for error codes for Form validator.
  Fixed regression when exception message swallowed when logging it.
  [HttpFoundation] Enable memcached tests with the latest memcached extension
This commit is contained in:
Fabien Potencier 2016-09-21 13:55:10 -07:00
commit b23389d85d
4 changed files with 12 additions and 8 deletions

View File

@ -18,8 +18,8 @@ use Symfony\Component\Validator\Constraint;
*/
class Form extends Constraint
{
const NOT_SYNCHRONIZED_ERROR = 1;
const NO_SUCH_FIELD_ERROR = 2;
const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca';
const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854';
protected static $errorNames = array(
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',

View File

@ -37,8 +37,8 @@ class MemcachedSessionHandlerTest extends \PHPUnit_Framework_TestCase
parent::setUp();
if (version_compare(phpversion('memcached'), '2.2.0', '>=')) {
$this->markTestSkipped('Tests can only be run with memcached extension 2.1.0 or lower');
if (version_compare(phpversion('memcached'), '2.2.0', '>=') && version_compare(phpversion('memcached'), '3.0.0b1', '<')) {
$this->markTestSkipped('Tests can only be run with memcached extension 2.1.0 or lower, or 3.0.0b1 or higher');
}
$this->memcached = $this->getMock('Memcached');

View File

@ -168,6 +168,10 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte
}
if (is_object($context)) {
if ($context instanceof \Exception) {
return sprintf('Exception(%s): %s', get_class($context), $context->getMessage());
}
return sprintf('Object(%s)', get_class($context));
}

View File

@ -31,9 +31,9 @@ class __TwigTemplate_VarDumperFixture_u75a09 extends Twig_Template
public function getSource()
{
return '';
return " foo bar
twig source
";
}
}
/* foo bar*/
/* twig source*/
/* */