Merge branch '2.3'

* 2.3:
  Update JsonResponse.php
  [HttpKernel] fixed the inline renderer when passing objects as attributes (closes #7124)
  CookieJar remove unneeded var, Client remove unneeded else
  [DI] Fixed bug requesting non existing service from dumped frozen container
  Update validators.sk.xlf
  [WebProfiler] fix content-type parameter
  Replace romaji period characters with Japanese style zenkaku period characters
  fixed CS
  fixed CS
  [Console] Avoided an unnecessary check.
  Added missing French validator translations
  typo first->second
  Passed the config when building the Configuration in ConfigurableExtension
  removed unused code
  Fixed variable name used in translation cache

Conflicts:
	src/Symfony/Component/Console/Event/ConsoleCommandEvent.php
This commit is contained in:
Fabien Potencier 2013-07-08 15:37:01 +02:00
commit 99f97e59f1
93 changed files with 292 additions and 166 deletions

View File

@ -12,8 +12,6 @@
namespace Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass; namespace Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;

View File

@ -13,10 +13,8 @@ namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests;
require_once __DIR__ . '/Fixtures/includes/foo.php'; require_once __DIR__ . '/Fixtures/includes/foo.php';
use ProxyManager\Configuration;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Integration tests for {@see \Symfony\Component\DependencyInjection\ContainerBuilder} combined * Integration tests for {@see \Symfony\Component\DependencyInjection\ContainerBuilder} combined

View File

@ -11,10 +11,8 @@
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Dumper; namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Dumper;
use ProxyManager\Configuration;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper; use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
/** /**
@ -46,7 +44,6 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
); );
} }
/** /**
* Verifies that the generated container retrieves the same proxy instance on multiple subsequent requests * Verifies that the generated container retrieves the same proxy instance on multiple subsequent requests
*/ */

View File

@ -194,5 +194,4 @@ class stdClass_c1d194250ee2e2b7d2eab8b8212368a8 extends \stdClass implements \Pr
return $this->valueHolder5157dd96e88c0; return $this->valueHolder5157dd96e88c0;
} }
} }

View File

@ -11,7 +11,6 @@
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator; namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator;
use ProxyManager\Configuration;
use ProxyManager\Proxy\LazyLoadingInterface; use ProxyManager\Proxy\LazyLoadingInterface;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;

View File

@ -11,9 +11,7 @@
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator; namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator;
use ProxyManager\Configuration;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
/** /**

View File

@ -19,7 +19,6 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Yaml\Yaml;
/** /**
* A command that parse templates to extract translation messages and add them into the translation files. * A command that parse templates to extract translation messages and add them into the translation files.

View File

@ -41,11 +41,11 @@ class SerializerPass implements CompilerPassInterface
private function findAndSortTaggedServices($tagName, ContainerBuilder $container) private function findAndSortTaggedServices($tagName, ContainerBuilder $container)
{ {
$services = $container->findTaggedServiceIds($tagName); $services = $container->findTaggedServiceIds($tagName);
if (empty($services)) { if (empty($services)) {
throw new \RuntimeException(sprintf('You must tag at least one service as "%s" to use the Serializer service', $tagName)); throw new \RuntimeException(sprintf('You must tag at least one service as "%s" to use the Serializer service', $tagName));
} }
$sortedServices = array(); $sortedServices = array();
foreach ($services as $serviceId => $tags) { foreach ($services as $serviceId => $tags) {
foreach ($tags as $tag) { foreach ($tags as $tag) {

View File

@ -138,7 +138,6 @@ class FormHelper extends Helper
{ {
// Uncomment this as soon as the deprecation note should be shown // Uncomment this as soon as the deprecation note should be shown
// trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED); // trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED);
return $this->renderer->searchAndRenderBlock($view, 'enctype'); return $this->renderer->searchAndRenderBlock($view, 'enctype');
} }

View File

@ -17,7 +17,7 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass;
/** /**
* Tests for the SerializerPass class * Tests for the SerializerPass class
* *
* @author Javier Lopez <f12loalf@gmail.com> * @author Javier Lopez <f12loalf@gmail.com>
*/ */
class SerializerPassTest extends \PHPUnit_Framework_TestCase class SerializerPassTest extends \PHPUnit_Framework_TestCase
@ -26,50 +26,50 @@ class SerializerPassTest extends \PHPUnit_Framework_TestCase
public function testThrowExceptionWhenNoNormalizers() public function testThrowExceptionWhenNoNormalizers()
{ {
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
$container->expects($this->once()) $container->expects($this->once())
->method('hasDefinition') ->method('hasDefinition')
->with('serializer') ->with('serializer')
->will($this->returnValue(true)); ->will($this->returnValue(true));
$container->expects($this->once()) $container->expects($this->once())
->method('findTaggedServiceIds') ->method('findTaggedServiceIds')
->with('serializer.normalizer') ->with('serializer.normalizer')
->will($this->returnValue(array())); ->will($this->returnValue(array()));
$this->setExpectedException('RuntimeException'); $this->setExpectedException('RuntimeException');
$serializerPass = new SerializerPass(); $serializerPass = new SerializerPass();
$serializerPass->process($container); $serializerPass->process($container);
} }
public function testThrowExceptionWhenNoEncoders() public function testThrowExceptionWhenNoEncoders()
{ {
$definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition');
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
$container->expects($this->once()) $container->expects($this->once())
->method('hasDefinition') ->method('hasDefinition')
->with('serializer') ->with('serializer')
->will($this->returnValue(true)); ->will($this->returnValue(true));
$container->expects($this->any()) $container->expects($this->any())
->method('findTaggedServiceIds') ->method('findTaggedServiceIds')
->will($this->onConsecutiveCalls( ->will($this->onConsecutiveCalls(
array('n' => array('serializer.normalizer')), array('n' => array('serializer.normalizer')),
array() array()
)); ));
$container->expects($this->once()) $container->expects($this->once())
->method('getDefinition') ->method('getDefinition')
->will($this->returnValue($definition)); ->will($this->returnValue($definition));
$this->setExpectedException('RuntimeException'); $this->setExpectedException('RuntimeException');
$serializerPass = new SerializerPass(); $serializerPass = new SerializerPass();
$serializerPass->process($container); $serializerPass->process($container);
} }
public function testServicesAreOrderedAccordingToPriority() public function testServicesAreOrderedAccordingToPriority()
{ {
$services = array( $services = array(
@ -77,7 +77,7 @@ class SerializerPassTest extends \PHPUnit_Framework_TestCase
'n1' => array('tag' => array('priority' => 200)), 'n1' => array('tag' => array('priority' => 200)),
'n2' => array('tag' => array('priority' => 100)) 'n2' => array('tag' => array('priority' => 100))
); );
$expected = array( $expected = array(
new Reference('n1'), new Reference('n1'),
new Reference('n2'), new Reference('n2'),
@ -91,15 +91,15 @@ class SerializerPassTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue($services)); ->will($this->returnValue($services));
$serializerPass = new SerializerPass(); $serializerPass = new SerializerPass();
$method = new \ReflectionMethod( $method = new \ReflectionMethod(
'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass', 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass',
'findAndSortTaggedServices' 'findAndSortTaggedServices'
); );
$method->setAccessible(TRUE); $method->setAccessible(TRUE);
$actual = $method->invoke($serializerPass, 'tag', $container); $actual = $method->invoke($serializerPass, 'tag', $container);
$this->assertEquals($expected, $actual); $this->assertEquals($expected, $actual);
} }
} }

View File

@ -128,7 +128,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
'debug' => '%kernel.debug%', 'debug' => '%kernel.debug%',
), ),
'serializer' => array( 'serializer' => array(
'enabled' => false 'enabled' => false
) )
); );
} }

View File

@ -0,0 +1,46 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\DependencyInjection\ContainerAware;
class FragmentController extends ContainerAware
{
public function indexAction()
{
$actions = $this->container->get('templating')->get('actions');
return new Response($actions->render($actions->controller('TestBundle:Fragment:inlined', array(
'options' => array(
'bar' => new Bar(),
'eleven' => 11,
),
))));
}
public function inlinedAction($options, $_format)
{
return new Response($options['bar']->getBar().' '.$_format);
}
}
class Bar
{
private $bar = 'bar';
public function getBar()
{
return $this->bar;
}
}

View File

@ -45,7 +45,6 @@ class SubRequestController extends ContainerAware
// The RouterListener is also tested as if it does not keep the right // The RouterListener is also tested as if it does not keep the right
// Request in the context, a 301 would be generated // Request in the context, a 301 would be generated
return new Response($content); return new Response($content);
} }

View File

@ -36,3 +36,11 @@ subrequest_fragment:
path: /subrequest/fragment/{_locale}.{_format} path: /subrequest/fragment/{_locale}.{_format}
defaults: { _controller: TestBundle:SubRequest:fragment, _format: "html" } defaults: { _controller: TestBundle:SubRequest:fragment, _format: "html" }
schemes: [http] schemes: [http]
fragment_home:
path: /fragment_home
defaults: { _controller: TestBundle:Fragment:index, _format: txt }
fragment_inlined:
path: /fragment_inlined
defaults: { _controller: TestBundle:Fragment:inlined }

View File

@ -0,0 +1,41 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
/**
* @group functional
*/
class FragmentTest extends WebTestCase
{
/**
* @dataProvider getConfigs
*/
public function testFragment($insulate)
{
$client = $this->createClient(array('test_case' => 'Fragment', 'root_config' => 'config.yml'));
if ($insulate) {
$client->insulate();
}
$client->request('GET', '/fragment_home');
$this->assertEquals('bar txt', $client->getResponse()->getContent());
}
public function getConfigs()
{
return array(
array(false),
array(true),
);
}
}

View File

@ -0,0 +1,9 @@
<?php
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
return array(
new FrameworkBundle(),
new TestBundle(),
);

View File

@ -0,0 +1,7 @@
imports:
- { resource: ../config/default.yml }
framework:
fragments: ~
templating:
engines: ['php']

View File

@ -0,0 +1,2 @@
_fragmenttest_bundle:
resource: @TestBundle/Resources/config/routing.yml

View File

@ -13,9 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
use Symfony\Bundle\FrameworkBundle\Templating\TimedPhpEngine; use Symfony\Bundle\FrameworkBundle\Templating\TimedPhpEngine;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Symfony\Component\Templating\TemplateNameParser; use Symfony\Component\Templating\TemplateNameParser;
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;

View File

@ -45,13 +45,15 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
{ {
$translator = $this->getTranslator($this->getLoader()); $translator = $this->getTranslator($this->getLoader());
$translator->setLocale('fr'); $translator->setLocale('fr');
$translator->setFallbackLocales(array('en', 'es')); $translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
$this->assertEquals('foo (FR)', $translator->trans('foo')); $this->assertEquals('foo (FR)', $translator->trans('foo'));
$this->assertEquals('bar (EN)', $translator->trans('bar')); $this->assertEquals('bar (EN)', $translator->trans('bar'));
$this->assertEquals('foobar (ES)', $translator->trans('foobar')); $this->assertEquals('foobar (ES)', $translator->trans('foobar'));
$this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0));
$this->assertEquals('no translation', $translator->trans('no translation')); $this->assertEquals('no translation', $translator->trans('no translation'));
$this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo'));
$this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1));
} }
public function testTransWithCaching() public function testTransWithCaching()
@ -59,25 +61,29 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
// prime the cache // prime the cache
$translator = $this->getTranslator($this->getLoader(), array('cache_dir' => $this->tmpDir)); $translator = $this->getTranslator($this->getLoader(), array('cache_dir' => $this->tmpDir));
$translator->setLocale('fr'); $translator->setLocale('fr');
$translator->setFallbackLocales(array('en', 'es')); $translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
$this->assertEquals('foo (FR)', $translator->trans('foo')); $this->assertEquals('foo (FR)', $translator->trans('foo'));
$this->assertEquals('bar (EN)', $translator->trans('bar')); $this->assertEquals('bar (EN)', $translator->trans('bar'));
$this->assertEquals('foobar (ES)', $translator->trans('foobar')); $this->assertEquals('foobar (ES)', $translator->trans('foobar'));
$this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0));
$this->assertEquals('no translation', $translator->trans('no translation')); $this->assertEquals('no translation', $translator->trans('no translation'));
$this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo'));
$this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1));
// do it another time as the cache is primed now // do it another time as the cache is primed now
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
$translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir)); $translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir));
$translator->setLocale('fr'); $translator->setLocale('fr');
$translator->setFallbackLocales(array('en', 'es')); $translator->setFallbackLocale(array('en', 'es', 'pt-PT', 'pt_BR'));
$this->assertEquals('foo (FR)', $translator->trans('foo')); $this->assertEquals('foo (FR)', $translator->trans('foo'));
$this->assertEquals('bar (EN)', $translator->trans('bar')); $this->assertEquals('bar (EN)', $translator->trans('bar'));
$this->assertEquals('foobar (ES)', $translator->trans('foobar')); $this->assertEquals('foobar (ES)', $translator->trans('foobar'));
$this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0));
$this->assertEquals('no translation', $translator->trans('no translation')); $this->assertEquals('no translation', $translator->trans('no translation'));
$this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo'));
$this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1));
} }
public function testGetLocale() public function testGetLocale()
@ -155,6 +161,20 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
'foobar' => 'foobar (ES)', 'foobar' => 'foobar (ES)',
)))) ))))
; ;
$loader
->expects($this->at(3))
->method('load')
->will($this->returnValue($this->getCatalogue('pt-PT', array(
'foobarfoo' => 'foobarfoo (PT-PT)',
))))
;
$loader
->expects($this->at(4))
->method('load')
->will($this->returnValue($this->getCatalogue('pt_BR', array(
'other choice' => '{0} other choice 0 (PT-BR)|{1} other choice 1 (PT-BR)|]1,Inf] other choice inf (PT-BR)',
))))
;
return $loader; return $loader;
} }
@ -183,6 +203,8 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
$translator->addResource('loader', 'foo', 'fr'); $translator->addResource('loader', 'foo', 'fr');
$translator->addResource('loader', 'foo', 'en'); $translator->addResource('loader', 'foo', 'en');
$translator->addResource('loader', 'foo', 'es'); $translator->addResource('loader', 'foo', 'es');
$translator->addResource('loader', 'foo', 'pt-PT'); // European Portuguese
$translator->addResource('loader', 'foo', 'pt_BR'); // Brazilian Portuguese
return $translator; return $translator;
} }

View File

@ -98,6 +98,8 @@ class Translator extends BaseTranslator
$fallbackContent = ''; $fallbackContent = '';
$current = ''; $current = '';
foreach ($this->computeFallbackLocales($locale) as $fallback) { foreach ($this->computeFallbackLocales($locale) as $fallback) {
$fallbackSuffix = ucfirst(str_replace('-', '_', $fallback));
$fallbackContent .= sprintf(<<<EOF $fallbackContent .= sprintf(<<<EOF
\$catalogue%s = new MessageCatalogue('%s', %s); \$catalogue%s = new MessageCatalogue('%s', %s);
\$catalogue%s->addFallbackCatalogue(\$catalogue%s); \$catalogue%s->addFallbackCatalogue(\$catalogue%s);
@ -105,11 +107,11 @@ class Translator extends BaseTranslator
EOF EOF
, ,
ucfirst($fallback), $fallbackSuffix,
$fallback, $fallback,
var_export($this->catalogues[$fallback]->all(), true), var_export($this->catalogues[$fallback]->all(), true),
ucfirst($current), ucfirst(str_replace('-', '_', $current)),
ucfirst($fallback) $fallbackSuffix
); );
$current = $fallback; $current = $fallback;
} }

View File

@ -91,12 +91,14 @@ class SecurityRoutingIntegrationTest extends WebTestCase
$this->assertRestricted($barredClient, '/secured-by-two-ips'); $this->assertRestricted($barredClient, '/secured-by-two-ips');
} }
private function assertAllowed($client, $path) { private function assertAllowed($client, $path)
{
$client->request('GET', $path); $client->request('GET', $path);
$this->assertEquals(404, $client->getResponse()->getStatusCode()); $this->assertEquals(404, $client->getResponse()->getStatusCode());
} }
private function assertRestricted($client, $path) { private function assertRestricted($client, $path)
{
$client->request('GET', $path); $client->request('GET', $path);
$this->assertEquals(302, $client->getResponse()->getStatusCode()); $this->assertEquals(302, $client->getResponse()->getStatusCode());
} }

View File

@ -93,10 +93,10 @@ class ExceptionController
if (!$this->templateExists($template)) { if (!$this->templateExists($template)) {
$handler = new ExceptionHandler(); $handler = new ExceptionHandler();
return new Response($handler->getStylesheet($exception)); return new Response($handler->getStylesheet($exception), 200, array('Content-Type' => 'text/css'));
} }
return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, 'text/css'); return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, array('Content-Type' => 'text/css'));
} }
protected function getTemplate() protected function getTemplate()

View File

@ -78,7 +78,7 @@ abstract class Client
{ {
$this->followRedirects = (Boolean) $followRedirect; $this->followRedirects = (Boolean) $followRedirect;
} }
/** /**
* Sets the maximum number of requests that crawler can follow. * Sets the maximum number of requests that crawler can follow.
* *
@ -329,7 +329,7 @@ abstract class Client
$this->cookieJar->updateFromResponse($this->internalResponse, $uri); $this->cookieJar->updateFromResponse($this->internalResponse, $uri);
$status = $this->internalResponse->getStatus(); $status = $this->internalResponse->getStatus();
if ($status >= 300 && $status < 400) { if ($status >= 300 && $status < 400) {
$this->redirect = $this->internalResponse->getHeader('Location'); $this->redirect = $this->internalResponse->getHeader('Location');
} else { } else {

View File

@ -59,7 +59,7 @@ class CookieJar
} }
// avoid relying on this behavior that is mainly here for BC reasons // avoid relying on this behavior that is mainly here for BC reasons
foreach ($this->cookieJar as $domain => $cookies) { foreach ($this->cookieJar as $cookies) {
if (isset($cookies[$path][$name])) { if (isset($cookies[$path][$name])) {
return $cookies[$path][$name]; return $cookies[$path][$name];
} }

View File

@ -367,7 +367,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
$this->assertInstanceof('LogicException', $e, '->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code'); $this->assertInstanceof('LogicException', $e, '->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code');
} }
} }
public function testFollowRedirectWithMaxRedirects() public function testFollowRedirectWithMaxRedirects()
{ {
$client = new TestClient(); $client = new TestClient();

View File

@ -859,9 +859,7 @@ class Application
if (true === $input->hasParameterOption(array('--no-interaction', '-n'))) { if (true === $input->hasParameterOption(array('--no-interaction', '-n'))) {
$input->setInteractive(false); $input->setInteractive(false);
} } elseif (function_exists('posix_isatty') && $this->getHelperSet()->has('dialog')) {
if (function_exists('posix_isatty') && $this->getHelperSet()->has('dialog')) {
$inputStream = $this->getHelperSet()->get('dialog')->getInputStream(); $inputStream = $this->getHelperSet()->get('dialog')->getInputStream();
if (!posix_isatty($inputStream)) { if (!posix_isatty($inputStream)) {
$input->setInteractive(false); $input->setInteractive(false);

View File

@ -11,16 +11,11 @@
namespace Symfony\Component\Console\Helper; namespace Symfony\Component\Console\Helper;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Descriptor\DescriptorInterface; use Symfony\Component\Console\Descriptor\DescriptorInterface;
use Symfony\Component\Console\Descriptor\JsonDescriptor; use Symfony\Component\Console\Descriptor\JsonDescriptor;
use Symfony\Component\Console\Descriptor\MarkdownDescriptor; use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
use Symfony\Component\Console\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\TextDescriptor;
use Symfony\Component\Console\Descriptor\XmlDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
/** /**

View File

@ -57,7 +57,7 @@ class DialogHelper extends Helper
if ($multiselect) { if ($multiselect) {
// Check for a separated comma values // Check for a separated comma values
if(!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) { if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) {
throw new \InvalidArgumentException(sprintf($errorMessage, $picked)); throw new \InvalidArgumentException(sprintf($errorMessage, $picked));
} }
$selectedChoices = explode(",", $selectedChoices); $selectedChoices = explode(",", $selectedChoices);
@ -74,10 +74,10 @@ class DialogHelper extends Helper
array_push($multiselectChoices, $value); array_push($multiselectChoices, $value);
} }
if ($multiselect){ if ($multiselect) {
return $multiselectChoices; return $multiselectChoices;
} }
return $picked; return $picked;
}, $attempts, $default); }, $attempts, $default);

View File

@ -63,7 +63,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
{ {
$application = new Application('foo', 'bar'); $application = new Application('foo', 'bar');
$this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument'); $this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument');
$this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its first argument'); $this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its second argument');
$this->assertEquals(array('help', 'list'), array_keys($application->all()), '__construct() registered the help and list commands by default'); $this->assertEquals(array('help', 'list'), array_keys($application->all()), '__construct() registered the help and list commands by default');
} }

View File

@ -53,7 +53,6 @@ class HelpCommandTest extends \PHPUnit_Framework_TestCase
$this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
} }
public function testExecuteForApplicationCommandWithXmlOption() public function testExecuteForApplicationCommandWithXmlOption()
{ {
$application = new Application(); $application = new Application();

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\Console\Tests\Descriptor;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Descriptor\DescriptorInterface;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;

View File

@ -18,7 +18,6 @@ use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication1;
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2; use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1; use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2; use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2;
use Symfony\Component\Finder\Shell\Command;
/** /**
* @author Jean-François Simon <contact@jfsimon.fr> * @author Jean-François Simon <contact@jfsimon.fr>

View File

@ -90,7 +90,7 @@ class FunctionExtension extends AbstractExtension
if (0 !== $b) { if (0 !== $b) {
$expr .= ' - '.$b; $expr .= ' - '.$b;
} }
$conditions = array(sprintf('%s %s 0', $expr, $sign)); $conditions = array(sprintf('%s %s 0', $expr, $sign));
if (1 !== $a && -1 !== $a) { if (1 !== $a && -1 !== $a) {
@ -98,7 +98,7 @@ class FunctionExtension extends AbstractExtension
} }
return $xpath->addCondition(implode(' and ', $conditions)); return $xpath->addCondition(implode(' and ', $conditions));
// todo: handle an+b, odd, even // todo: handle an+b, odd, even
// an+b means every-a, plus b, e.g., 2n+1 means odd // an+b means every-a, plus b, e.g., 2n+1 means odd
// 0n+b means b // 0n+b means b

View File

@ -104,6 +104,7 @@ class ErrorHandler
$stack = array_map( $stack = array_map(
function ($row) { function ($row) {
unset($row['args']); unset($row['args']);
return $row; return $row;
}, },
array_slice(debug_backtrace(false), 0, 10) array_slice(debug_backtrace(false), 0, 10)

View File

@ -19,18 +19,18 @@ namespace Symfony\Component\Debug\Exception;
class ContextErrorException extends \ErrorException class ContextErrorException extends \ErrorException
{ {
private $context = array(); private $context = array();
public function __construct($message, $code, $severity, $filename, $lineno, $context = array()) public function __construct($message, $code, $severity, $filename, $lineno, $context = array())
{ {
parent::__construct($message, $code, $severity, $filename, $lineno); parent::__construct($message, $code, $severity, $filename, $lineno);
$this->context = $context; $this->context = $context;
} }
/** /**
* @return array Array of variables that existed when the exception occurred * @return array Array of variables that existed when the exception occurred
*/ */
public function getContext() public function getContext()
{ {
return $this->context; return $this->context;
} }
} }

View File

@ -853,7 +853,11 @@ EOF;
private function addAliases() private function addAliases()
{ {
if (!$aliases = $this->container->getAliases()) { if (!$aliases = $this->container->getAliases()) {
return ''; if ($this->container->isFrozen()) {
return "\n \$this->aliases = array();\n";
} else {
return '';
}
} }
$code = " \$this->aliases = array(\n"; $code = " \$this->aliases = array(\n";

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
/** /**

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
/** /**

View File

@ -134,6 +134,18 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
$this->assertSame($foo, $container->get('alias_for_alias')); $this->assertSame($foo, $container->get('alias_for_alias'));
} }
public function testFrozenContainerWithoutAliases()
{
$container = new ContainerBuilder();
$container->compile();
$dumper = new PhpDumper($container);
eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Frozen_No_Aliases')));
$container = new \Symfony_DI_PhpDumper_Test_Frozen_No_Aliases();
$this->assertFalse($container->has('foo'));
}
public function testOverrideServiceWhenUsingADumpedContainer() public function testOverrideServiceWhenUsingADumpedContainer()
{ {
require_once self::$fixturesPath.'/php/services9.php'; require_once self::$fixturesPath.'/php/services9.php';

View File

@ -36,6 +36,8 @@ class ProjectServiceContainer extends Container
$this->methodMap = array( $this->methodMap = array(
'test' => 'getTestService', 'test' => 'getTestService',
); );
$this->aliases = array();
} }
/** /**

View File

@ -34,6 +34,8 @@ class ProjectServiceContainer extends Container
$this->methodMap = array( $this->methodMap = array(
'foo' => 'getFooService', 'foo' => 'getFooService',
); );
$this->aliases = array();
} }
/** /**

View File

@ -351,6 +351,7 @@ class Form extends Link implements \ArrayAccess
throw new \LogicException(sprintf('The selected node has an invalid form attribute (%s).', $formId)); throw new \LogicException(sprintf('The selected node has an invalid form attribute (%s).', $formId));
} }
$this->node = $form; $this->node = $form;
return; return;
} }
// we loop until we find a form ancestor // we loop until we find a form ancestor

View File

@ -122,7 +122,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase
array('../bar/./../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'), array('../bar/./../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'),
array('../../', 'http://localhost/', 'http://localhost/'), array('../../', 'http://localhost/', 'http://localhost/'),
array('../../', 'http://localhost', 'http://localhost/'), array('../../', 'http://localhost', 'http://localhost/'),
array('/foo', 'file:///', 'file:///foo'), array('/foo', 'file:///', 'file:///foo'),
array('/foo', 'file:///bar/baz', 'file:///foo'), array('/foo', 'file:///bar/baz', 'file:///foo'),
array('foo', 'file:///', 'file:///foo'), array('foo', 'file:///', 'file:///foo'),

View File

@ -88,7 +88,6 @@ abstract class RealIteratorTestCase extends IteratorTestCase
} }
if (is_string($files)) { if (is_string($files)) {
return self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $files); return self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $files);
} }

View File

@ -446,7 +446,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* This method should not be invoked. * This method should not be invoked.
* *
* @param FormFactoryInterface $formFactory * @param FormFactoryInterface $formFactory
* *
* @return void * @return void
* *
* @throws BadMethodCallException * @throws BadMethodCallException

View File

@ -124,7 +124,6 @@ class MergeCollectionListener implements EventSubscriberInterface
$event->setData($dataToMergeInto); $event->setData($dataToMergeInto);
} }
/** /**
* Alias of {@link onSubmit()}. * Alias of {@link onSubmit()}.
* *

View File

@ -149,7 +149,6 @@ class ResizeFormListener implements EventSubscriberInterface
$event->setData($data); $event->setData($data);
} }
/** /**
* Alias of {@link preSubmit()}. * Alias of {@link preSubmit()}.
* *

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Intl;
use Symfony\Component\Locale\Locale;
use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class CountryType extends AbstractType class CountryType extends AbstractType

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Intl;
use Symfony\Component\Locale\Locale;
use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class CurrencyType extends AbstractType class CurrencyType extends AbstractType

View File

@ -156,7 +156,6 @@ class FormType extends BaseType
if (null !== $options['virtual']) { if (null !== $options['virtual']) {
// Uncomment this as soon as the deprecation note should be shown // Uncomment this as soon as the deprecation note should be shown
// trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED); // trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED);
return $options['virtual']; return $options['virtual'];
} }

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Intl;
use Symfony\Component\Locale\Locale;
use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class LanguageType extends AbstractType class LanguageType extends AbstractType

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Form\Extension\HttpFoundation; namespace Symfony\Component\Form\Extension\HttpFoundation;
use Symfony\Component\Form\Exception\InvalidArgumentException;
use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\RequestHandlerInterface; use Symfony\Component\Form\RequestHandlerInterface;

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Form\Extension\Validator\Type; namespace Symfony\Component\Form\Extension\Validator\Type;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper;
use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener; use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener;

View File

@ -358,7 +358,6 @@ class FormConfigBuilder implements FormConfigBuilderInterface
{ {
// Uncomment this as soon as the deprecation note should be shown // Uncomment this as soon as the deprecation note should be shown
// trigger_error('getVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use getInheritData() instead.', E_USER_DEPRECATED); // trigger_error('getVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use getInheritData() instead.', E_USER_DEPRECATED);
return $this->getInheritData(); return $this->getInheritData();
} }

View File

@ -130,6 +130,6 @@ abstract class BaseTypeTest extends \Symfony\Component\Form\Test\TypeTestCase
$this->assertFalse($view->vars['multipart']); $this->assertFalse($view->vars['multipart']);
} }
abstract protected function getTestedType(); abstract protected function getTestedType();
} }

View File

@ -89,7 +89,7 @@ class JsonResponse extends Response
public function setData($data = array()) public function setData($data = array())
{ {
// Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML.
$this->data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT); $this->data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_NUMERIC_CHECK);
return $this->update(); return $this->update();
} }

View File

@ -155,7 +155,6 @@ class RequestMatcher implements RequestMatcherInterface
// Note to future implementors: add additional checks above the // Note to future implementors: add additional checks above the
// foreach above or else your check might not be run! // foreach above or else your check might not be run!
return count($this->ips) === 0; return count($this->ips) === 0;
} }
} }

View File

@ -13,11 +13,8 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy;
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy;
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy;

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; namespace Symfony\Component\HttpFoundation\Tests\Session\Storage;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;

View File

@ -32,7 +32,7 @@ abstract class ConfigurableExtension extends Extension
*/ */
final public function load(array $configs, ContainerBuilder $container) final public function load(array $configs, ContainerBuilder $container)
{ {
$this->loadInternal($this->processConfiguration($this->getConfiguration(array(), $container), $configs), $container); $this->loadInternal($this->processConfiguration($this->getConfiguration($configs, $container), $configs), $container);
} }
/** /**

View File

@ -110,7 +110,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
} }
$renderedAttributes = ''; $renderedAttributes = '';
if (count($attributes) > 0) { if (count($attributes) > 0) {
foreach($attributes as $attribute => $value) { foreach ($attributes as $attribute => $value) {
$renderedAttributes .= sprintf( $renderedAttributes .= sprintf(
' %s="%s"', ' %s="%s"',
htmlspecialchars($attribute, ENT_QUOTES | ENT_SUBSTITUTE, $this->charset, false), htmlspecialchars($attribute, ENT_QUOTES | ENT_SUBSTITUTE, $this->charset, false),

View File

@ -52,7 +52,15 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer
$reference = null; $reference = null;
if ($uri instanceof ControllerReference) { if ($uri instanceof ControllerReference) {
$reference = $uri; $reference = $uri;
// Remove attributes from the genereated URI because if not, the Symfony
// routing system will use them to populate the Request attributes. We don't
// want that as we want to preserve objects (so we manually set Request attributes
// below instead)
$attributes = $reference->attributes;
$reference->attributes = array();
$uri = $this->generateFragmentUri($uri, $request); $uri = $this->generateFragmentUri($uri, $request);
$reference->attributes = $attributes;
} }
$subRequest = $this->createSubRequest($uri, $request); $subRequest = $this->createSubRequest($uri, $request);

View File

@ -52,7 +52,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @api * @api
*/ */
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)

View File

@ -16,9 +16,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\Stopwatch\Stopwatch;
@ -194,7 +191,6 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
->method('isStarted') ->method('isStarted')
->will($this->returnValue(false)); ->will($this->returnValue(false));
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch); $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch);
$kernel = $this->getHttpKernel($dispatcher, function () { return new Response(); }); $kernel = $this->getHttpKernel($dispatcher, function () { return new Response(); });

View File

@ -51,11 +51,7 @@ class InlineFragmentRendererTest extends \PHPUnit_Framework_TestCase
$object = new \stdClass(); $object = new \stdClass();
$subRequest = Request::create('/_fragment?_path=_format%3Dhtml%26_controller%3Dmain_controller'); $subRequest = Request::create('/_fragment?_path=_format%3Dhtml%26_controller%3Dmain_controller');
$subRequest->attributes->replace(array( $subRequest->attributes->replace(array('object' => $object));
'object' => $object,
'_format' => 'html',
'_controller' => 'main_controller',
));
$subRequest->headers->set('x-forwarded-for', array('127.0.0.1')); $subRequest->headers->set('x-forwarded-for', array('127.0.0.1'));
$subRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); $subRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1');

View File

@ -16,15 +16,8 @@ use Symfony\Component\Icu\IcuData;
use Symfony\Component\Icu\IcuLanguageBundle; use Symfony\Component\Icu\IcuLanguageBundle;
use Symfony\Component\Icu\IcuLocaleBundle; use Symfony\Component\Icu\IcuLocaleBundle;
use Symfony\Component\Icu\IcuRegionBundle; use Symfony\Component\Icu\IcuRegionBundle;
use Symfony\Component\Intl\Exception\InvalidArgumentException;
use Symfony\Component\Intl\ResourceBundle\Reader\BinaryBundleReader;
use Symfony\Component\Intl\ResourceBundle\Reader\BufferedBundleReader; use Symfony\Component\Intl\ResourceBundle\Reader\BufferedBundleReader;
use Symfony\Component\Intl\ResourceBundle\Reader\PhpBundleReader;
use Symfony\Component\Intl\ResourceBundle\Reader\StructuredBundleReader; use Symfony\Component\Intl\ResourceBundle\Reader\StructuredBundleReader;
use Symfony\Component\Intl\ResourceBundle\Stub\StubCurrencyBundle;
use Symfony\Component\Intl\ResourceBundle\Stub\StubLanguageBundle;
use Symfony\Component\Intl\ResourceBundle\Stub\StubLocaleBundle;
use Symfony\Component\Intl\ResourceBundle\Stub\StubRegionBundle;
/** /**
* Gives access to internationalization data. * Gives access to internationalization data.

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Intl\Locale; namespace Symfony\Component\Intl\Locale;
use Symfony\Component\Intl\Exception\NotImplementedException;
use Symfony\Component\Intl\Exception\MethodNotImplementedException; use Symfony\Component\Intl\Exception\MethodNotImplementedException;
/** /**

View File

@ -23,7 +23,6 @@ class BufferedBundleReader implements BundleReaderInterface
*/ */
private $reader; private $reader;
private $buffer; private $buffer;
/** /**

View File

@ -21,7 +21,7 @@ class PhpBundleWriter implements BundleWriterInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
function write($path, $locale, $data) public function write($path, $locale, $data)
{ {
$template = <<<TEMPLATE $template = <<<TEMPLATE
<?php <?php

View File

@ -12,12 +12,6 @@
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Icu\IcuData; use Symfony\Component\Icu\IcuData;
use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\ResourceBundle\Transformer\BundleTransformer;
use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\CurrencyBundleTransformationRule;
use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\LanguageBundleTransformationRule;
use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\LocaleBundleTransformationRule;
use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\RegionBundleTransformationRule;
use Symfony\Component\Intl\ResourceBundle\Transformer\StubbingContext;
require_once __DIR__ . '/common.php'; require_once __DIR__ . '/common.php';
require_once __DIR__ . '/autoload.php'; require_once __DIR__ . '/autoload.php';
@ -66,5 +60,4 @@ echo "Copying files from $sourceDir to $targetDir...\n";
$filesystem->mirror($sourceDir, $targetDir); $filesystem->mirror($sourceDir, $targetDir);
echo "Done.\n"; echo "Done.\n";

View File

@ -14,8 +14,6 @@ namespace Symfony\Component\Intl\Tests\DateFormatter;
use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; use Symfony\Component\Intl\DateFormatter\IntlDateFormatter;
use Symfony\Component\Intl\Globals\IntlGlobals; use Symfony\Component\Intl\Globals\IntlGlobals;
use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\Util\IcuVersion;
use Symfony\Component\Intl\Util\Version;
/** /**
* Test case for IntlDateFormatter implementations. * Test case for IntlDateFormatter implementations.

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\Intl\Tests\DateFormatter;
use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; use Symfony\Component\Intl\DateFormatter\IntlDateFormatter;
use Symfony\Component\Intl\Globals\IntlGlobals; use Symfony\Component\Intl\Globals\IntlGlobals;
use Symfony\Component\Intl\Util\Version;
class IntlDateFormatterTest extends AbstractIntlDateFormatterTest class IntlDateFormatterTest extends AbstractIntlDateFormatterTest
{ {

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Intl\Tests\Globals; namespace Symfony\Component\Intl\Tests\Globals;
/** /**
* Test case for intl function implementations. * Test case for intl function implementations.
* *

View File

@ -11,8 +11,6 @@
namespace Symfony\Component\Intl\Tests\Locale; namespace Symfony\Component\Intl\Tests\Locale;
use Symfony\Component\Intl\Stub\StubLocale;
/** /**
* Test case for Locale implementations. * Test case for Locale implementations.
* *

View File

@ -15,7 +15,6 @@ use Symfony\Component\Intl\Globals\IntlGlobals;
use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\Locale; use Symfony\Component\Intl\Locale;
use Symfony\Component\Intl\NumberFormatter\NumberFormatter; use Symfony\Component\Intl\NumberFormatter\NumberFormatter;
use Symfony\Component\Intl\Util\IcuVersion;
use Symfony\Component\Intl\Util\IntlTestHelper; use Symfony\Component\Intl\Util\IntlTestHelper;
/** /**

View File

@ -43,7 +43,6 @@ class LocaleBundleTest extends \PHPUnit_Framework_TestCase
->with(self::RES_DIR, 'en', array('Locales', 'de_AT')) ->with(self::RES_DIR, 'en', array('Locales', 'de_AT'))
->will($this->returnValue('German (Austria)')); ->will($this->returnValue('German (Austria)'));
$this->assertSame('German (Austria)', $this->bundle->getLocaleName('de_AT', 'en')); $this->assertSame('German (Austria)', $this->bundle->getLocaleName('de_AT', 'en'));
} }
@ -60,7 +59,6 @@ class LocaleBundleTest extends \PHPUnit_Framework_TestCase
->with(self::RES_DIR, 'en', array('Locales')) ->with(self::RES_DIR, 'en', array('Locales'))
->will($this->returnValue($sortedLocales)); ->will($this->returnValue($sortedLocales));
$this->assertSame($sortedLocales, $this->bundle->getLocaleNames('en')); $this->assertSame($sortedLocales, $this->bundle->getLocaleNames('en'));
} }
} }

View File

@ -58,7 +58,6 @@ class RegionBundleTest extends \PHPUnit_Framework_TestCase
->with(self::RES_DIR, 'en', array('Countries')) ->with(self::RES_DIR, 'en', array('Countries'))
->will($this->returnValue($sortedCountries)); ->will($this->returnValue($sortedCountries));
$this->assertSame($sortedCountries, $this->bundle->getCountryNames('en')); $this->assertSame($sortedCountries, $this->bundle->getCountryNames('en'));
} }
} }

View File

@ -39,11 +39,11 @@ class IntlTestHelper
// * the intl extension is loaded with version Intl::getIcuStubVersion() // * the intl extension is loaded with version Intl::getIcuStubVersion()
// * the intl extension is not loaded // * the intl extension is not loaded
if (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', $precision = 1)) { if (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', 1)) {
$testCase->markTestSkipped('Please change ICU version to ' . Intl::getIcuStubVersion()); $testCase->markTestSkipped('Please change ICU version to ' . Intl::getIcuStubVersion());
} }
if (IcuVersion::compare(Intl::getIcuDataVersion(), Intl::getIcuStubVersion(), '!=', $precision = 1)) { if (IcuVersion::compare(Intl::getIcuDataVersion(), Intl::getIcuStubVersion(), '!=', 1)) {
$testCase->markTestSkipped('Please change the Icu component to version 1.0.x or 1.' . IcuVersion::normalize(Intl::getIcuStubVersion(), 1) . '.x'); $testCase->markTestSkipped('Please change the Icu component to version 1.0.x or 1.' . IcuVersion::normalize(Intl::getIcuStubVersion(), 1) . '.x');
} }
@ -75,12 +75,12 @@ class IntlTestHelper
} }
// ... and only if the version is *one specific version* ... // ... and only if the version is *one specific version* ...
if (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', $precision = 1)) { if (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', 1)) {
$testCase->markTestSkipped('Please change ICU version to ' . Intl::getIcuStubVersion()); $testCase->markTestSkipped('Please change ICU version to ' . Intl::getIcuStubVersion());
} }
// ... and only if the data in the Icu component matches that version. // ... and only if the data in the Icu component matches that version.
if (IcuVersion::compare(Intl::getIcuDataVersion(), Intl::getIcuStubVersion(), '!=', $precision = 1)) { if (IcuVersion::compare(Intl::getIcuDataVersion(), Intl::getIcuStubVersion(), '!=', 1)) {
$testCase->markTestSkipped('Please change the Icu component to version 1.0.x or 1.' . IcuVersion::normalize(Intl::getIcuStubVersion(), 1) . '.x'); $testCase->markTestSkipped('Please change the Icu component to version 1.0.x or 1.' . IcuVersion::normalize(Intl::getIcuStubVersion(), 1) . '.x');
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Locale\Tests; namespace Symfony\Component\Locale\Tests;
use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\Util\IcuVersion;
use Symfony\Component\Intl\Util\IntlTestHelper; use Symfony\Component\Intl\Util\IntlTestHelper;
use Symfony\Component\Locale\Locale; use Symfony\Component\Locale\Locale;

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Locale\Tests\Stub; namespace Symfony\Component\Locale\Tests\Stub;
use Symfony\Component\Intl\Util\IcuVersion;
use Symfony\Component\Intl\Util\IntlTestHelper; use Symfony\Component\Intl\Util\IntlTestHelper;
use Symfony\Component\Locale\Stub\StubLocale; use Symfony\Component\Locale\Stub\StubLocale;

View File

@ -259,9 +259,9 @@ class Process
stream_set_blocking($pipe, false); stream_set_blocking($pipe, false);
} }
if ($this->tty) { if ($this->tty) {
$this->status = self::STATUS_TERMINATED; $this->status = self::STATUS_TERMINATED;
return; return;
} }
@ -1102,9 +1102,9 @@ class Process
$this->readBytes = array( $this->readBytes = array(
self::STDOUT => 0, self::STDOUT => 0,
); );
return array(array('pipe', 'r'), $this->fileHandles[self::STDOUT], array('pipe', 'w')); return array(array('pipe', 'r'), $this->fileHandles[self::STDOUT], array('pipe', 'w'));
} }
if ($this->tty) { if ($this->tty) {
$descriptors = array( $descriptors = array(

View File

@ -42,7 +42,7 @@ class ProcessUtils
//@see https://bugs.php.net/bug.php?id=49446 //@see https://bugs.php.net/bug.php?id=49446
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$escapedArgument = ''; $escapedArgument = '';
foreach(preg_split('/([%"])/i', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) { foreach (preg_split('/([%"])/i', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) {
if ('"' == $part) { if ('"' == $part) {
$escapedArgument .= '\\"'; $escapedArgument .= '\\"';
} elseif ('%' == $part) { } elseif ('%' == $part) {

View File

@ -8,9 +8,9 @@ pcntl_signal(SIGUSR1, function(){echo "Caught SIGUSR1"; exit;});
$n=0; $n=0;
// ticks require activity to work - sleep(4); does not work // ticks require activity to work - sleep(4); does not work
while($n < 400) { while ($n < 400) {
usleep(10000); usleep(10000);
$n++; $n++;
} }
return; return;

View File

@ -19,7 +19,6 @@ class MagicianCall
{ {
$property = lcfirst(substr($name, 3)); $property = lcfirst(substr($name, 3));
if ('get' === substr($name, 0, 3)) { if ('get' === substr($name, 0, 3)) {
return isset($this->$property) ? $this->$property : null; return isset($this->$property) ? $this->$property : null;
} elseif ('set' === substr($name, 0, 3)) { } elseif ('set' === substr($name, 0, 3)) {
$value = 1 == count($args) ? $args[0] : null; $value = 1 == count($args) ? $args[0] : null;

View File

@ -40,46 +40,46 @@ class BasicPermissionMap implements PermissionMapInterface
MaskBuilder::MASK_MASTER, MaskBuilder::MASK_MASTER,
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),
self::PERMISSION_EDIT => array( self::PERMISSION_EDIT => array(
MaskBuilder::MASK_EDIT, MaskBuilder::MASK_EDIT,
MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_OPERATOR,
MaskBuilder::MASK_MASTER, MaskBuilder::MASK_MASTER,
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),
self::PERMISSION_CREATE => array( self::PERMISSION_CREATE => array(
MaskBuilder::MASK_CREATE, MaskBuilder::MASK_CREATE,
MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_OPERATOR,
MaskBuilder::MASK_MASTER, MaskBuilder::MASK_MASTER,
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),
self::PERMISSION_DELETE => array( self::PERMISSION_DELETE => array(
MaskBuilder::MASK_DELETE, MaskBuilder::MASK_DELETE,
MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_OPERATOR,
MaskBuilder::MASK_MASTER, MaskBuilder::MASK_MASTER,
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),
self::PERMISSION_UNDELETE => array( self::PERMISSION_UNDELETE => array(
MaskBuilder::MASK_UNDELETE, MaskBuilder::MASK_UNDELETE,
MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_OPERATOR,
MaskBuilder::MASK_MASTER, MaskBuilder::MASK_MASTER,
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),
self::PERMISSION_OPERATOR => array( self::PERMISSION_OPERATOR => array(
MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_OPERATOR,
MaskBuilder::MASK_MASTER, MaskBuilder::MASK_MASTER,
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),
self::PERMISSION_MASTER => array( self::PERMISSION_MASTER => array(
MaskBuilder::MASK_MASTER, MaskBuilder::MASK_MASTER,
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),
self::PERMISSION_OWNER => array( self::PERMISSION_OWNER => array(
MaskBuilder::MASK_OWNER, MaskBuilder::MASK_OWNER,
), ),

View File

@ -44,7 +44,7 @@ class JsonDecode implements DecoderInterface
public function __construct($associative = false, $depth = 512) public function __construct($associative = false, $depth = 512)
{ {
$this->associative = $associative; $this->associative = $associative;
$this->recursionDepth = (int)$depth; $this->recursionDepth = (int) $depth;
} }
/** /**

View File

@ -165,8 +165,8 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
{ {
if (in_array($attributeName, $this->camelizedAttributes)) { if (in_array($attributeName, $this->camelizedAttributes)) {
return preg_replace_callback( return preg_replace_callback(
'/(^|_|\.)+(.)/', function ($match) { '/(^|_|\.)+(.)/', function ($match) {
return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); return ('.' === $match[1] ? '_' : '').strtoupper($match[2]);
}, $attributeName }, $attributeName
); );
} }

View File

@ -56,6 +56,7 @@ class IbanValidator extends ConstraintValidator
if ($rest != 1) { if ($rest != 1) {
$this->context->addViolation($constraint->message, array('{{ value }}' => $value)); $this->context->addViolation($constraint->message, array('{{ value }}' => $value));
return; return;
} }
} }

View File

@ -242,6 +242,42 @@
<source>This value is not a valid ISSN.</source> <source>This value is not a valid ISSN.</source>
<target>Cette valeur n'est pas un code ISSN valide.</target> <target>Cette valeur n'est pas un code ISSN valide.</target>
</trans-unit> </trans-unit>
<trans-unit id="64">
<source>This value is not a valid currency.</source>
<target>Cette valeur n'est pas une devise valide.</target>
</trans-unit>
<trans-unit id="65">
<source>This value should be equal to {{ compared_value }}.</source>
<target>Cette valeur doit être égale à {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="66">
<source>This value should be greater than {{ compared_value }}.</source>
<target>Cette valeur doit être supérieure à {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="67">
<source>This value should be greater than or equal to {{ compared_value }}.</source>
<target>Cette valeur doit être supérieure ou égale à {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="68">
<source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source>
<target>Cette valeur doit être identique à {{ compared_value_type }} {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="69">
<source>This value should be less than {{ compared_value }}.</source>
<target>Cette valeur doit être inférieure à {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="70">
<source>This value should be less than or equal to {{ compared_value }}.</source>
<target>Cette valeur doit être inférieure ou égale à {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="71">
<source>This value should not be equal to {{ compared_value }}.</source>
<target>Cette valeur ne doit pas être égale à {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="72">
<source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source>
<target>Cette valeur ne doit pas être identique à {{ compared_value_type }} {{ compared_value }}.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -24,11 +24,11 @@
</trans-unit> </trans-unit>
<trans-unit id="6"> <trans-unit id="6">
<source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source>
<target>{{ limit }}個以上選択してください.</target> <target>{{ limit }}個以上選択してください</target>
</trans-unit> </trans-unit>
<trans-unit id="7"> <trans-unit id="7">
<source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source>
<target>{{ limit }}個以内で選択してください.</target> <target>{{ limit }}個以内で選択してください</target>
</trans-unit> </trans-unit>
<trans-unit id="8"> <trans-unit id="8">
<source>One or more of the given values is invalid.</source> <source>One or more of the given values is invalid.</source>
@ -76,7 +76,7 @@
</trans-unit> </trans-unit>
<trans-unit id="19"> <trans-unit id="19">
<source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source>
<target>値が長すぎます。{{ limit }}文字以内でなければなりません.</target> <target>値が長すぎます。{{ limit }}文字以内でなければなりません</target>
</trans-unit> </trans-unit>
<trans-unit id="20"> <trans-unit id="20">
<source>This value should be {{ limit }} or more.</source> <source>This value should be {{ limit }} or more.</source>
@ -84,7 +84,7 @@
</trans-unit> </trans-unit>
<trans-unit id="21"> <trans-unit id="21">
<source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source>
<target>値が短すぎます。{{ limit }}文字以上でなければなりません.</target> <target>値が短すぎます。{{ limit }}文字以上でなければなりません</target>
</trans-unit> </trans-unit>
<trans-unit id="22"> <trans-unit id="22">
<source>This value should not be blank.</source> <source>This value should not be blank.</source>

View File

@ -24,11 +24,11 @@
</trans-unit> </trans-unit>
<trans-unit id="6"> <trans-unit id="6">
<source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source> <source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source>
<target>Mali by ste vybrať minimálne {{ limit }} možnosti.</target> <target>Mali by ste vybrať minimálne {{ limit }} možnosť.|Mali by ste vybrať minimálne {{ limit }} možnosti.|Mali by ste vybrať minimálne {{ limit }} možností.</target>
</trans-unit> </trans-unit>
<trans-unit id="7"> <trans-unit id="7">
<source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source> <source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source>
<target>Mali by ste vybrať najviac {{ limit }} možnosti.</target> <target>Mali by ste vybrať najviac {{ limit }} možnosť.|Mali by ste vybrať najviac {{ limit }} možnosti.|Mali by ste vybrať najviac {{ limit }} možností.</target>
</trans-unit> </trans-unit>
<trans-unit id="8"> <trans-unit id="8">
<source>One or more of the given values is invalid.</source> <source>One or more of the given values is invalid.</source>
@ -76,7 +76,7 @@
</trans-unit> </trans-unit>
<trans-unit id="19"> <trans-unit id="19">
<source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source> <source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source>
<target>Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znakov.</target> <target>Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znak.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znaky.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znakov.</target>
</trans-unit> </trans-unit>
<trans-unit id="20"> <trans-unit id="20">
<source>This value should be {{ limit }} or more.</source> <source>This value should be {{ limit }} or more.</source>
@ -84,7 +84,7 @@
</trans-unit> </trans-unit>
<trans-unit id="21"> <trans-unit id="21">
<source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source> <source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source>
<target>Táto hodnota nemá dostatočný počet znakov. Minimálny počet znakov je {{ limit }}.</target> <target>Táto hodnota je príliš krátka. Musí obsahovať minimálne {{ limit }} znak.|Táto hodnota je príliš krátka. Musí obsahovať minimálne {{ limit }} znaky.|Táto hodnota je príliš krátka. Minimálny počet znakov je {{ limit }}.</target>
</trans-unit> </trans-unit>
<trans-unit id="22"> <trans-unit id="22">
<source>This value should not be blank.</source> <source>This value should not be blank.</source>
@ -180,7 +180,7 @@
</trans-unit> </trans-unit>
<trans-unit id="48"> <trans-unit id="48">
<source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source>
<target>Táto hodnota by mala mať presne {{ limit }} znakov.</target> <target>Táto hodnota by mala mať presne {{ limit }} znak.|Táto hodnota by mala mať presne {{ limit }} znaky.|Táto hodnota by mala mať presne {{ limit }} znakov.</target>
</trans-unit> </trans-unit>
<trans-unit id="49"> <trans-unit id="49">
<source>The file was only partially uploaded.</source> <source>The file was only partially uploaded.</source>

View File

@ -163,7 +163,7 @@ class IsbnValidatorTest extends \PHPUnit_Framework_TestCase
->expects($this->once()) ->expects($this->once())
->method('addViolation') ->method('addViolation')
->with($constraint->isbn10Message); ->with($constraint->isbn10Message);
$this->validator->validate($isbn, $constraint); $this->validator->validate($isbn, $constraint);
} }