Răsfoiți Sursa

Updating vendor

Julio Montoya 12 ani în urmă
părinte
comite
fd98b58956
64 a modificat fișierele cu 1064 adăugiri și 1865 ștergeri
  1. 1 1
      vendor/autoload.php
  2. 3 3
      vendor/composer/autoload_real.php
  3. 263 406
      vendor/composer/installed.json
  4. 2 2
      vendor/gedmo/doctrine-extensions/doc/tree.md
  5. 12 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Sluggable/Mapping/Event/Adapter/ODM.php
  6. 5 0
      vendor/silex/silex/src/Silex/Application.php
  7. 10 0
      vendor/silex/silex/src/Silex/RedirectableUrlMatcher.php
  8. 14 0
      vendor/silex/silex/tests/Silex/Tests/RouterTest.php
  9. 58 9
      vendor/symfony/console/Symfony/Component/Console/Application.php
  10. 2 0
      vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md
  11. 55 0
      vendor/symfony/console/Symfony/Component/Console/ConsoleEvents.php
  12. 25 0
      vendor/symfony/console/Symfony/Component/Console/Event/ConsoleCommandEvent.php
  13. 67 0
      vendor/symfony/console/Symfony/Component/Console/Event/ConsoleEvent.php
  14. 67 0
      vendor/symfony/console/Symfony/Component/Console/Event/ConsoleForExceptionEvent.php
  15. 58 0
      vendor/symfony/console/Symfony/Component/Console/Event/ConsoleTerminateEvent.php
  16. 10 2
      vendor/symfony/console/Symfony/Component/Console/Tester/ApplicationTester.php
  17. 10 2
      vendor/symfony/console/Symfony/Component/Console/Tester/CommandTester.php
  18. 101 12
      vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php
  19. 3 0
      vendor/symfony/console/Symfony/Component/Console/composer.json
  20. 0 82
      vendor/symfony/form/Symfony/Component/Form/AbstractType.php
  21. 0 40
      vendor/symfony/form/Symfony/Component/Form/AbstractTypeExtension.php
  22. 0 1
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/CoreExtension.php
  23. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php
  24. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
  25. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
  26. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/DateType.php
  27. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/FileType.php
  28. 2 12
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/FormType.php
  29. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/HiddenType.php
  30. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/IntegerType.php
  31. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/MoneyType.php
  32. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/NumberType.php
  33. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/PercentType.php
  34. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TextType.php
  35. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TimeType.php
  36. 1 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php
  37. 6 4
      vendor/symfony/form/Symfony/Component/Form/Extension/Validator/Util/ServerParams.php
  38. 0 8
      vendor/symfony/form/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php
  39. 3 226
      vendor/symfony/form/Symfony/Component/Form/Form.php
  40. 0 28
      vendor/symfony/form/Symfony/Component/Form/FormBuilder.php
  41. 0 38
      vendor/symfony/form/Symfony/Component/Form/FormBuilderInterface.php
  42. 0 188
      vendor/symfony/form/Symfony/Component/Form/FormConfigBuilder.php
  43. 0 11
      vendor/symfony/form/Symfony/Component/Form/FormConfigBuilderInterface.php
  44. 0 9
      vendor/symfony/form/Symfony/Component/Form/FormConfigInterface.php
  45. 46 2
      vendor/symfony/form/Symfony/Component/Form/FormEvent.php
  46. 0 18
      vendor/symfony/form/Symfony/Component/Form/FormEvents.php
  47. 0 70
      vendor/symfony/form/Symfony/Component/Form/FormFactory.php
  48. 2 14
      vendor/symfony/form/Symfony/Component/Form/FormRegistry.php
  49. 0 11
      vendor/symfony/form/Symfony/Component/Form/FormRegistryInterface.php
  50. 0 12
      vendor/symfony/form/Symfony/Component/Form/FormTypeGuesserChain.php
  51. 0 12
      vendor/symfony/form/Symfony/Component/Form/FormTypeGuesserInterface.php
  52. 0 233
      vendor/symfony/form/Symfony/Component/Form/FormView.php
  53. 0 8
      vendor/symfony/form/Symfony/Component/Form/ResolvedFormType.php
  54. 0 16
      vendor/symfony/form/Symfony/Component/Form/Tests/CompoundFormTest.php
  55. 0 13
      vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
  56. 42 0
      vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php
  57. 0 118
      vendor/symfony/form/Symfony/Component/Form/Tests/FormFactoryTest.php
  58. 0 32
      vendor/symfony/form/Symfony/Component/Form/Tests/FormRegistryTest.php
  59. 0 21
      vendor/symfony/form/Symfony/Component/Form/Tests/SimpleFormTest.php
  60. 0 15
      vendor/symfony/form/Symfony/Component/Form/Util/FormUtil.php
  61. 0 5
      vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php
  62. 41 44
      vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php
  63. 49 23
      vendor/symfony/yaml/Symfony/Component/Yaml/Tests/DumperTest.php
  64. 106 10
      vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParserTest.php

+ 1 - 1
vendor/autoload.php

@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInitccfd96f09fad4b03f395700cf22111c8::getLoader();
+return ComposerAutoloaderInitb52b5a6faac8de39f7e396c9295422d0::getLoader();

+ 3 - 3
vendor/composer/autoload_real.php

@@ -2,7 +2,7 @@
 
 // autoload_real.php generated by Composer
 
-class ComposerAutoloaderInitccfd96f09fad4b03f395700cf22111c8
+class ComposerAutoloaderInitb52b5a6faac8de39f7e396c9295422d0
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitccfd96f09fad4b03f395700cf22111c8
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInitccfd96f09fad4b03f395700cf22111c8', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitb52b5a6faac8de39f7e396c9295422d0', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInitccfd96f09fad4b03f395700cf22111c8', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitb52b5a6faac8de39f7e396c9295422d0', 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);

Fișier diff suprimat deoarece este prea mare
+ 263 - 406
vendor/composer/installed.json


+ 2 - 2
vendor/gedmo/doctrine-extensions/doc/tree.md

@@ -1015,7 +1015,7 @@ class Category
 ```
 
 ### MongoDB example (Yaml)
-
+```
 YourNamespace\Document\Category:
     type:               mappedSuperclass
     repositoryClass:    Gedmo\Tree\Document\MongoDB\Repository\MaterializedPathRepository
@@ -1069,7 +1069,7 @@ YourNamespace\Document\Category:
             simple:     true
             gedmo:
                 -   treeParent
-
+```
 
 ### Path generation
 

+ 12 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/Sluggable/Mapping/Event/Adapter/ODM.php

@@ -31,6 +31,18 @@ final class ODM extends BaseAdapterODM implements SluggableAdapter
             $qb->field($meta->identifier)->notEqual($identifier);
         }
         $qb->field($config['slug'])->equals(new \MongoRegex('/^' . preg_quote($slug, '/') . '/'));
+
+        // use the unique_base to restrict the uniqueness check
+        if($config['unique'] && isset($config['unique_base']))
+        {
+            $reflectValue = $meta->getReflectionProperty($config['unique_base'])->getValue($object);
+            if (is_object($reflectValue)) {
+                $qb->field($config['unique_base'] . '.$id')->equals(new \MongoId($reflectValue->getId()));
+            } else {
+                $qb->where("/^" . preg_quote($meta->getReflectionProperty($config['unique_base'])->getValue($object), '/') . "/.test(this." . $config['unique_base'] . ")");
+            }
+        }
+
         $q = $qb->getQuery();
         $q->setHydrate(false);
 

+ 5 - 0
vendor/silex/silex/src/Silex/Application.php

@@ -125,6 +125,11 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
         });
 
         $this['url_matcher'] = $this->share(function () use ($app) {
+            // Inject the query string into the RequestContext for Symfony versions <= 2.2
+            if ($app['request']->server->get('QUERY_STRING') !== '' && !method_exists($app['request_context'], 'getQueryString')) {
+                $app['request_context']->setParameter('QUERY_STRING', $app['request']->server->get('QUERY_STRING'));
+            }
+
             return new RedirectableUrlMatcher($app['routes'], $app['request_context']);
         });
 

+ 10 - 0
vendor/silex/silex/src/Silex/RedirectableUrlMatcher.php

@@ -29,6 +29,16 @@ class RedirectableUrlMatcher extends BaseRedirectableUrlMatcher
     {
         $url = $this->context->getBaseUrl().$path;
 
+        // 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 !== '') {
+            $url .= '?'.$query;
+        }
+
         if ($this->context->getHost()) {
             if ($scheme) {
                 $port = '';

+ 14 - 0
vendor/silex/silex/tests/Silex/Tests/RouterTest.php

@@ -207,6 +207,20 @@ class RouterTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue($response->isRedirect('https://example.com/secured'));
     }
 
+    public function testRequireHttpsRedirectIncludesQueryString()
+    {
+        $app = new Application();
+
+        $app->match('/secured', function () {
+            return 'secured content';
+        })
+        ->requireHttps();
+
+        $request = Request::create('http://example.com/secured?query=string');
+        $response = $app->handle($request);
+        $this->assertTrue($response->isRedirect('https://example.com/secured?query=string'));
+    }
+
     public function testClassNameControllerSyntax()
     {
         $app = new Application();

+ 58 - 9
vendor/symfony/console/Symfony/Component/Console/Application.php

@@ -27,6 +27,10 @@ use Symfony\Component\Console\Helper\HelperSet;
 use Symfony\Component\Console\Helper\FormatterHelper;
 use Symfony\Component\Console\Helper\DialogHelper;
 use Symfony\Component\Console\Helper\ProgressHelper;
+use Symfony\Component\Console\Event\ConsoleCommandEvent;
+use Symfony\Component\Console\Event\ConsoleForExceptionEvent;
+use Symfony\Component\Console\Event\ConsoleTerminateEvent;
+use Symfony\Component\EventDispatcher\EventDispatcher;
 
 /**
  * An Application is the container for a collection of commands.
@@ -56,6 +60,7 @@ class Application
     private $autoExit;
     private $definition;
     private $helperSet;
+    private $dispatcher;
 
     /**
      * Constructor.
@@ -80,6 +85,11 @@ class Application
         }
     }
 
+    public function setDispatcher(EventDispatcher $dispatcher)
+    {
+        $this->dispatcher = $dispatcher;
+    }
+
     /**
      * Runs the current application.
      *
@@ -103,7 +113,7 @@ class Application
         }
 
         try {
-            $statusCode = $this->doRun($input, $output);
+            $exitCode = $this->doRun($input, $output);
         } catch (\Exception $e) {
             if (!$this->catchExceptions) {
                 throw $e;
@@ -114,21 +124,21 @@ class Application
             } else {
                 $this->renderException($e, $output);
             }
-            $statusCode = $e->getCode();
+            $exitCode = $e->getCode();
 
-            $statusCode = is_numeric($statusCode) && $statusCode ? $statusCode : 1;
+            $exitCode = is_numeric($exitCode) && $exitCode ? $exitCode : 1;
         }
 
         if ($this->autoExit) {
-            if ($statusCode > 255) {
-                $statusCode = 255;
+            if ($exitCode > 255) {
+                $exitCode = 255;
             }
             // @codeCoverageIgnoreStart
-            exit($statusCode);
+            exit($exitCode);
             // @codeCoverageIgnoreEnd
         }
 
-        return $statusCode;
+        return $exitCode;
     }
 
     /**
@@ -190,10 +200,10 @@ class Application
         $command = $this->find($name);
 
         $this->runningCommand = $command;
-        $statusCode = $command->run($input, $output);
+        $exitCode = $this->doRunCommand($command, $input, $output);
         $this->runningCommand = null;
 
-        return is_numeric($statusCode) ? $statusCode : 0;
+        return is_numeric($exitCode) ? $exitCode : 0;
     }
 
     /**
@@ -911,6 +921,45 @@ class Application
         return array(null, null);
     }
 
+    /**
+     * Runs the current command.
+     *
+     * If an event dispatcher has been attached to the application,
+     * events are also dispatched during the life-cycle of the command.
+     *
+     * @param Command         $command A Command instance
+     * @param InputInterface  $input   An Input instance
+     * @param OutputInterface $output  An Output instance
+     *
+     * @return integer 0 if everything went fine, or an error code
+     */
+    protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
+    {
+        if (null === $this->dispatcher) {
+            return $command->run($input, $output);
+        }
+
+        $event = new ConsoleCommandEvent($command, $input, $output);
+        $this->dispatcher->dispatch(ConsoleEvents::COMMAND, $event);
+
+        try {
+            $exitCode = $command->run($input, $output);
+        } catch (\Exception $e) {
+            $event = new ConsoleTerminateEvent($command, $input, $output, $e->getCode());
+            $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event);
+
+            $event = new ConsoleForExceptionEvent($command, $input, $output, $e, $event->getExitCode());
+            $this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event);
+
+            throw $event->getException();
+        }
+
+        $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode);
+        $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event);
+
+        return $event->getExitCode();
+    }
+
     /**
      * Gets the name of the command based on input.
      *

+ 2 - 0
vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md

@@ -4,6 +4,8 @@ CHANGELOG
 2.3.0
 -----
 
+ * added support for events in `Application`
+ * added a way to normalize EOLs in `ApplicationTester::getDisplay()` and `CommandTester::getDisplay()`
  * added a way to set the progress bar progress via the `setCurrent` method
 
 2.2.0

+ 55 - 0
vendor/symfony/console/Symfony/Component/Console/ConsoleEvents.php

@@ -0,0 +1,55 @@
+<?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\Component\Console;
+
+/**
+ * Contains all events dispatched by an Application.
+ *
+ * @author Francesco Levorato <git@flevour.net>
+ */
+final class ConsoleEvents
+{
+    /**
+     * The COMMAND event allows you to attach listeners before any command is
+     * executed by the console. It also allows you to modify the command, input and output
+     * before they are handled to the command.
+     *
+     * The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent
+     * instance.
+     *
+     * @var string
+     */
+    const COMMAND = 'console.command';
+
+    /**
+     * The TERMINATE event allows you to attach listeners after a command is
+     * executed by the console.
+     *
+     * The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent
+     * instance.
+     *
+     * @var string
+     */
+    const TERMINATE = 'console.terminate';
+
+    /**
+     * The EXCEPTION event occurs when an uncaught exception appears.
+     *
+     * This event allows you to deal with the exception or
+     * to modify the thrown exception. The event listener method receives
+     * a Symfony\Component\Console\Event\ConsoleForExceptionEvent
+     * instance.
+     *
+     * @var string
+     */
+    const EXCEPTION = 'console.exception';
+}

+ 25 - 0
vendor/symfony/console/Symfony/Component/Console/Event/ConsoleCommandEvent.php

@@ -0,0 +1,25 @@
+<?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\Component\Console\Event;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Allows to do things before the command is executed.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class ConsoleCommandEvent extends ConsoleEvent
+{
+}

+ 67 - 0
vendor/symfony/console/Symfony/Component/Console/Event/ConsoleEvent.php

@@ -0,0 +1,67 @@
+<?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\Component\Console\Event;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\EventDispatcher\Event;
+
+/**
+ * Allows to inspect input and output of a command.
+ *
+ * @author Francesco Levorato <git@flevour.net>
+ */
+class ConsoleEvent extends Event
+{
+    protected $command;
+
+    private $input;
+    private $output;
+
+    public function __construct(Command $command, InputInterface $input, OutputInterface $output)
+    {
+        $this->command = $command;
+        $this->input = $input;
+        $this->output = $output;
+    }
+
+    /**
+     * Gets the command that is executed.
+     *
+     * @return Command A Command instance
+     */
+    public function getCommand()
+    {
+        return $this->command;
+    }
+
+    /**
+     * Gets the input instance.
+     *
+     * @return InputInterface An InputInterface instance
+     */
+    public function getInput()
+    {
+        return $this->input;
+    }
+
+    /**
+     * Gets the output instance.
+     *
+     * @return OutputInterface An OutputInterface instance
+     */
+    public function getOutput()
+    {
+        return $this->output;
+    }
+}

+ 67 - 0
vendor/symfony/console/Symfony/Component/Console/Event/ConsoleForExceptionEvent.php

@@ -0,0 +1,67 @@
+<?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\Component\Console\Event;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Allows to handle exception thrown in a command.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class ConsoleForExceptionEvent extends ConsoleEvent
+{
+    private $exception;
+    private $exitCode;
+
+    public function __construct(Command $command, InputInterface $input, OutputInterface $output, \Exception $exception, $exitCode)
+    {
+        parent::__construct($command, $input, $output);
+
+        $this->setException($exception);
+        $this->exitCode = $exitCode;
+    }
+
+    /**
+     * Returns the thrown exception.
+     *
+     * @return \Exception The thrown exception
+     */
+    public function getException()
+    {
+        return $this->exception;
+    }
+
+    /**
+     * Replaces the thrown exception.
+     *
+     * This exception will be thrown if no response is set in the event.
+     *
+     * @param \Exception $exception The thrown exception
+     */
+    public function setException(\Exception $exception)
+    {
+        $this->exception = $exception;
+    }
+
+    /**
+     * Gets the exit code.
+     *
+     * @return integer The command exit code
+     */
+    public function getExitCode()
+    {
+        return $this->exitCode;
+    }
+}

+ 58 - 0
vendor/symfony/console/Symfony/Component/Console/Event/ConsoleTerminateEvent.php

@@ -0,0 +1,58 @@
+<?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\Component\Console\Event;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Allows to manipulate the exit code of a command after its execution.
+ *
+ * @author Francesco Levorato <git@flevour.net>
+ */
+class ConsoleTerminateEvent extends ConsoleEvent
+{
+    /**
+     * The exit code of the command.
+     *
+     * @var integer
+     */
+    private $exitCode;
+
+    public function __construct(Command $command, InputInterface $input, OutputInterface $output, $exitCode)
+    {
+        parent::__construct($command, $input, $output);
+
+        $this->setExitCode($exitCode);
+    }
+
+    /**
+     * Sets the exit code.
+     *
+     * @param integer $exitCode The command exit code
+     */
+    public function setExitCode($exitCode)
+    {
+        $this->exitCode = $exitCode;
+    }
+
+    /**
+     * Gets the exit code.
+     *
+     * @return integer The command exit code
+     */
+    public function getExitCode()
+    {
+        return $this->exitCode;
+    }
+}

+ 10 - 2
vendor/symfony/console/Symfony/Component/Console/Tester/ApplicationTester.php

@@ -78,13 +78,21 @@ class ApplicationTester
     /**
      * Gets the display returned by the last execution of the application.
      *
+     * @param Boolean $normalize Whether to normalize end of lines to \n or not
+     *
      * @return string The display
      */
-    public function getDisplay()
+    public function getDisplay($normalize = false)
     {
         rewind($this->output->getStream());
 
-        return stream_get_contents($this->output->getStream());
+        $display = stream_get_contents($this->output->getStream());
+
+        if ($normalize) {
+            $display = str_replace(PHP_EOL, "\n", $display);
+        }
+
+        return $display;
     }
 
     /**

+ 10 - 2
vendor/symfony/console/Symfony/Component/Console/Tester/CommandTester.php

@@ -71,13 +71,21 @@ class CommandTester
     /**
      * Gets the display returned by the last execution of the command.
      *
+     * @param Boolean $normalize Whether to normalize end of lines to \n or not
+     *
      * @return string The display
      */
-    public function getDisplay()
+    public function getDisplay($normalize = false)
     {
         rewind($this->output->getStream());
 
-        return stream_get_contents($this->output->getStream());
+        $display = stream_get_contents($this->output->getStream());
+
+        if ($normalize) {
+            $display = str_replace(PHP_EOL, "\n", $display);
+        }
+
+        return $display;
     }
 
     /**

+ 101 - 12
vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php

@@ -15,12 +15,18 @@ use Symfony\Component\Console\Application;
 use Symfony\Component\Console\Helper\HelperSet;
 use Symfony\Component\Console\Helper\FormatterHelper;
 use Symfony\Component\Console\Input\ArrayInput;
+use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputDefinition;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\NullOutput;
 use Symfony\Component\Console\Output\Output;
+use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Tester\ApplicationTester;
+use Symfony\Component\Console\Event\ConsoleCommandEvent;
+use Symfony\Component\Console\Event\ConsoleForExceptionEvent;
+use Symfony\Component\Console\Event\ConsoleTerminateEvent;
+use Symfony\Component\EventDispatcher\EventDispatcher;
 
 class ApplicationTest extends \PHPUnit_Framework_TestCase
 {
@@ -356,7 +362,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
 
         $application->setCatchExceptions(true);
         $tester->run(array('command' => 'foo'), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->setCatchExceptions() sets the catch exception flag');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag');
 
         $application->setCatchExceptions(false);
         try {
@@ -396,18 +402,18 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
         $tester = new ApplicationTester($application);
 
         $tester->run(array('command' => 'foo'), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->renderException() renders a pretty exception');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exception');
 
         $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE));
         $this->assertContains('Exception trace', $tester->getDisplay(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose');
 
         $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->renderException() renders the command synopsis when an exception occurs in the context of a command');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getDisplay(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command');
 
         $application->add(new \Foo3Command);
         $tester = new ApplicationTester($application);
         $tester->run(array('command' => 'foo3:bar'), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->renderException() renders a pretty exceptions with previous exceptions');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
 
         $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
         $application->setAutoExit(false);
@@ -417,7 +423,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
         $tester = new ApplicationTester($application);
 
         $tester->run(array('command' => 'foo'), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->renderException() wraps messages when they are bigger than the terminal');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal');
     }
 
     public function testRun()
@@ -443,19 +449,19 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
         $tester = new ApplicationTester($application);
 
         $tester->run(array(), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->run() runs the list command if no argument is passed');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed');
 
         $tester->run(array('--help' => true), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->run() runs the help command if --help is passed');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed');
 
         $tester->run(array('-h' => true), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->run() runs the help command if -h is passed');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed');
 
         $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->run() displays the help if --help is passed');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed');
 
         $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->run() displays the help if -h is passed');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed');
 
         $tester->run(array('--ansi' => true));
         $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed');
@@ -464,10 +470,10 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
         $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed');
 
         $tester->run(array('--version' => true), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->run() displays the program version if --version is passed');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed');
 
         $tester->run(array('-V' => true), array('decorated' => false));
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $this->normalizeLineBreaks($tester->getDisplay()), '->run() displays the program version if -v is passed');
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed');
 
         $tester->run(array('command' => 'list', '--quiet' => true));
         $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed');
@@ -634,6 +640,89 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
 
         $this->assertTrue($inputDefinition->hasOption('custom'));
     }
+
+    public function testRunWithDispatcher()
+    {
+        if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
+            $this->markTestSkipped('The "EventDispatcher" component is not available');
+        }
+
+        $application = new Application();
+        $application->setAutoExit(false);
+        $application->setDispatcher($this->getDispatcher());
+
+        $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) {
+            $output->write('foo.');
+        });
+
+        $tester = new ApplicationTester($application);
+        $tester->run(array('command' => 'foo'));
+        $this->assertEquals('before.foo.after.', $tester->getDisplay());
+    }
+
+    /**
+     * @expectedException        \LogicException
+     * @expectedExceptionMessage caught
+     */
+    public function testRunWithExceptionAndDispatcher()
+    {
+        if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
+            $this->markTestSkipped('The "EventDispatcher" component is not available');
+        }
+
+        $application = new Application();
+        $application->setDispatcher($this->getDispatcher());
+        $application->setAutoExit(false);
+        $application->setCatchExceptions(false);
+
+        $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) {
+            throw new \RuntimeException('foo');
+        });
+
+        $tester = new ApplicationTester($application);
+        $tester->run(array('command' => 'foo'));
+    }
+
+    public function testRunDispatchesAllEventsWithException()
+    {
+        if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
+            $this->markTestSkipped('The "EventDispatcher" component is not available');
+        }
+
+        $application = new Application();
+        $application->setDispatcher($this->getDispatcher());
+        $application->setAutoExit(false);
+
+        $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) {
+            $output->write('foo.');
+
+            throw new \RuntimeException('foo');
+        });
+
+        $tester = new ApplicationTester($application);
+        $tester->run(array('command' => 'foo'));
+        $this->assertContains('before.foo.after.caught.', $tester->getDisplay());
+    }
+
+    protected function getDispatcher()
+    {
+        $dispatcher = new EventDispatcher;
+        $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) {
+            $event->getOutput()->write('before.');
+        });
+        $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) {
+            $event->getOutput()->write('after.');
+
+            $event->setExitCode(128);
+        });
+        $dispatcher->addListener('console.exception', function (ConsoleForExceptionEvent $event) {
+            $event->getOutput()->writeln('caught.');
+
+            $event->setException(new \LogicException('caught.', $event->getExitCode(), $event->getException()));
+        });
+
+        return $dispatcher;
+    }
 }
 
 class CustomApplication extends Application

+ 3 - 0
vendor/symfony/console/Symfony/Component/Console/composer.json

@@ -18,6 +18,9 @@
     "require": {
         "php": ">=5.3.3"
     },
+    "require-dev": {
+        "symfony/event-dispatcher": "~2.1"
+    },
     "autoload": {
         "psr-0": { "Symfony\\Component\\Console\\": "" }
     },

+ 0 - 82
vendor/symfony/form/Symfony/Component/Form/AbstractType.php

@@ -18,13 +18,6 @@ use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  */
 abstract class AbstractType implements FormTypeInterface
 {
-    /**
-     * @var array
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     */
-    private $extensions = array();
-
     /**
      * {@inheritdoc}
      */
@@ -51,50 +44,6 @@ abstract class AbstractType implements FormTypeInterface
      */
     public function setDefaultOptions(OptionsResolverInterface $resolver)
     {
-        $defaults = $this->getDefaultOptions(array());
-        $allowedTypes = $this->getAllowedOptionValues(array());
-
-        if (!empty($defaults)) {
-            trigger_error('getDefaultOptions() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
-
-            $resolver->setDefaults($defaults);
-        }
-
-        if (!empty($allowedTypes)) {
-            trigger_error('getAllowedOptionValues() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
-
-            $resolver->addAllowedValues($allowedTypes);
-        }
-    }
-
-    /**
-     * Returns the default options for this type.
-     *
-     * @param array $options Unsupported as of Symfony 2.1.
-     *
-     * @return array The default options
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     *             Use {@link setDefaultOptions()} instead.
-     */
-    public function getDefaultOptions(array $options)
-    {
-        return array();
-    }
-
-    /**
-     * Returns the allowed option values for each option (if any).
-     *
-     * @param array $options Unsupported as of Symfony 2.1.
-     *
-     * @return array The allowed option values
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     *             Use {@link setDefaultOptions()} instead.
-     */
-    public function getAllowedOptionValues(array $options)
-    {
-        return array();
     }
 
     /**
@@ -104,35 +53,4 @@ abstract class AbstractType implements FormTypeInterface
     {
         return 'form';
     }
-
-    /**
-     * Sets the extensions for this type.
-     *
-     * @param FormTypeExtensionInterface[] $extensions An array of FormTypeExtensionInterface
-     *
-     * @throws Exception\UnexpectedTypeException if any extension does not implement FormTypeExtensionInterface
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     */
-    public function setExtensions(array $extensions)
-    {
-        trigger_error('setExtensions() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-
-        $this->extensions = $extensions;
-    }
-
-    /**
-     * Returns the extensions associated with this type.
-     *
-     * @return FormTypeExtensionInterface[] An array of FormTypeExtensionInterface
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link ResolvedFormTypeInterface::getTypeExtensions()} instead.
-     */
-    public function getExtensions()
-    {
-        trigger_error('getExtensions() is deprecated since version 2.1 and will be removed in 2.3. Use ResolvedFormTypeInterface::getTypeExtensions instead.', E_USER_DEPRECATED);
-
-        return $this->extensions;
-    }
 }

+ 0 - 40
vendor/symfony/form/Symfony/Component/Form/AbstractTypeExtension.php

@@ -44,45 +44,5 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface
      */
     public function setDefaultOptions(OptionsResolverInterface $resolver)
     {
-        $defaults = $this->getDefaultOptions(array());
-        $allowedTypes = $this->getAllowedOptionValues(array());
-
-        if (!empty($defaults)) {
-            trigger_error('getDefaultOptions() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
-
-            $resolver->setDefaults($defaults);
-        }
-
-        if (!empty($allowedTypes)) {
-            trigger_error('getAllowedOptionValues() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
-
-            $resolver->addAllowedValues($allowedTypes);
-        }
-    }
-
-    /**
-     * Overrides the default options form the extended type.
-     *
-     * @return array
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     *             Use {@link setDefaultOptions()} instead.
-     */
-    public function getDefaultOptions()
-    {
-        return array();
-    }
-
-    /**
-     * Returns the allowed option values for each option (if any).
-     *
-     * @return array The allowed option values
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     *             Use {@link setDefaultOptions()} instead.
-     */
-    public function getAllowedOptionValues()
-    {
-        return array();
     }
 }

+ 0 - 1
vendor/symfony/form/Symfony/Component/Form/Extension/Core/CoreExtension.php

@@ -24,7 +24,6 @@ class CoreExtension extends AbstractExtension
     protected function loadTypes()
     {
         return array(
-            new Type\FieldType(),
             new Type\FormType(PropertyAccess::getPropertyAccessor()),
             new Type\BirthdayType(),
             new Type\CheckboxType(),

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php

@@ -57,14 +57,6 @@ class CheckboxType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

@@ -211,14 +211,6 @@ class ChoiceType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php

@@ -284,14 +284,6 @@ class DateTimeType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/DateType.php

@@ -247,14 +247,6 @@ class DateType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/FileType.php

@@ -51,14 +51,6 @@ class FileType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 2 - 12
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/FormType.php

@@ -45,8 +45,7 @@ class FormType extends AbstractType
             ->setDisabled($options['disabled'])
             ->setErrorBubbling($options['error_bubbling'])
             ->setEmptyData($options['empty_data'])
-            // BC compatibility, when "property_path" could be false
-            ->setPropertyPath(is_string($options['property_path']) ? $options['property_path'] : null)
+            ->setPropertyPath($options['property_path'])
             ->setMapped($options['mapped'])
             ->setByReference($options['by_reference'])
             ->setVirtual($options['virtual'])
@@ -56,10 +55,6 @@ class FormType extends AbstractType
             ->setDataMapper($options['compound'] ? new PropertyPathMapper($this->propertyAccessor) : null)
         ;
 
-        if (false === $options['property_path']) {
-            trigger_error('Setting "property_path" to "false" is deprecated since version 2.1 and will be removed in 2.3. Set "mapped" to "false" instead.', E_USER_DEPRECATED);
-        }
-
         if ($options['trim']) {
             $builder->addEventSubscriber(new TrimListener());
         }
@@ -200,11 +195,6 @@ class FormType extends AbstractType
             return $options['compound'];
         };
 
-        // BC clause: former property_path=false now equals mapped=false
-        $mapped = function (Options $options) {
-            return false !== $options['property_path'];
-        };
-
         // If data is given, the form is locked to that data
         // (independent of its value)
         $resolver->setOptional(array(
@@ -222,7 +212,7 @@ class FormType extends AbstractType
             'max_length'         => null,
             'pattern'            => null,
             'property_path'      => null,
-            'mapped'             => $mapped,
+            'mapped'             => true,
             'by_reference'       => true,
             'error_bubbling'     => $errorBubbling,
             'label'              => null,

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/HiddenType.php

@@ -30,14 +30,6 @@ class HiddenType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/IntegerType.php

@@ -58,14 +58,6 @@ class IntegerType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/MoneyType.php

@@ -59,14 +59,6 @@ class MoneyType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/NumberType.php

@@ -56,14 +56,6 @@ class NumberType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/PercentType.php

@@ -45,14 +45,6 @@ class PercentType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TextType.php

@@ -26,14 +26,6 @@ class TextType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TimeType.php

@@ -228,14 +228,6 @@ class TimeType extends AbstractType
         ));
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getParent()
-    {
-        return 'field';
-    }
-
     /**
      * {@inheritdoc}
      */

+ 1 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php

@@ -53,11 +53,6 @@ class FormTypeValidatorExtension extends AbstractTypeExtension
      */
     public function setDefaultOptions(OptionsResolverInterface $resolver)
     {
-        // BC clause
-        $constraints = function (Options $options) {
-            return $options['validation_constraint'];
-        };
-
         // Make sure that validation groups end up as null, closure or array
         $validationGroupsNormalizer = function (Options $options, $groups) {
             if (empty($groups)) {
@@ -79,9 +74,7 @@ class FormTypeValidatorExtension extends AbstractTypeExtension
         $resolver->setDefaults(array(
             'error_mapping'              => array(),
             'validation_groups'          => null,
-            // "validation_constraint" is deprecated. Use "constraints".
-            'validation_constraint'      => null,
-            'constraints'                => $constraints,
+            'constraints'                => null,
             'cascade_validation'         => false,
             'invalid_message'            => 'This value is not valid.',
             'invalid_message_parameters' => array(),

+ 6 - 4
vendor/symfony/form/Symfony/Component/Form/Extension/Validator/Util/ServerParams.php

@@ -29,12 +29,14 @@ class ServerParams
             return null;
         }
 
-        if (preg_match('#^(\d+)([bkmgt])#i', $iniMax, $match)) {
-            $shift = array('b' => 0, 'k' => 10, 'm' => 20, 'g' => 30, 't' => 40);
-            $iniMax = ($match[1] * (1 << $shift[strtolower($match[2])]));
+        if (preg_match('#^\+?(0X?)?([^KMG]*)([KMG]?)#', $iniMax, $match)) {
+            $shifts = array('' => 0, 'K' => 10, 'M' => 20, 'G' => 30);
+            $bases = array('' => 10, '0' => 8, '0X' => 16);
+
+            return (intval($match[2], $bases[$match[1]]) * (1 << $shifts[$match[3]]));
         }
 
-        return (int) $iniMax;
+        return 0;
     }
 
     /**

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php

@@ -65,14 +65,6 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
         });
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public function guessMinLength($class, $property)
-    {
-        trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-    }
-
     /**
      * {@inheritDoc}
      */

+ 3 - 226
vendor/symfony/form/Symfony/Component/Form/Form.php

@@ -16,7 +16,6 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
 use Symfony\Component\Form\Exception\AlreadyBoundException;
 use Symfony\Component\Form\Exception\TransformationFailedException;
 use Symfony\Component\Form\Util\FormUtil;
-use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\PropertyAccess\PropertyPath;
 
 /**
@@ -201,27 +200,6 @@ class Form implements \IteratorAggregate, FormInterface
         return new PropertyPath($this->getName());
     }
 
-    /**
-     * Returns the types used by this form.
-     *
-     * @return FormTypeInterface[] An array of FormTypeInterface
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getConfig()} and {@link FormConfigInterface::getType()} instead.
-     */
-    public function getTypes()
-    {
-        trigger_error('getTypes() is deprecated since version 2.1 and will be removed in 2.3. Use getConfig() and FormConfigInterface::getType() instead.', E_USER_DEPRECATED);
-
-        $types = array();
-
-        for ($type = $this->config->getType(); null !== $type; $type = $type->getParent()) {
-            array_unshift($types, $type->getInnerType());
-        }
-
-        return $types;
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -272,21 +250,6 @@ class Form implements \IteratorAggregate, FormInterface
         return $this->parent;
     }
 
-    /**
-     * Returns whether the form has a parent.
-     *
-     * @return Boolean
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getParent()} or inverse {@link isRoot()} instead.
-     */
-    public function hasParent()
-    {
-        trigger_error('hasParent() is deprecated since version 2.1 and will be removed in 2.3. Use getParent() or inverse isRoot() instead.', E_USER_DEPRECATED);
-
-        return null !== $this->parent;
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -303,40 +266,6 @@ class Form implements \IteratorAggregate, FormInterface
         return null === $this->parent;
     }
 
-    /**
-     * Returns whether the form has an attribute with the given name.
-     *
-     * @param  string $name The name of the attribute.
-     *
-     * @return Boolean Whether the attribute exists.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getConfig()} and {@link FormConfigInterface::hasAttribute()} instead.
-     */
-    public function hasAttribute($name)
-    {
-        trigger_error('hasAttribute() is deprecated since version 2.1 and will be removed in 2.3. Use getConfig() and FormConfigInterface::hasAttribute() instead.', E_USER_DEPRECATED);
-
-        return $this->config->hasAttribute($name);
-    }
-
-    /**
-     * Returns the value of the attributes with the given name.
-     *
-     * @param  string $name The name of the attribute
-     *
-     * @return mixed The attribute value.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getConfig()} and {@link FormConfigInterface::getAttribute()} instead.
-     */
-    public function getAttribute($name)
-    {
-        trigger_error('getAttribute() is deprecated since version 2.1 and will be removed in 2.3. Use getConfig() and FormConfigInterface::getAttribute() instead.', E_USER_DEPRECATED);
-
-        return $this->config->getAttribute($name);
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -366,14 +295,9 @@ class Form implements \IteratorAggregate, FormInterface
         $dispatcher = $this->config->getEventDispatcher();
 
         // Hook to change content of the data
-        if ($dispatcher->hasListeners(FormEvents::PRE_SET_DATA) || $dispatcher->hasListeners(FormEvents::SET_DATA)) {
+        if ($dispatcher->hasListeners(FormEvents::PRE_SET_DATA)) {
             $event = new FormEvent($this, $modelData);
             $dispatcher->dispatch(FormEvents::PRE_SET_DATA, $event);
-            // BC until 2.3
-            if ($dispatcher->hasListeners(FormEvents::SET_DATA)) {
-                trigger_error('The FormEvents::SET_DATA event is deprecated since 2.1 and will be removed in 2.3. Use the FormEvents::PRE_SET_DATA event instead.', E_USER_DEPRECATED);
-            }
-            $dispatcher->dispatch(FormEvents::SET_DATA, $event);
             $modelData = $event->getData();
         }
 
@@ -472,21 +396,6 @@ class Form implements \IteratorAggregate, FormInterface
         return $this->viewData;
     }
 
-    /**
-     * Alias of {@link getViewData()}.
-     *
-     * @return string
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getViewData()} instead.
-     */
-    public function getClientData()
-    {
-        trigger_error('getClientData() is deprecated since version 2.1 and will be removed in 2.3. Use getViewData() instead.', E_USER_DEPRECATED);
-
-        return $this->getViewData();
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -532,14 +441,9 @@ class Form implements \IteratorAggregate, FormInterface
         $dispatcher = $this->config->getEventDispatcher();
 
         // Hook to change content of the data bound by the browser
-        if ($dispatcher->hasListeners(FormEvents::PRE_BIND) || $dispatcher->hasListeners(FormEvents::BIND_CLIENT_DATA)) {
+        if ($dispatcher->hasListeners(FormEvents::PRE_BIND)) {
             $event = new FormEvent($this, $submittedData);
             $dispatcher->dispatch(FormEvents::PRE_BIND, $event);
-            // BC until 2.3
-            if ($dispatcher->hasListeners(FormEvents::BIND_CLIENT_DATA)) {
-                trigger_error('The FormEvents::BIND_CLIENT_DATA event is deprecated since 2.1 and will be removed in 2.3. Use the FormEvents::PRE_BIND event instead.', E_USER_DEPRECATED);
-            }
-            $dispatcher->dispatch(FormEvents::BIND_CLIENT_DATA, $event);
             $submittedData = $event->getData();
         }
 
@@ -595,14 +499,9 @@ class Form implements \IteratorAggregate, FormInterface
 
             // Hook to change content of the data into the normalized
             // representation
-            if ($dispatcher->hasListeners(FormEvents::BIND) || $dispatcher->hasListeners(FormEvents::BIND_NORM_DATA)) {
+            if ($dispatcher->hasListeners(FormEvents::BIND)) {
                 $event = new FormEvent($this, $normData);
                 $dispatcher->dispatch(FormEvents::BIND, $event);
-                // BC until 2.3
-                if ($dispatcher->hasListeners(FormEvents::BIND_NORM_DATA)) {
-                    trigger_error('The FormEvents::BIND_NORM_DATA event is deprecated since 2.1 and will be removed in 2.3. Use the FormEvents::BIND event instead.', E_USER_DEPRECATED);
-                }
-                $dispatcher->dispatch(FormEvents::BIND_NORM_DATA, $event);
                 $normData = $event->getData();
             }
 
@@ -623,41 +522,9 @@ class Form implements \IteratorAggregate, FormInterface
             $dispatcher->dispatch(FormEvents::POST_BIND, $event);
         }
 
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handleBC'));
-        $validators = $this->config->getValidators();
-        restore_error_handler();
-
-        foreach ($validators as $validator) {
-            trigger_error(sprintf('FormConfigInterface::getValidators() is deprecated since 2.1 and will be removed in 2.3. Convert your %s class to a listener on the FormEvents::POST_BIND event.', get_class($validator)), E_USER_DEPRECATED);
-
-            $validator->validate($this);
-        }
-
         return $this;
     }
 
-    /**
-     * Binds a request to the form.
-     *
-     * If the request method is POST, PUT or GET, the data is bound to the form,
-     * transformed and written into the form data (an object or an array).
-     *
-     * @param Request $request The request to bind to the form
-     *
-     * @return Form This form
-     *
-     * @throws FormException if the method of the request is not one of GET, POST or PUT
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link FormConfigInterface::bind()} instead.
-     */
-    public function bindRequest(Request $request)
-    {
-        trigger_error('bindRequest() is deprecated since version 2.1 and will be removed in 2.3. Use FormConfigInterface::bind() instead.', E_USER_DEPRECATED);
-
-        return $this->bind($request);
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -672,21 +539,6 @@ class Form implements \IteratorAggregate, FormInterface
         return $this;
     }
 
-    /**
-     * Returns whether errors bubble up to the parent.
-     *
-     * @return Boolean
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getConfig()} and {@link FormConfigInterface::getErrorBubbling()} instead.
-     */
-    public function getErrorBubbling()
-    {
-        trigger_error('getErrorBubbling() is deprecated since version 2.1 and will be removed in 2.3. Use getConfig() and FormConfigInterface::getErrorBubbling() instead.', E_USER_DEPRECATED);
-
-        return $this->config->getErrorBubbling();
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -745,21 +597,6 @@ class Form implements \IteratorAggregate, FormInterface
         return true;
     }
 
-    /**
-     * Returns whether there are errors associated with this form.
-     *
-     * @return Boolean
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Count
-     *             {@link getErrors()} instead.
-     */
-    public function hasErrors()
-    {
-        trigger_error('hasErrors() is deprecated since version 2.1 and will be removed in 2.3. Count getErrors() instead.', E_USER_DEPRECATED);
-
-        return count($this->errors) > 0;
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -796,36 +633,6 @@ class Form implements \IteratorAggregate, FormInterface
         return $errors;
     }
 
-    /**
-     * Returns the model transformers of the form.
-     *
-     * @return DataTransformerInterface[] An array of DataTransformerInterface
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getConfig()} and {@link FormConfigInterface::getModelTransformers()} instead.
-     */
-    public function getNormTransformers()
-    {
-        trigger_error('getNormTransformers() is deprecated since version 2.1 and will be removed in 2.3. Use getConfig() and FormConfigInterface::getModelTransformers() instead.', E_USER_DEPRECATED);
-
-        return $this->config->getModelTransformers();
-    }
-
-    /**
-     * Returns the view transformers of the form.
-     *
-     * @return DataTransformerInterface[] An array of DataTransformerInterface
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getConfig()} and {@link FormConfigInterface::getViewTransformers()} instead.
-     */
-    public function getClientTransformers()
-    {
-        trigger_error('getClientTransformers() is deprecated since version 2.1 and will be removed in 2.3. Use getConfig() and FormConfigInterface::getViewTransformers() instead.', E_USER_DEPRECATED);
-
-        return $this->config->getViewTransformers();
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -834,36 +641,6 @@ class Form implements \IteratorAggregate, FormInterface
         return $this->children;
     }
 
-    /**
-     * Returns all children in this group.
-     *
-     * @return array
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link all()} instead.
-     */
-    public function getChildren()
-    {
-        trigger_error('getChildren() is deprecated since version 2.1 and will be removed in 2.3. Use all() instead.', E_USER_DEPRECATED);
-
-        return $this->all();
-    }
-
-    /**
-     * Returns whether the form has children.
-     *
-     * @return Boolean
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link count()} instead.
-     */
-    public function hasChildren()
-    {
-        trigger_error('hasChildren() is deprecated since version 2.1 and will be removed in 2.3. Use count() instead.', E_USER_DEPRECATED);
-
-        return count($this->children) > 0;
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 28
vendor/symfony/form/Symfony/Component/Form/FormBuilder.php

@@ -288,34 +288,6 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB
         return new \ArrayIterator($this->children);
     }
 
-    /**
-     * Returns the types used by this builder.
-     *
-     * @return FormTypeInterface[] An array of FormTypeInterface
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link FormConfigInterface::getType()} instead.
-     *
-     * @throws BadMethodCallException If the builder was turned into a {@link FormConfigInterface}
-     *                                via {@link getFormConfig()}.
-     */
-    public function getTypes()
-    {
-        trigger_error('getTypes() is deprecated since version 2.1 and will be removed in 2.3. Use getConfig() and FormConfigInterface::getType() instead.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        $types = array();
-
-        for ($type = $this->getType(); null !== $type; $type = $type->getParent()) {
-            array_unshift($types, $type->getInnerType());
-        }
-
-        return $types;
-    }
-
     /**
      * Converts an unresolved child into a {@link FormBuilder} instance.
      *

+ 0 - 38
vendor/symfony/form/Symfony/Component/Form/FormBuilderInterface.php

@@ -84,42 +84,4 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
      * @return Form The form
      */
     public function getForm();
-
-    /**
-     * Sets the parent builder.
-     *
-     * @param FormBuilderInterface $parent The parent builder
-     *
-     * @return FormBuilderInterface The builder object.
-     *
-     * @deprecated Deprecated since version 2.2, to be removed in 2.3. You
-     *             should not rely on the parent of a builder, because it is
-     *             likely that the parent is only set after turning the builder
-     *             into a form.
-     */
-    public function setParent(FormBuilderInterface $parent = null);
-
-    /**
-     * Returns the parent builder.
-     *
-     * @return FormBuilderInterface The parent builder
-     *
-     * @deprecated Deprecated since version 2.2, to be removed in 2.3. You
-     *             should not rely on the parent of a builder, because it is
-     *             likely that the parent is only set after turning the builder
-     *             into a form.
-     */
-    public function getParent();
-
-    /**
-     * Returns whether the builder has a parent.
-     *
-     * @return Boolean
-     *
-     * @deprecated Deprecated since version 2.2, to be removed in 2.3. You
-     *             should not rely on the parent of a builder, because it is
-     *             likely that the parent is only set after turning the builder
-     *             into a form.
-     */
-    public function hasParent();
 }

+ 0 - 188
vendor/symfony/form/Symfony/Component/Form/FormConfigBuilder.php

@@ -195,22 +195,6 @@ class FormConfigBuilder implements FormConfigBuilderInterface
         return $this;
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function addValidator(FormValidatorInterface $validator)
-    {
-        trigger_error('addValidator() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        $this->validators[] = $validator;
-
-        return $this;
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -243,72 +227,6 @@ class FormConfigBuilder implements FormConfigBuilderInterface
         return $this;
     }
 
-    /**
-     * Alias of {@link addViewTransformer()}.
-     *
-     * @param DataTransformerInterface $viewTransformer
-     *
-     * @return FormConfigBuilder The configuration object.
-     *
-     * @throws BadMethodCallException if the form configuration is locked
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link addViewTransformer()} instead.
-     */
-    public function appendClientTransformer(DataTransformerInterface $viewTransformer)
-    {
-        trigger_error('appendClientTransformer() is deprecated since version 2.1 and will be removed in 2.3. Use addViewTransformer() instead.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        return $this->addViewTransformer($viewTransformer);
-    }
-
-    /**
-     * Prepends a transformer to the client transformer chain.
-     *
-     * @param DataTransformerInterface $viewTransformer
-     *
-     * @return FormConfigBuilder The configuration object.
-     *
-     * @throws BadMethodCallException if the form configuration is locked
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     */
-    public function prependClientTransformer(DataTransformerInterface $viewTransformer)
-    {
-        trigger_error('prependClientTransformer() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        return $this->addViewTransformer($viewTransformer, true);
-    }
-
-    /**
-     * Alias of {@link resetViewTransformers()}.
-     *
-     * @return FormConfigBuilder The configuration object.
-     *
-     * @throws BadMethodCallException if the form configuration is locked
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link resetViewTransformers()} instead.
-     */
-    public function resetClientTransformers()
-    {
-        trigger_error('resetClientTransformers() is deprecated since version 2.1 and will be removed in 2.3. Use resetViewTransformers() instead.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        return $this->resetViewTransformers();
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -341,72 +259,6 @@ class FormConfigBuilder implements FormConfigBuilderInterface
         return $this;
     }
 
-    /**
-     * Appends a transformer to the normalization transformer chain
-     *
-     * @param DataTransformerInterface $modelTransformer
-     *
-     * @return FormConfigBuilder The configuration object.
-     *
-     * @throws BadMethodCallException if the form configuration is locked
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     */
-    public function appendNormTransformer(DataTransformerInterface $modelTransformer)
-    {
-        trigger_error('appendNormTransformer() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        return $this->addModelTransformer($modelTransformer, true);
-    }
-
-    /**
-     * Alias of {@link addModelTransformer()}.
-     *
-     * @param DataTransformerInterface $modelTransformer
-     *
-     * @return FormConfigBuilder The configuration object.
-     *
-     * @throws BadMethodCallException if the form configuration is locked
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link addModelTransformer()} instead.
-     */
-    public function prependNormTransformer(DataTransformerInterface $modelTransformer)
-    {
-        trigger_error('prependNormTransformer() is deprecated since version 2.1 and will be removed in 2.3. Use addModelTransformer() instead.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        return $this->addModelTransformer($modelTransformer);
-    }
-
-    /**
-     * Alias of {@link resetModelTransformers()}.
-     *
-     * @return FormConfigBuilder The configuration object.
-     *
-     * @throws BadMethodCallException if the form configuration is locked
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link resetModelTransformers()} instead.
-     */
-    public function resetNormTransformers()
-    {
-        trigger_error('resetNormTransformers() is deprecated since version 2.1 and will be removed in 2.3. Use resetModelTransformers() instead.', E_USER_DEPRECATED);
-
-        if ($this->locked) {
-            throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
-        }
-
-        return $this->resetModelTransformers();
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -479,21 +331,6 @@ class FormConfigBuilder implements FormConfigBuilderInterface
         return $this->viewTransformers;
     }
 
-    /**
-     * Alias of {@link getViewTransformers()}.
-     *
-     * @return array The view transformers.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getViewTransformers()} instead.
-     */
-    public function getClientTransformers()
-    {
-        trigger_error('getClientTransformers() is deprecated since version 2.1 and will be removed in 2.3. Use getViewTransformers() instead.', E_USER_DEPRECATED);
-
-        return $this->getViewTransformers();
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -502,21 +339,6 @@ class FormConfigBuilder implements FormConfigBuilderInterface
         return $this->modelTransformers;
     }
 
-    /**
-     * Alias of {@link getModelTransformers()}.
-     *
-     * @return array The model transformers.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link getModelTransformers()} instead.
-     */
-    public function getNormTransformers()
-    {
-        trigger_error('getNormTransformers() is deprecated since version 2.1 and will be removed in 2.3. Use getModelTransformers() instead.', E_USER_DEPRECATED);
-
-        return $this->getModelTransformers();
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -525,16 +347,6 @@ class FormConfigBuilder implements FormConfigBuilderInterface
         return $this->dataMapper;
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getValidators()
-    {
-        trigger_error('getValidators() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-
-        return $this->validators;
-    }
-
     /**
      * {@inheritdoc}
      */

+ 0 - 11
vendor/symfony/form/Symfony/Component/Form/FormConfigBuilderInterface.php

@@ -40,17 +40,6 @@ interface FormConfigBuilderInterface extends FormConfigInterface
      */
     public function addEventSubscriber(EventSubscriberInterface $subscriber);
 
-    /**
-     * Adds a validator to the form.
-     *
-     * @param FormValidatorInterface $validator The validator.
-     *
-     * @return self The configuration object.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     */
-    public function addValidator(FormValidatorInterface $validator);
-
     /**
      * Appends / prepends a transformer to the view transformer chain.
      *

+ 0 - 9
vendor/symfony/form/Symfony/Component/Form/FormConfigInterface.php

@@ -104,15 +104,6 @@ interface FormConfigInterface
      */
     public function getDataMapper();
 
-    /**
-     * Returns the validators of the form.
-     *
-     * @return FormValidatorInterface The form validator.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     */
-    public function getValidators();
-
     /**
      * Returns whether the form is required.
      *

+ 46 - 2
vendor/symfony/form/Symfony/Component/Form/FormEvent.php

@@ -11,11 +11,55 @@
 
 namespace Symfony\Component\Form;
 
-use Symfony\Component\Form\Event\FilterDataEvent;
+use Symfony\Component\EventDispatcher\Event;
 
 /**
  * @author Bernhard Schussek <bschussek@gmail.com>
  */
-class FormEvent extends FilterDataEvent
+class FormEvent extends Event
 {
+    private $form;
+    protected $data;
+
+    /**
+     * Constructs an event.
+     *
+     * @param FormInterface $form The associated form
+     * @param mixed         $data The data
+     */
+    public function __construct(FormInterface $form, $data)
+    {
+        $this->form = $form;
+        $this->data = $data;
+    }
+
+    /**
+     * Returns the form at the source of the event.
+     *
+     * @return FormInterface
+     */
+    public function getForm()
+    {
+        return $this->form;
+    }
+
+    /**
+     * Returns the data associated with this event.
+     *
+     * @return mixed
+     */
+    public function getData()
+    {
+        return $this->data;
+    }
+
+    /**
+     * Allows updating with some filtered data.
+     *
+     * @param mixed $data
+     */
+    public function setData($data)
+    {
+        $this->data = $data;
+    }
 }

+ 0 - 18
vendor/symfony/form/Symfony/Component/Form/FormEvents.php

@@ -26,24 +26,6 @@ final class FormEvents
 
     const POST_SET_DATA = 'form.post_set_data';
 
-    /**
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     *             Use {@link PRE_BIND} instead.
-     */
-    const BIND_CLIENT_DATA = 'form.bind_client_data';
-
-    /**
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     *             Use {@link BIND} instead.
-     */
-    const BIND_NORM_DATA = 'form.bind_norm_data';
-
-    /**
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     *             Use {@link PRE_SET_DATA} instead.
-     */
-    const SET_DATA = 'form.set_data';
-
     private function __construct()
     {
     }

+ 0 - 70
vendor/symfony/form/Symfony/Component/Form/FormFactory.php

@@ -98,20 +98,14 @@ class FormFactory implements FormFactoryInterface
 
         $typeGuess = $guesser->guessType($class, $property);
         $maxLengthGuess = $guesser->guessMaxLength($class, $property);
-        // Keep $minLengthGuess for BC until Symfony 2.3
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handleBC'));
-        $minLengthGuess = $guesser->guessMinLength($class, $property);
-        restore_error_handler();
         $requiredGuess = $guesser->guessRequired($class, $property);
         $patternGuess = $guesser->guessPattern($class, $property);
 
         $type = $typeGuess ? $typeGuess->getType() : 'text';
 
         $maxLength = $maxLengthGuess ? $maxLengthGuess->getValue() : null;
-        $minLength = $minLengthGuess ? $minLengthGuess->getValue() : null;
         $pattern   = $patternGuess ? $patternGuess->getValue() : null;
 
-        // overrides $minLength, if set
         if (null !== $pattern) {
             $options = array_merge(array('pattern' => $pattern), $options);
         }
@@ -120,10 +114,6 @@ class FormFactory implements FormFactoryInterface
             $options = array_merge(array('max_length' => $maxLength), $options);
         }
 
-        if (null !== $minLength && $minLength > 0) {
-            $options = array_merge(array('pattern' => '.{'.$minLength.','.$maxLength.'}'), $options);
-        }
-
         if ($requiredGuess) {
             $options = array_merge(array('required' => $requiredGuess->getValue()), $options);
         }
@@ -136,66 +126,6 @@ class FormFactory implements FormFactoryInterface
         return $this->createNamedBuilder($property, $type, $data, $options, $parent);
     }
 
-    /**
-     * Returns whether the given type is supported.
-     *
-     * @param string $name The name of the type
-     *
-     * @return Boolean Whether the type is supported
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link FormRegistryInterface::hasType()} instead.
-     */
-    public function hasType($name)
-    {
-        trigger_error('hasType() is deprecated since version 2.1 and will be removed in 2.3. Use FormRegistryInterface::hasType() instead.', E_USER_DEPRECATED);
-
-        return $this->registry->hasType($name);
-    }
-
-    /**
-     * Adds a type.
-     *
-     * @param FormTypeInterface $type The type
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             form extensions or type registration in the Dependency
-     *             Injection Container instead.
-     */
-    public function addType(FormTypeInterface $type)
-    {
-        trigger_error('addType() is deprecated since version 2.1 and will be removed in 2.3. Use form extensions or type registration in the Dependency Injection Container instead.', E_USER_DEPRECATED);
-
-        $parentType = $type->getParent();
-
-        $this->registry->addType($this->resolvedTypeFactory->createResolvedType(
-            $type,
-            array(),
-            $parentType ? $this->registry->getType($parentType) : null
-        ));
-    }
-
-    /**
-     * Returns a type by name.
-     *
-     * This methods registers the type extensions from the form extensions.
-     *
-     * @param string $name The name of the type
-     *
-     * @return FormTypeInterface The type
-     *
-     * @throws Exception\FormException if the type can not be retrieved from any extension
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link FormRegistryInterface::getType()} instead.
-     */
-    public function getType($name)
-    {
-        trigger_error('getType() is deprecated since version 2.1 and will be removed in 2.3. Use FormRegistryInterface::getType() instead.', E_USER_DEPRECATED);
-
-        return $this->registry->getType($name)->getInnerType();
-    }
-
     /**
      * Wraps a type into a ResolvedFormTypeInterface implementation and connects
      * it with its parent type.

+ 2 - 14
vendor/symfony/form/Symfony/Component/Form/FormRegistry.php

@@ -64,16 +64,6 @@ class FormRegistry implements FormRegistryInterface
         $this->resolvedTypeFactory = $resolvedTypeFactory;
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function addType(ResolvedFormTypeInterface $type)
-    {
-        trigger_error('addType() is deprecated since version 2.1 and will be removed in 2.3. Use form extensions or type registration in the Dependency Injection Container instead.', E_USER_DEPRECATED);
-
-        $this->types[$type->getName()] = $type;
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -132,13 +122,11 @@ class FormRegistry implements FormRegistryInterface
             );
         }
 
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handleBC'));
-        $this->addType($this->resolvedTypeFactory->createResolvedType(
+        $this->types[$type->getName()] = $this->resolvedTypeFactory->createResolvedType(
             $type,
             $typeExtensions,
             $parentType ? $this->getType($parentType) : null
-        ));
-        restore_error_handler();
+        );
     }
 
     /**

+ 0 - 11
vendor/symfony/form/Symfony/Component/Form/FormRegistryInterface.php

@@ -18,17 +18,6 @@ namespace Symfony\Component\Form;
  */
 interface FormRegistryInterface
 {
-    /**
-     * Adds a form type.
-     *
-     * @param ResolvedFormTypeInterface $type The type
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             form extensions or type registration in the Dependency
-     *             Injection Container instead.
-     */
-    public function addType(ResolvedFormTypeInterface $type);
-
     /**
      * Returns a form type by name.
      *

+ 0 - 12
vendor/symfony/form/Symfony/Component/Form/FormTypeGuesserChain.php

@@ -70,18 +70,6 @@ class FormTypeGuesserChain implements FormTypeGuesserInterface
         });
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public function guessMinLength($class, $property)
-    {
-        trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-
-        return $this->guess(function ($guesser) use ($class, $property) {
-            return $guesser->guessMinLength($class, $property);
-        });
-    }
-
     /**
      * {@inheritDoc}
      */

+ 0 - 12
vendor/symfony/form/Symfony/Component/Form/FormTypeGuesserInterface.php

@@ -46,18 +46,6 @@ interface FormTypeGuesserInterface
      */
     public function guessMaxLength($class, $property);
 
-    /**
-     * Returns a guess about the field's minimum length
-     *
-     * @param string $class    The fully qualified class name
-     * @param string $property The name of the property to guess for
-     *
-     * @return Guess\Guess A guess for the field's minimum length
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3.
-     */
-    public function guessMinLength($class, $property);
-
     /**
      * Returns a guess about the field's pattern
      *

+ 0 - 233
vendor/symfony/form/Symfony/Component/Form/FormView.php

@@ -53,124 +53,6 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
         $this->parent = $parent;
     }
 
-    /**
-     * Returns the name of the form.
-     *
-     * @return string The form name.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link vars} instead which contains an
-     *             entry named "name".
-     */
-    public function getName()
-    {
-        trigger_error('getName() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'vars\' instead which contains an entry named "name".', E_USER_DEPRECATED);
-
-        return $this->vars['name'];
-    }
-
-    /**
-     * @param string $name
-     * @param mixed  $value
-     *
-     * @return FormView The current view
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link vars} instead.
-     */
-    public function set($name, $value)
-    {
-        trigger_error('set() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'vars\' instead.', E_USER_DEPRECATED);
-
-        $this->vars[$name] = $value;
-
-        return $this;
-    }
-
-    /**
-     * @param $name
-     *
-     * @return Boolean
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link vars} instead.
-     */
-    public function has($name)
-    {
-        trigger_error('has() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'vars\' instead.', E_USER_DEPRECATED);
-
-        return array_key_exists($name, $this->vars);
-    }
-
-    /**
-     * @param $name
-     * @param $default
-     *
-     * @return mixed
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link vars} instead.
-     */
-    public function get($name, $default = null)
-    {
-        trigger_error('get() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'vars\' instead.', E_USER_DEPRECATED);
-
-        if (false === $this->has($name)) {
-            return $default;
-        }
-
-        return $this->vars[$name];
-    }
-
-    /**
-     * @return array
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link vars} instead.
-     */
-    public function all()
-    {
-        trigger_error('all() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'vars\' instead.', E_USER_DEPRECATED);
-
-        return $this->vars;
-    }
-
-    /**
-     * Returns the values of all view variables.
-     *
-     * @return array The values of all variables.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link vars} instead.
-     */
-    public function getVars()
-    {
-        trigger_error('getVars() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'vars\' instead.', E_USER_DEPRECATED);
-
-        return $this->vars;
-    }
-
-    /**
-     * Sets the value for an attribute.
-     *
-     * @param string $name  The name of the attribute
-     * @param string $value The value
-     *
-     * @return FormView The current view
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link vars} instead which contains an
-     *             entry named "attr".
-     */
-    public function setAttribute($name, $value)
-    {
-        trigger_error('setAttribute() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'vars\' instead which contains an entry named "attr".', E_USER_DEPRECATED);
-
-        $this->vars['attr'][$name] = $value;
-
-        return $this;
-    }
-
     /**
      * Returns whether the view was already rendered.
      *
@@ -209,121 +91,6 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
         return $this;
     }
 
-    /**
-     * Sets the parent view.
-     *
-     * @param FormView $parent The parent view.
-     *
-     * @return FormView The view object.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link parent} instead.
-     */
-    public function setParent(FormView $parent = null)
-    {
-        trigger_error('setParent() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'parent\' instead.', E_USER_DEPRECATED);
-
-        $this->parent = $parent;
-
-        return $this;
-    }
-
-    /**
-     * Returns the parent view.
-     *
-     * @return FormView The parent view.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link parent} instead.
-     */
-    public function getParent()
-    {
-        trigger_error('getParent() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'parent\' instead.', E_USER_DEPRECATED);
-
-        return $this->parent;
-    }
-
-    /**
-     * Returns whether this view has a parent.
-     *
-     * @return Boolean Whether this view has a parent
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link parent} instead.
-     */
-    public function hasParent()
-    {
-        trigger_error('hasParent() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'parent\' instead.', E_USER_DEPRECATED);
-
-        return null !== $this->parent;
-    }
-
-    /**
-     * Sets the children view.
-     *
-     * @param array $children The children as instances of FormView
-     *
-     * @return FormView The current view
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link children} instead.
-     */
-    public function setChildren(array $children)
-    {
-        trigger_error('setChildren() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'children\' instead.', E_USER_DEPRECATED);
-
-        $this->children = $children;
-
-        return $this;
-    }
-
-    /**
-     * Returns the children.
-     *
-     * @return array The children as instances of FormView
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link children} instead.
-     */
-    public function getChildren()
-    {
-        trigger_error('getChildren() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'children\' instead.', E_USER_DEPRECATED);
-
-        return $this->children;
-    }
-
-    /**
-     * Returns a given child.
-     *
-     * @param string $name The name of the child
-     *
-     * @return FormView The child view
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Access
-     *             the public property {@link children} instead.
-     */
-    public function getChild($name)
-    {
-        trigger_error('getChild() is deprecated since version 2.1 and will be removed in 2.3. Access the public property \'children\' instead.', E_USER_DEPRECATED);
-
-        return $this->children[$name];
-    }
-
-    /**
-     * Returns whether this view has any children.
-     *
-     * @return Boolean Whether the view has children.
-     *
-     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
-     *             {@link count()} instead.
-     */
-    public function hasChildren()
-    {
-        trigger_error('hasChildren() is deprecated since version 2.1 and will be removed in 2.3. Use count() instead.', E_USER_DEPRECATED);
-
-        return count($this->children) > 0;
-    }
-
     /**
      * Returns a child by name (implements \ArrayAccess).
      *

+ 0 - 8
vendor/symfony/form/Symfony/Component/Form/ResolvedFormType.php

@@ -59,14 +59,6 @@ class ResolvedFormType implements ResolvedFormTypeInterface
             }
         }
 
-        // BC
-        if ($innerType instanceof AbstractType) {
-            /* @var AbstractType $innerType */
-            set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handleBC'));
-            $innerType->setExtensions($typeExtensions);
-            restore_error_handler();
-        }
-
         $this->innerType = $innerType;
         $this->typeExtensions = $typeExtensions;
         $this->parent = $parent;

+ 0 - 16
vendor/symfony/form/Symfony/Component/Form/Tests/CompoundFormTest.php

@@ -114,22 +114,6 @@ class CompoundFormTest extends AbstractFormTest
         $this->assertFalse($this->form->isValid());
     }
 
-    public function testHasChildren()
-    {
-        $this->form->add($this->getBuilder()->getForm());
-
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $this->assertTrue($this->form->hasChildren());
-        restore_error_handler();
-    }
-
-    public function testHasNoChildren()
-    {
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $this->assertFalse($this->form->hasChildren());
-        restore_error_handler();
-    }
-
     public function testAdd()
     {
         $child = $this->getBuilder('foo')->getForm();

+ 0 - 13
vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php

@@ -598,19 +598,6 @@ class FormTypeTest extends TypeTestCase
         $this->assertTrue($form->getConfig()->getMapped());
     }
 
-    // BC
-    public function testPropertyPathFalseImpliesDefaultNotMapped()
-    {
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $form = $this->factory->createNamed('name', 'form', null, array(
-            'property_path' => false,
-        ));
-        restore_error_handler();
-
-        $this->assertEquals(new PropertyPath('name'), $form->getPropertyPath());
-        $this->assertFalse($form->getConfig()->getMapped());
-    }
-
     public function testNotMapped()
     {
         $form = $this->factory->create('form', null, array(

+ 42 - 0
vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php

@@ -0,0 +1,42 @@
+<?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\Component\Form\Tests\Extension\Validator\Util;
+
+class ServerParamsTest extends \PHPUnit_Framework_TestCase
+{
+    /** @dataProvider getGetPostMaxSizeTestData */
+    public function testGetPostMaxSize($size, $bytes)
+    {
+        $serverParams = $this->getMock('Symfony\Component\Form\Extension\Validator\Util\ServerParams', array('getNormalizedIniPostMaxSize'));
+        $serverParams
+            ->expects($this->any())
+            ->method('getNormalizedIniPostMaxSize')
+            ->will($this->returnValue(strtoupper($size)));
+
+        $this->assertEquals($bytes, $serverParams->getPostMaxSize());
+    }
+
+    public function getGetPostMaxSizeTestData()
+    {
+        return array(
+            array('2k', 2048),
+            array('2 k', 2048),
+            array('+2 k', 2048),
+            array('+2???k', 2048),
+            array('0x10', 16),
+            array('0xf', 15),
+            array('010', 8),
+            array('+0x10 k', 16 * 1024),
+            array('1g', 1024 * 1024 * 1024),
+        );
+    }
+}

+ 0 - 118
vendor/symfony/form/Symfony/Component/Form/Tests/FormFactoryTest.php

@@ -71,56 +71,6 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase
             ))));
     }
 
-    public function testAddType()
-    {
-        $type = new FooType();
-        $resolvedType = $this->getMockResolvedType();
-
-        $this->resolvedTypeFactory->expects($this->once())
-            ->method('createResolvedType')
-            ->with($type)
-            ->will($this->returnValue($resolvedType));
-
-        $this->registry->expects($this->once())
-            ->method('addType')
-            ->with($resolvedType);
-
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $this->factory->addType($type);
-        restore_error_handler();
-    }
-
-    public function testHasType()
-    {
-        $this->registry->expects($this->once())
-            ->method('hasType')
-            ->with('name')
-            ->will($this->returnValue('RESULT'));
-
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $this->assertSame('RESULT', $this->factory->hasType('name'));
-        restore_error_handler();
-    }
-
-    public function testGetType()
-    {
-        $type = new FooType();
-        $resolvedType = $this->getMockResolvedType();
-
-        $resolvedType->expects($this->once())
-            ->method('getInnerType')
-            ->will($this->returnValue($type));
-
-        $this->registry->expects($this->once())
-            ->method('getType')
-            ->with('name')
-            ->will($this->returnValue($resolvedType));
-
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $this->assertEquals($type, $this->factory->getType('name'));
-        restore_error_handler();
-    }
-
     public function testCreateNamedBuilderWithTypeName()
     {
         $options = array('a' => '1', 'b' => '2');
@@ -484,74 +434,6 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals('builderInstance', $builder);
     }
 
-    public function testCreateBuilderUsesMinLengthIfFound()
-    {
-        $this->guesser1->expects($this->once())
-                ->method('guessMinLength')
-                ->with('Application\Author', 'firstName')
-                ->will($this->returnValue(new ValueGuess(
-                    2,
-                    Guess::MEDIUM_CONFIDENCE
-                )));
-
-        $this->guesser2->expects($this->once())
-                ->method('guessMinLength')
-                ->with('Application\Author', 'firstName')
-                ->will($this->returnValue(new ValueGuess(
-                    5,
-                    Guess::HIGH_CONFIDENCE
-                )));
-
-        $factory = $this->getMockFactory(array('createNamedBuilder'));
-
-        $factory->expects($this->once())
-            ->method('createNamedBuilder')
-            ->with('firstName', 'text', null, array('pattern' => '.{5,}'))
-            ->will($this->returnValue('builderInstance'));
-
-        $builder = $factory->createBuilderForProperty(
-            'Application\Author',
-            'firstName'
-        );
-
-        $this->assertEquals('builderInstance', $builder);
-    }
-
-    public function testCreateBuilderPrefersPatternOverMinLength()
-    {
-        // min length is deprecated
-        $this->guesser1->expects($this->once())
-                ->method('guessMinLength')
-                ->with('Application\Author', 'firstName')
-                ->will($this->returnValue(new ValueGuess(
-                    2,
-                    Guess::HIGH_CONFIDENCE
-                )));
-
-        // pattern is preferred even though confidence is lower
-        $this->guesser2->expects($this->once())
-                ->method('guessPattern')
-                ->with('Application\Author', 'firstName')
-                ->will($this->returnValue(new ValueGuess(
-                    '.{5,10}',
-                    Guess::LOW_CONFIDENCE
-                )));
-
-        $factory = $this->getMockFactory(array('createNamedBuilder'));
-
-        $factory->expects($this->once())
-            ->method('createNamedBuilder')
-            ->with('firstName', 'text', null, array('pattern' => '.{5,10}'))
-            ->will($this->returnValue('builderInstance'));
-
-        $builder = $factory->createBuilderForProperty(
-            'Application\Author',
-            'firstName'
-        );
-
-        $this->assertEquals('builderInstance', $builder);
-    }
-
     public function testCreateBuilderUsesRequiredSettingWithHighestConfidence()
     {
         $this->guesser1->expects($this->once())

+ 0 - 32
vendor/symfony/form/Symfony/Component/Form/Tests/FormRegistryTest.php

@@ -68,21 +68,6 @@ class FormRegistryTest extends \PHPUnit_Framework_TestCase
         ), $this->resolvedTypeFactory);
     }
 
-    public function testGetTypeReturnsAddedType()
-    {
-        $resolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface');
-
-        $resolvedType->expects($this->any())
-            ->method('getName')
-            ->will($this->returnValue('foo'));
-
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $this->registry->addType($resolvedType);
-        restore_error_handler();
-
-        $this->assertSame($resolvedType, $this->registry->getType('foo'));
-    }
-
     public function testGetTypeFromExtension()
     {
         $type = new FooType();
@@ -215,23 +200,6 @@ class FormRegistryTest extends \PHPUnit_Framework_TestCase
         $this->registry->getType(array());
     }
 
-    public function testHasTypeAfterAdding()
-    {
-        $resolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface');
-
-        $resolvedType->expects($this->any())
-            ->method('getName')
-            ->will($this->returnValue('foo'));
-
-        $this->assertFalse($this->registry->hasType('foo'));
-
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $this->registry->addType($resolvedType);
-        restore_error_handler();
-
-        $this->assertTrue($this->registry->hasType('foo'));
-    }
-
     public function testHasTypeAfterLoadingFromExtension()
     {
         $type = new FooType();

+ 0 - 21
vendor/symfony/form/Symfony/Component/Form/Tests/SimpleFormTest.php

@@ -640,27 +640,6 @@ class SimpleFormTest extends AbstractFormTest
         $this->assertEquals('bar', $form->getData());
     }
 
-    public function testBindValidatesAfterTransformation()
-    {
-        $test = $this;
-        $validator = $this->getFormValidator();
-        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
-        $form = $this->getBuilder()
-            ->addValidator($validator)
-            ->getForm();
-
-        $validator->expects($this->once())
-            ->method('validate')
-            ->with($form)
-            ->will($this->returnCallback(function ($form) use ($test) {
-            $test->assertEquals('foobar', $form->getData());
-        }));
-
-        $form->bind('foobar');
-
-        restore_error_handler();
-    }
-
     public function testBindResetsErrors()
     {
         $this->form->addError(new FormError('Error!'));

+ 0 - 15
vendor/symfony/form/Symfony/Component/Form/Util/FormUtil.php

@@ -11,8 +11,6 @@
 
 namespace Symfony\Component\Form\Util;
 
-use Symfony\Component\PropertyAccess\StringUtil;
-
 /**
  * @author Bernhard Schussek <bschussek@gmail.com>
  */
@@ -23,19 +21,6 @@ class FormUtil
      */
     private function __construct() {}
 
-    /**
-     * Alias for {@link StringUtil::singularify()}
-     *
-     * @deprecated Deprecated since version 2.2, to be removed in 2.3. Use
-     *             {@link StringUtil::singularify()} instead.
-     */
-    public static function singularify($plural)
-    {
-        trigger_error('\Symfony\Component\Form\Util\FormUtil::singularify() is deprecated since version 2.2 and will be removed in 2.3. Use \Symfony\Component\PropertyAccess\StringUtil::singularify() in the PropertyAccess component instead.', E_USER_DEPRECATED);
-
-        return StringUtil::singularify($plural);
-    }
-
     /**
      * Returns whether the given data is empty.
      *

+ 0 - 5
vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php

@@ -235,11 +235,6 @@ class Inline
      */
     private static function parseQuotedScalar($scalar, &$i)
     {
-        // Only check the current item we're dealing with (for sequences)
-        $subject = substr($scalar, $i);
-        $items = preg_split('/[\'"]\s*(?:[,:]|[}\]]\s*,)/', $subject);
-        $subject = substr($subject, 0, strlen($items[0]) + 1);
-
         if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) {
             throw new ParseException(sprintf('Malformed inline YAML string (%s).', substr($scalar, $i)));
         }

+ 41 - 44
vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php

@@ -414,64 +414,61 @@ class Parser
      */
     private function parseFoldedScalar($separator, $indicator = '', $indentation = 0)
     {
-        $separator = '|' == $separator ? "\n" : ' ';
-        $text = '';
-
         $notEOF = $this->moveToNextLine();
-
-        while ($notEOF && $this->isCurrentLineBlank()) {
-            $text .= "\n";
-
-            $notEOF = $this->moveToNextLine();
-        }
-
         if (!$notEOF) {
             return '';
         }
 
-        if (!preg_match('#^(?P<indent>'.($indentation ? str_repeat(' ', $indentation) : ' +').')(?P<text>.*)$#u', $this->currentLine, $matches)) {
-            $this->moveToPreviousLine();
-
-            return '';
+        // determine indentation if not specified
+        if (0 === $indentation) {
+            if (preg_match('/^ +/', $this->currentLine, $matches)) {
+                $indentation = strlen($matches[0]);
+            }
         }
 
-        $textIndent = $matches['indent'];
-        $previousIndent = 0;
-
-        $text .= $matches['text'].$separator;
-        while ($this->currentLineNb + 1 < count($this->lines)) {
-            $this->moveToNextLine();
-
-            if (preg_match('#^(?P<indent> {'.strlen($textIndent).',})(?P<text>.+)$#u', $this->currentLine, $matches)) {
-                if (' ' == $separator && $previousIndent != $matches['indent']) {
-                    $text = substr($text, 0, -1)."\n";
+        $text = '';
+        if ($indentation > 0) {
+            $pattern = sprintf('/^ {%d}(.*)$/', $indentation);
+
+            $isCurrentLineBlank = $this->isCurrentLineBlank();
+            while (
+                $notEOF && (
+                    $isCurrentLineBlank ||
+                    preg_match($pattern, $this->currentLine, $matches)
+                )
+            ) {
+                if ($isCurrentLineBlank) {
+                    $text .= substr($this->currentLine, $indentation);
+                } else {
+                    $text .= $matches[1];
                 }
-                $previousIndent = $matches['indent'];
 
-                $text .= str_repeat(' ', $diff = strlen($matches['indent']) - strlen($textIndent)).$matches['text'].($diff ? "\n" : $separator);
-            } elseif (preg_match('#^(?P<text> *)$#', $this->currentLine, $matches)) {
-                $text .= preg_replace('#^ {1,'.strlen($textIndent).'}#', '', $matches['text'])."\n";
-            } else {
-                $this->moveToPreviousLine();
-
-                break;
+                // newline only if not EOF
+                if ($notEOF = $this->moveToNextLine()) {
+                    $text .= "\n";
+                    $isCurrentLineBlank = $this->isCurrentLineBlank();
+                }
             }
+        } elseif ($notEOF) {
+            $text .= "\n";
         }
 
-        if (' ' == $separator) {
-            // replace last separator by a newline
-            $text = preg_replace('/ (\n*)$/', "\n$1", $text);
+        if ($notEOF) {
+            $this->moveToPreviousLine();
         }
 
-        switch ($indicator) {
-            case '':
-                $text = preg_replace('#\n+$#s', "\n", $text);
-                break;
-            case '+':
-                break;
-            case '-':
-                $text = preg_replace('#\n+$#s', '', $text);
-                break;
+        // replace all non-trailing single newlines with spaces in folded blocks
+        if ('>' === $separator) {
+            preg_match('/(\n*)$/', $text, $matches);
+            $text = preg_replace('/(?<!\n)\n(?!\n)/', ' ', rtrim($text, "\n"));
+            $text .= $matches[1];
+        }
+
+        // deal with trailing newlines as indicated
+        if ('' === $indicator) {
+            $text = preg_replace('/\n+$/s', "\n", $text);
+        } elseif ('-' === $indicator) {
+            $text = preg_replace('/\n+$/s', '', $text);
         }
 
         return $text;

+ 49 - 23
vendor/symfony/yaml/Symfony/Component/Yaml/Tests/DumperTest.php

@@ -21,6 +21,21 @@ class DumperTest extends \PHPUnit_Framework_TestCase
     protected $dumper;
     protected $path;
 
+    protected $array = array(
+        '' => 'bar',
+        'foo' => '#bar',
+        'foo\'bar' => array(),
+        'bar' => array(1, 'foo'),
+        'foobar' => array(
+            'foo' => 'bar',
+            'bar' => array(1, 'foo'),
+            'foobar' => array(
+                'foo' => 'bar',
+                'bar' => array(1, 'foo'),
+            ),
+        ),
+    );
+
     protected function setUp()
     {
         $this->parser = new Parser();
@@ -33,6 +48,33 @@ class DumperTest extends \PHPUnit_Framework_TestCase
         $this->parser = null;
         $this->dumper = null;
         $this->path = null;
+        $this->array = null;
+    }
+
+    public function testSetIndentation()
+    {
+        $this->dumper->setIndentation(7);
+
+$expected = <<<EOF
+'': bar
+foo: '#bar'
+'foo''bar': {  }
+bar:
+       - 1
+       - foo
+foobar:
+       foo: bar
+       bar:
+              - 1
+              - foo
+       foobar:
+              foo: bar
+              bar:
+                     - 1
+                     - foo
+
+EOF;
+        $this->assertEquals($expected, $this->dumper->dump($this->array, 4, 0));
     }
 
     public function testSpecifications()
@@ -63,27 +105,11 @@ class DumperTest extends \PHPUnit_Framework_TestCase
 
     public function testInlineLevel()
     {
-        // inline level
-        $array = array(
-            '' => 'bar',
-            'foo' => '#bar',
-            'foo\'bar' => array(),
-            'bar' => array(1, 'foo'),
-            'foobar' => array(
-                'foo' => 'bar',
-                'bar' => array(1, 'foo'),
-                'foobar' => array(
-                    'foo' => 'bar',
-                    'bar' => array(1, 'foo'),
-                ),
-            ),
-        );
-
         $expected = <<<EOF
 { '': bar, foo: '#bar', 'foo''bar': {  }, bar: [1, foo], foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } }
 EOF;
-$this->assertEquals($expected, $this->dumper->dump($array, -10), '->dump() takes an inline level argument');
-$this->assertEquals($expected, $this->dumper->dump($array, 0), '->dump() takes an inline level argument');
+$this->assertEquals($expected, $this->dumper->dump($this->array, -10), '->dump() takes an inline level argument');
+$this->assertEquals($expected, $this->dumper->dump($this->array, 0), '->dump() takes an inline level argument');
 
 $expected = <<<EOF
 '': bar
@@ -93,7 +119,7 @@ bar: [1, foo]
 foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } }
 
 EOF;
-        $this->assertEquals($expected, $this->dumper->dump($array, 1), '->dump() takes an inline level argument');
+        $this->assertEquals($expected, $this->dumper->dump($this->array, 1), '->dump() takes an inline level argument');
 
         $expected = <<<EOF
 '': bar
@@ -108,7 +134,7 @@ foobar:
     foobar: { foo: bar, bar: [1, foo] }
 
 EOF;
-        $this->assertEquals($expected, $this->dumper->dump($array, 2), '->dump() takes an inline level argument');
+        $this->assertEquals($expected, $this->dumper->dump($this->array, 2), '->dump() takes an inline level argument');
 
         $expected = <<<EOF
 '': bar
@@ -127,7 +153,7 @@ foobar:
         bar: [1, foo]
 
 EOF;
-        $this->assertEquals($expected, $this->dumper->dump($array, 3), '->dump() takes an inline level argument');
+        $this->assertEquals($expected, $this->dumper->dump($this->array, 3), '->dump() takes an inline level argument');
 
         $expected = <<<EOF
 '': bar
@@ -148,8 +174,8 @@ foobar:
             - foo
 
 EOF;
-        $this->assertEquals($expected, $this->dumper->dump($array, 4), '->dump() takes an inline level argument');
-        $this->assertEquals($expected, $this->dumper->dump($array, 10), '->dump() takes an inline level argument');
+        $this->assertEquals($expected, $this->dumper->dump($this->array, 4), '->dump() takes an inline level argument');
+        $this->assertEquals($expected, $this->dumper->dump($this->array, 10), '->dump() takes an inline level argument');
     }
 
     public function testObjectSupportEnabled()

+ 106 - 10
vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParserTest.php

@@ -113,17 +113,33 @@ EOF;
 foo: |-
     one
     two
+bar: |-
+    one
+    two
+
+EOF;
+        $expected = array(
+            'foo' => "one\ntwo",
+            'bar' => "one\ntwo",
+        );
+        $tests['Literal block chomping strip with single trailing newline'] = array($expected, $yaml);
+
+        $yaml = <<<'EOF'
+foo: |-
+    one
+    two
 
 bar: |-
     one
     two
 
+
 EOF;
         $expected = array(
             'foo' => "one\ntwo",
             'bar' => "one\ntwo",
         );
-        $tests['Literal block chomping strip with trailing newline'] = array($expected, $yaml);
+        $tests['Literal block chomping strip with multiple trailing newlines'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: |-
@@ -143,7 +159,6 @@ EOF;
 foo: |
     one
     two
-
 bar: |
     one
     two
@@ -153,37 +168,70 @@ EOF;
             'foo' => "one\ntwo\n",
             'bar' => "one\ntwo\n",
         );
-        $tests['Literal block chomping clip with trailing newline'] = array($expected, $yaml);
+        $tests['Literal block chomping clip with single trailing newline'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: |
     one
     two
+
 bar: |
     one
     two
+
+
 EOF;
         $expected = array(
             'foo' => "one\ntwo\n",
             'bar' => "one\ntwo\n",
         );
+        $tests['Literal block chomping clip with multiple trailing newlines'] = array($expected, $yaml);
+
+        $yaml = <<<'EOF'
+foo: |
+    one
+    two
+bar: |
+    one
+    two
+EOF;
+        $expected = array(
+            'foo' => "one\ntwo\n",
+            'bar' => "one\ntwo",
+        );
         $tests['Literal block chomping clip without trailing newline'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: |+
     one
     two
+bar: |+
+    one
+    two
+
+EOF;
+        $expected = array(
+            'foo' => "one\ntwo\n",
+            'bar' => "one\ntwo\n",
+        );
+        $tests['Literal block chomping keep with single trailing newline'] = array($expected, $yaml);
+
+        $yaml = <<<'EOF'
+foo: |+
+    one
+    two
 
 bar: |+
     one
     two
 
+
 EOF;
         $expected = array(
             'foo' => "one\ntwo\n\n",
             'bar' => "one\ntwo\n\n",
         );
-        $tests['Literal block chomping keep with trailing newline'] = array($expected, $yaml);
+        $tests['Literal block chomping keep with multiple trailing newlines'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: |+
@@ -195,7 +243,7 @@ bar: |+
 EOF;
         $expected = array(
             'foo' => "one\ntwo\n",
-            'bar' => "one\ntwo\n",
+            'bar' => "one\ntwo",
         );
         $tests['Literal block chomping keep without trailing newline'] = array($expected, $yaml);
 
@@ -203,17 +251,33 @@ EOF;
 foo: >-
     one
     two
+bar: >-
+    one
+    two
+
+EOF;
+        $expected = array(
+            'foo' => "one two",
+            'bar' => "one two",
+        );
+        $tests['Folded block chomping strip with single trailing newline'] = array($expected, $yaml);
+
+        $yaml = <<<'EOF'
+foo: >-
+    one
+    two
 
 bar: >-
     one
     two
 
+
 EOF;
         $expected = array(
             'foo' => "one two",
             'bar' => "one two",
         );
-        $tests['Folded block chomping strip with trailing newline'] = array($expected, $yaml);
+        $tests['Folded block chomping strip with multiple trailing newlines'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: >-
@@ -233,7 +297,6 @@ EOF;
 foo: >
     one
     two
-
 bar: >
     one
     two
@@ -243,37 +306,70 @@ EOF;
             'foo' => "one two\n",
             'bar' => "one two\n",
         );
-        $tests['Folded block chomping clip with trailing newline'] = array($expected, $yaml);
+        $tests['Folded block chomping clip with single trailing newline'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: >
     one
     two
+
 bar: >
     one
     two
+
+
 EOF;
         $expected = array(
             'foo' => "one two\n",
             'bar' => "one two\n",
         );
+        $tests['Folded block chomping clip with multiple trailing newlines'] = array($expected, $yaml);
+
+        $yaml = <<<'EOF'
+foo: >
+    one
+    two
+bar: >
+    one
+    two
+EOF;
+        $expected = array(
+            'foo' => "one two\n",
+            'bar' => "one two",
+        );
         $tests['Folded block chomping clip without trailing newline'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: >+
     one
     two
+bar: >+
+    one
+    two
+
+EOF;
+        $expected = array(
+            'foo' => "one two\n",
+            'bar' => "one two\n",
+        );
+        $tests['Folded block chomping keep with single trailing newline'] = array($expected, $yaml);
+
+        $yaml = <<<'EOF'
+foo: >+
+    one
+    two
 
 bar: >+
     one
     two
 
+
 EOF;
         $expected = array(
             'foo' => "one two\n\n",
             'bar' => "one two\n\n",
         );
-        $tests['Folded block chomping keep with trailing newline'] = array($expected, $yaml);
+        $tests['Folded block chomping keep with multiple trailing newlines'] = array($expected, $yaml);
 
         $yaml = <<<'EOF'
 foo: >+
@@ -285,7 +381,7 @@ bar: >+
 EOF;
         $expected = array(
             'foo' => "one two\n",
-            'bar' => "one two\n",
+            'bar' => "one two",
         );
         $tests['Folded block chomping keep without trailing newline'] = array($expected, $yaml);
 

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff