Commit e9e1b209 authored by Fabien Potencier's avatar Fabien Potencier

merged branch igorw/1.1-deps (PR #695)

This PR was merged into the master branch.

Discussion
----------

[1.1] Drop support for symfony/* <2.3

I've left the ranges in, because it's likely that we will extend them in the future.

Commits
-------

54be4f51 [1.1] Remove symfony <2.3 hacks
2b45f600 [1.1] Add minimum-stability of dev
8f8ba416 [1.1] Update all symfony version references in the docs to 2.3
7a14b209 [1.1] Update symfony versions in fat composer.json
e9478ddd Drop support for symfony/* <2.3
parents be9969d3 54be4f51
language: php language: php
env: env:
- SYMFONY_DEPS_VERSION=2.1
- SYMFONY_DEPS_VERSION=2.2
- SYMFONY_DEPS_VERSION=2.3 - SYMFONY_DEPS_VERSION=2.3
before_script: before_script:
# symfony/* # symfony/*
- | - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.3' ]; then sed -i 's/>=2.3,<2.4-dev/2.3.*@dev/g' composer.json; composer update --dev --prefer-source; fi"
sed -i 's/^{$/{\n "minimum-stability": "dev",/g' composer.json
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.3' ]; then sed -i 's/>=2.1,<2.4-dev/2.3.*@dev/g' composer.json; composer update --dev --prefer-source; fi"
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.2' ]; then sed -i 's/>=2.1,<2.4-dev/2.2.*/g' composer.json; composer update --dev --prefer-source; fi"
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.1' ]; then sed -i 's/>=2.1\(.[0-9]\+\)\?,<2.4-dev/2.1.*/g' composer.json; composer update --dev --prefer-source; fi"
- composer install --dev --prefer-source - composer install --dev --prefer-source
php: php:
......
{ {
"require": { "require": {
"silex/silex": "~1.0", "silex/silex": "~1.0",
"symfony/browser-kit": "~2.1", "symfony/browser-kit": "~2.3",
"symfony/console": "~2.1", "symfony/console": "~2.3",
"symfony/config": "~2.1", "symfony/config": "~2.3",
"symfony/css-selector": "~2.1", "symfony/css-selector": "~2.3",
"symfony/dom-crawler": "~2.1", "symfony/dom-crawler": "~2.3",
"symfony/filesystem": "~2.1", "symfony/filesystem": "~2.3",
"symfony/finder": "~2.1", "symfony/finder": "~2.3",
"symfony/form": "~2.1", "symfony/form": "~2.3",
"symfony/locale": "~2.1", "symfony/locale": "~2.3",
"symfony/process": "~2.1", "symfony/process": "~2.3",
"symfony/security": "~2.1", "symfony/security": "~2.3",
"symfony/serializer": "~2.1", "symfony/serializer": "~2.3",
"symfony/translation": "~2.1", "symfony/translation": "~2.3",
"symfony/validator": "~2.1", "symfony/validator": "~2.3",
"symfony/monolog-bridge": "~2.1", "symfony/monolog-bridge": "~2.3",
"symfony/twig-bridge": "~2.1", "symfony/twig-bridge": "~2.3",
"doctrine/dbal": ">=2.2.0,<2.4.0-dev", "doctrine/dbal": ">=2.2.0,<2.4.0-dev",
"swiftmailer/swiftmailer": "5.*" "swiftmailer/swiftmailer": "5.*"
} }
......
{ {
"minimum-stability": "dev",
"name": "silex/silex", "name": "silex/silex",
"description": "The PHP micro-framework based on the Symfony2 Components", "description": "The PHP micro-framework based on the Symfony2 Components",
"keywords": ["microframework"], "keywords": ["microframework"],
...@@ -17,37 +18,37 @@ ...@@ -17,37 +18,37 @@
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"pimple/pimple": "1.*", "pimple/pimple": "1.*",
"symfony/event-dispatcher": ">=2.1,<2.4-dev", "symfony/event-dispatcher": ">=2.3,<2.4-dev",
"symfony/http-foundation": ">=2.1,<2.4-dev", "symfony/http-foundation": ">=2.3,<2.4-dev",
"symfony/http-kernel": ">=2.1,<2.4-dev", "symfony/http-kernel": ">=2.3,<2.4-dev",
"symfony/routing": ">=2.1,<2.4-dev" "symfony/routing": ">=2.3,<2.4-dev"
}, },
"require-dev": { "require-dev": {
"symfony/security": ">=2.1,<2.4-dev", "symfony/security": ">=2.3,<2.4-dev",
"symfony/config": ">=2.1,<2.4-dev", "symfony/config": ">=2.3,<2.4-dev",
"symfony/locale": ">=2.1,<2.4-dev", "symfony/locale": ">=2.3,<2.4-dev",
"symfony/form": ">=2.1.4,<2.4-dev", "symfony/form": ">=2.3,<2.4-dev",
"symfony/browser-kit": ">=2.1,<2.4-dev", "symfony/browser-kit": ">=2.3,<2.4-dev",
"symfony/css-selector": ">=2.1,<2.4-dev", "symfony/css-selector": ">=2.3,<2.4-dev",
"symfony/dom-crawler": ">=2.1,<2.4-dev", "symfony/dom-crawler": ">=2.3,<2.4-dev",
"symfony/finder": ">=2.1,<2.4-dev", "symfony/finder": ">=2.3,<2.4-dev",
"symfony/monolog-bridge": ">=2.1,<2.4-dev", "symfony/monolog-bridge": ">=2.3,<2.4-dev",
"symfony/options-resolver": ">=2.1,<2.4-dev", "symfony/options-resolver": ">=2.3,<2.4-dev",
"symfony/process": ">=2.1,<2.4-dev", "symfony/process": ">=2.3,<2.4-dev",
"symfony/serializer": ">=2.1,<2.4-dev", "symfony/serializer": ">=2.3,<2.4-dev",
"symfony/translation": ">=2.1,<2.4-dev", "symfony/translation": ">=2.3,<2.4-dev",
"symfony/twig-bridge": ">=2.1,<2.4-dev", "symfony/twig-bridge": ">=2.3,<2.4-dev",
"symfony/validator": ">=2.1,<2.4-dev", "symfony/validator": ">=2.3,<2.4-dev",
"twig/twig": ">=1.8.0,<2.0-dev", "twig/twig": ">=1.8.0,<2.0-dev",
"doctrine/dbal": ">=2.2.0,<2.4.0-dev", "doctrine/dbal": ">=2.2.0,<2.4.0-dev",
"swiftmailer/swiftmailer": "5.*", "swiftmailer/swiftmailer": "5.*",
"monolog/monolog": "~1.4,>=1.4.1" "monolog/monolog": "~1.4,>=1.4.1"
}, },
"suggest": { "suggest": {
"symfony/browser-kit": ">=2.1,<2.4-dev", "symfony/browser-kit": ">=2.3,<2.4-dev",
"symfony/css-selector": ">=2.1,<2.4-dev", "symfony/css-selector": ">=2.3,<2.4-dev",
"symfony/dom-crawler": ">=2.1,<2.4-dev", "symfony/dom-crawler": ">=2.3,<2.4-dev",
"symfony/form": ">= 2.1.4,<2.4-dev" "symfony/form": ">=2.3,<2.4-dev"
}, },
"autoload": { "autoload": {
"psr-0": { "Silex": "src/" } "psr-0": { "Silex": "src/" }
......
...@@ -4,7 +4,7 @@ Changelog ...@@ -4,7 +4,7 @@ Changelog
1.1.0 (2013-XX-XX) 1.1.0 (2013-XX-XX)
------------------ ------------------
* n/a * **2013-05-03: Dropped support for 2.1 and 2.2 versions of symfony.
1.0.0 (2013-05-03) 1.0.0 (2013-05-03)
------------------ ------------------
......
...@@ -11,7 +11,7 @@ your ``composer.json`` file: ...@@ -11,7 +11,7 @@ your ``composer.json`` file:
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/yaml": "~2.1" "symfony/yaml": "~2.3"
} }
Next, you need to tell the Validation Service that you are not using Next, you need to tell the Validation Service that you are not using
......
...@@ -55,7 +55,7 @@ Registering ...@@ -55,7 +55,7 @@ Registering
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/form": "~2.1.4" "symfony/form": "~2.3"
} }
If you are going to use the validation extension with forms, you must also If you are going to use the validation extension with forms, you must also
...@@ -65,9 +65,9 @@ Registering ...@@ -65,9 +65,9 @@ Registering
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/validator": "~2.1", "symfony/validator": "~2.3",
"symfony/config": "~2.1", "symfony/config": "~2.3",
"symfony/translation": "~2.1" "symfony/translation": "~2.3"
} }
The Symfony Form Component relies on the PHP intl extension. If you don't have The Symfony Form Component relies on the PHP intl extension. If you don't have
...@@ -76,7 +76,7 @@ Registering ...@@ -76,7 +76,7 @@ Registering
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/locale": "~2.1" "symfony/locale": "~2.3"
} }
If you want to use forms in your Twig templates, make sure to install the If you want to use forms in your Twig templates, make sure to install the
...@@ -85,7 +85,7 @@ Registering ...@@ -85,7 +85,7 @@ Registering
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/twig-bridge": "~2.1" "symfony/twig-bridge": "~2.3"
} }
Usage Usage
...@@ -199,4 +199,4 @@ Traits ...@@ -199,4 +199,4 @@ Traits
$app->form($data); $app->form($data);
For more information, consult the `Symfony2 Forms documentation For more information, consult the `Symfony2 Forms documentation
<http://symfony.com/doc/2.1/book/forms.html>`_. <http://symfony.com/doc/2.3/book/forms.html>`_.
...@@ -60,7 +60,7 @@ Registering ...@@ -60,7 +60,7 @@ Registering
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/security": "~2.1" "symfony/security": "~2.3"
} }
.. caution:: .. caution::
...@@ -76,7 +76,7 @@ Usage ...@@ -76,7 +76,7 @@ Usage
The Symfony Security component is powerful. To learn more about it, read the The Symfony Security component is powerful. To learn more about it, read the
`Symfony2 Security documentation `Symfony2 Security documentation
<http://symfony.com/doc/2.1/book/security.html>`_. <http://symfony.com/doc/2.3/book/security.html>`_.
.. tip:: .. tip::
......
...@@ -50,7 +50,7 @@ Registering ...@@ -50,7 +50,7 @@ Registering
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/translation": "~2.1" "symfony/translation": "~2.3"
} }
Usage Usage
...@@ -126,8 +126,8 @@ file: ...@@ -126,8 +126,8 @@ file:
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/config": "~2.1", "symfony/config": "~2.3",
"symfony/yaml": "~2.1" "symfony/yaml": "~2.3"
} }
Next, you have to create the language mappings in YAML files. A naming you can Next, you have to create the language mappings in YAML files. A naming you can
......
...@@ -60,7 +60,7 @@ some Symfony2 components and Twig. Add it as a dependency to your ...@@ -60,7 +60,7 @@ some Symfony2 components and Twig. Add it as a dependency to your
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/twig-bridge": "~2.1" "symfony/twig-bridge": "~2.3"
} }
When present, the ``TwigServiceProvider`` will provide you with the following When present, the ``TwigServiceProvider`` will provide you with the following
......
...@@ -44,7 +44,7 @@ Registering ...@@ -44,7 +44,7 @@ Registering
.. code-block:: json .. code-block:: json
"require": { "require": {
"symfony/validator": "~2.1" "symfony/validator": "~2.3"
} }
Usage Usage
...@@ -131,12 +131,12 @@ the class properties and getters, and then call the ``validate`` method:: ...@@ -131,12 +131,12 @@ the class properties and getters, and then call the ``validate`` method::
$book->title = 'My Book'; $book->title = 'My Book';
$book->author = $author; $book->author = $author;
$metadata = $app['validator.mapping.class_metadata_factory']->getClassMetadata('Author'); $metadata = $app['validator.mapping.class_metadata_factory']->getMetadataFor('Author');
$metadata->addPropertyConstraint('first_name', new Assert\NotBlank()); $metadata->addPropertyConstraint('first_name', new Assert\NotBlank());
$metadata->addPropertyConstraint('first_name', new Assert\Length(array('min' => 10))); $metadata->addPropertyConstraint('first_name', new Assert\Length(array('min' => 10)));
$metadata->addPropertyConstraint('last_name', new Assert\Length(array('min' => 10))); $metadata->addPropertyConstraint('last_name', new Assert\Length(array('min' => 10)));
$metadata = $app['validator.mapping.class_metadata_factory']->getClassMetadata('Book'); $metadata = $app['validator.mapping.class_metadata_factory']->getMetadataFor('Book');
$metadata->addPropertyConstraint('title', new Assert\Length(array('min' => 10))); $metadata->addPropertyConstraint('title', new Assert\Length(array('min' => 10)));
$metadata->addPropertyConstraint('author', new Assert\Valid()); $metadata->addPropertyConstraint('author', new Assert\Valid());
...@@ -150,11 +150,6 @@ the class properties and getters, and then call the ``validate`` method:: ...@@ -150,11 +150,6 @@ the class properties and getters, and then call the ``validate`` method::
echo 'The author is valid'; echo 'The author is valid';
} }
.. note::
If you are using Symfony 2.2, replace the ``getClassMetadata`` calls with
calls to the new ``getMetadataFor`` method.
You can also declare the class constraint by adding a static You can also declare the class constraint by adding a static
``loadValidatorMetadata`` method to your classes:: ``loadValidatorMetadata`` method to your classes::
......
...@@ -28,9 +28,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; ...@@ -28,9 +28,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouteCollection;
use Silex\RequestContext; use Symfony\Component\Routing\RequestContext;
use Silex\RedirectableUrlMatcher;
use Silex\ControllerResolver;
use Silex\EventListener\LocaleListener; use Silex\EventListener\LocaleListener;
use Silex\EventListener\MiddlewareListener; use Silex\EventListener\MiddlewareListener;
use Silex\EventListener\ConverterListener; use Silex\EventListener\ConverterListener;
...@@ -437,10 +435,6 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte ...@@ -437,10 +435,6 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
*/ */
public function sendFile($file, $status = 200, $headers = array(), $contentDisposition = null) public function sendFile($file, $status = 200, $headers = array(), $contentDisposition = null)
{ {
if (!class_exists('Symfony\Component\HttpFoundation\BinaryFileResponse')) {
throw new \RuntimeException('The "sendFile" method is only supported as of Http Foundation 2.2.');
}
return new BinaryFileResponse($file, $status, $headers, true, $contentDisposition); return new BinaryFileResponse($file, $status, $headers, true, $contentDisposition);
} }
......
...@@ -101,11 +101,6 @@ class RememberMeServiceProvider implements ServiceProviderInterface ...@@ -101,11 +101,6 @@ class RememberMeServiceProvider implements ServiceProviderInterface
throw new \LogicException('You must register the SecurityServiceProvider to use the RememberMeServiceProvider'); throw new \LogicException('You must register the SecurityServiceProvider to use the RememberMeServiceProvider');
} }
// In Symfony 2.2, this is a proper subscriber
if ($app['security.remember_me.response_listener'] instanceof EventSubscriberInterface) {
$app['dispatcher']->addSubscriber($app['security.remember_me.response_listener']); $app['dispatcher']->addSubscriber($app['security.remember_me.response_listener']);
} else {
$app['dispatcher']->addListener('kernel.response', array($app['security.remember_me.response_listener'], 'onKernelResponse'));
}
} }
} }
...@@ -33,7 +33,6 @@ use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; ...@@ -33,7 +33,6 @@ use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
use Symfony\Component\Security\Core\Role\RoleHierarchy; use Symfony\Component\Security\Core\Role\RoleHierarchy;
use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator; use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator;
use Symfony\Component\Security\Core\Validator\Constraint\UserPasswordValidator as DeprecatedUserPasswordValidator;
use Symfony\Component\Security\Http\Firewall; use Symfony\Component\Security\Http\Firewall;
use Symfony\Component\Security\Http\FirewallMap; use Symfony\Component\Security\Http\FirewallMap;
use Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener; use Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener;
...@@ -524,13 +523,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -524,13 +523,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
if (isset($app['validator'])) { if (isset($app['validator'])) {
$app['security.validator.user_password_validator'] = $app->share(function ($app) { $app['security.validator.user_password_validator'] = $app->share(function ($app) {
// FIXME: in Symfony 2.2 Symfony\Component\Security\Core\Validator\Constraint
// is replaced by Symfony\Component\Security\Core\Validator\Constraints
if (class_exists('Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator')) {
return new UserPasswordValidator($app['security'], $app['security.encoder_factory']); return new UserPasswordValidator($app['security'], $app['security.encoder_factory']);
}
return new DeprecatedUserPasswordValidator($app['security'], $app['security.encoder_factory']);
}); });
if (!isset($app['validator.validator_service_ids'])) { if (!isset($app['validator.validator_service_ids'])) {
...@@ -543,9 +536,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -543,9 +536,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
public function boot(Application $app) public function boot(Application $app)
{ {
// FIXME: in Symfony 2.2, this is a proper subscriber $app['dispatcher']->addSubscriber($app['security.firewall']);
//$app['dispatcher']->addSubscriber($app['security.firewall']);
$app['dispatcher']->addListener('kernel.request', array($app['security.firewall'], 'onKernelRequest'), 8);
foreach ($this->fakeRoutes as $route) { foreach ($this->fakeRoutes as $route) {
list($method, $pattern, $name) = $route; list($method, $pattern, $name) = $route;
......
...@@ -36,22 +36,11 @@ class ValidatorServiceProvider implements ServiceProviderInterface ...@@ -36,22 +36,11 @@ class ValidatorServiceProvider implements ServiceProviderInterface
$app['translator']->addResource('xliff', dirname($r->getFilename()).'/Resources/translations/validators.'.$app['locale'].'.xlf', $app['locale'], 'validators'); $app['translator']->addResource('xliff', dirname($r->getFilename()).'/Resources/translations/validators.'.$app['locale'].'.xlf', $app['locale'], 'validators');
} }
$params = $r->getConstructor()->getParameters();
if ('validatorInitializers' === $params[2]->getName()) {
// BC: to be removed before 1.0
// Compatibility with symfony/validator 2.1
// can be removed once silex requires 2.2
return new Validator(
$app['validator.mapping.class_metadata_factory'],
$app['validator.validator_factory']
);
} else {
return new Validator( return new Validator(
$app['validator.mapping.class_metadata_factory'], $app['validator.mapping.class_metadata_factory'],
$app['validator.validator_factory'], $app['validator.validator_factory'],
isset($app['translator']) ? $app['translator'] : new DefaultTranslator() isset($app['translator']) ? $app['translator'] : new DefaultTranslator()
); );
}
}); });
$app['validator.mapping.class_metadata_factory'] = $app->share(function ($app) { $app['validator.mapping.class_metadata_factory'] = $app->share(function ($app) {
......
...@@ -28,12 +28,7 @@ class RedirectableUrlMatcher extends BaseRedirectableUrlMatcher ...@@ -28,12 +28,7 @@ class RedirectableUrlMatcher extends BaseRedirectableUrlMatcher
public function redirect($path, $route, $scheme = null) public function redirect($path, $route, $scheme = null)
{ {
$url = $this->context->getBaseUrl().$path; $url = $this->context->getBaseUrl().$path;
$query = $this->context->getQueryString() ?: '';
// Query string support was added to RequestContext in 2.3
// Fall back to parameter injected by url_matcher closure for earlier versions
$query = method_exists($this->context, 'getQueryString')
? $this->context->getQueryString()
: $this->context->getParameter('QUERY_STRING') ?: '';
if ($query !== '') { if ($query !== '') {
$url .= '?'.$query; $url .= '?'.$query;
......
<?php
/*
* This file is part of the Silex framework.
*
* (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 Silex;
use Symfony\Component\Routing\RequestContext as BaseRequestContext;
use Symfony\Component\HttpFoundation\Request;
/**
* Request Context for Symfony <= 2.2
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class RequestContext extends BaseRequestContext
{
public function fromRequest(Request $request)
{
parent::fromRequest($request);
// Inject the query string as a parameter for Symfony versions <= 2.2
if (!method_exists($this, 'getQueryString') && '' !== $qs = $request->server->get('QUERY_STRING')) {
$this->setParameter('QUERY_STRING', $qs);
}
}
}
...@@ -89,8 +89,6 @@ class Route extends BaseRoute ...@@ -89,8 +89,6 @@ class Route extends BaseRoute
/** /**
* Sets the requirement of host on this Route. * Sets the requirement of host on this Route.
* *
* Note that this only works with at least version 2.2 of the Symfony Routing component.
*
* @param string $host The host for which this route should be enabled * @param string $host The host for which this route should be enabled
* *
* @return Route $this The current Route instance * @return Route $this The current Route instance
......
...@@ -142,13 +142,7 @@ class SecurityServiceProviderTest extends WebTestCase ...@@ -142,13 +142,7 @@ class SecurityServiceProviderTest extends WebTestCase
$app->boot(); $app->boot();
// FIXME: in Symfony 2.2 Symfony\Component\Security\Core\Validator\Constraint
// is replaced by Symfony\Component\Security\Core\Validator\Constraints
if (class_exists('Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator')) {
$this->assertInstanceOf('Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator', $app['security.validator.user_password_validator']); $this->assertInstanceOf('Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator', $app['security.validator.user_password_validator']);
} else {
$this->assertInstanceOf('Symfony\Component\Security\Core\Validator\Constraint\UserPasswordValidator', $app['security.validator.user_password_validator']);
}
} }
public function createApplication($authenticationMethod = 'form') public function createApplication($authenticationMethod = 'form')
......
...@@ -87,8 +87,7 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase ...@@ -87,8 +87,7 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase
)); ));
$builder = $app['form.factory']->createBuilder('form', array(), array( $builder = $app['form.factory']->createBuilder('form', array(), array(
'validation_constraint' => $constraints, // symfony/validator >=2.1,<2.3 'constraints' => $constraints,
'constraints' => $constraints, // symfony/validator ~2.3
'csrf_protection' => false, 'csrf_protection' => false,
)); ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment