Merge branch '2.8' into 3.3
* 2.8: (22 commits) Tests and fix for issue in array model data in EntityType field with multiple=true [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible removed useless PHPDoc [Form] Fix FormInterface::submit() annotation PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4 HttpCache does not consider ESI resources in HEAD requests Fix translation for "This field was not expected" [Routing] Enhance Route(Collection) docblocks Added improvement for accuracy in MoneyToLocalizedStringTransformer. Removed unused private property Use correct verb form in the pull request template Use PHP_MAXPATHLEN in Filesystem. Added null as explicit return type (?TokenInterface) [FrameworkBundle] Fix Routing\DelegatingLoader Render all line breaks according to the exception message [Form] Fix phpdoc [DI] remove confusing code [Form] Fixed GroupSequence with "constraints" option [Validator] Clarify UUID validator behavior [Filesystem] Fixed makePathRelative ...
This commit is contained in:
commit
a707bbf090
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -2,9 +2,9 @@
|
||||
| ------------- | ---
|
||||
| Branch? | 3.4 or master / 2.7, 2.8 or 3.3 <!-- see comment below -->
|
||||
| Bug fix? | yes/no
|
||||
| New feature? | yes/no <!-- don't forget updating src/**/CHANGELOG.md files -->
|
||||
| New feature? | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
|
||||
| BC breaks? | yes/no
|
||||
| Deprecations? | yes/no <!-- don't forget updating UPGRADE-*.md files -->
|
||||
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md files -->
|
||||
| Tests pass? | yes/no
|
||||
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
|
||||
| License | MIT
|
||||
|
@ -27,8 +27,6 @@ class ProxyCacheWarmer implements CacheWarmerInterface
|
||||
private $registry;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ManagerRegistry $registry A ManagerRegistry instance
|
||||
*/
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
|
@ -31,8 +31,6 @@ class ContainerAwareLoader extends Loader
|
||||
private $container;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ContainerInterface $container A ContainerInterface instance
|
||||
*/
|
||||
public function __construct(ContainerInterface $container)
|
||||
|
@ -32,8 +32,6 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
|
||||
private $tagPrefix;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $connections Parameter ID for connections
|
||||
* @param string $managerTemplate sprintf() template for generating the event
|
||||
* manager's service ID for a connection name
|
||||
|
@ -97,8 +97,6 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
|
||||
private $aliasMap;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* The $managerParameters is an ordered list of container parameters that could provide the
|
||||
* name of the manager to register these namespaces and alias on. The first non-empty name
|
||||
* is used, the others skipped.
|
||||
|
@ -54,8 +54,6 @@ class DbalSessionHandler implements \SessionHandlerInterface
|
||||
private $timeCol = 'sess_time';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Connection $con A connection
|
||||
* @param string $tableName Table name
|
||||
*/
|
||||
|
@ -16,8 +16,6 @@ use Symfony\Component\Stopwatch\Stopwatch;
|
||||
use Doctrine\DBAL\Logging\SQLLogger;
|
||||
|
||||
/**
|
||||
* DbalLogger.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class DbalLogger implements SQLLogger
|
||||
@ -29,8 +27,6 @@ class DbalLogger implements SQLLogger
|
||||
protected $stopwatch;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param LoggerInterface $logger A LoggerInterface instance
|
||||
* @param Stopwatch $stopwatch A Stopwatch instance
|
||||
*/
|
||||
|
@ -1455,4 +1455,38 @@ class EntityTypeTest extends BaseTypeTest
|
||||
$this->assertEquals($collection, $form->getNormData());
|
||||
$this->assertSame(array(), $form->getViewData(), 'View data is always an array');
|
||||
}
|
||||
|
||||
public function testSetDataEmptyArraySubmitNullMultiple()
|
||||
{
|
||||
$emptyArray = array();
|
||||
$form = $this->factory->create(static::TESTED_TYPE, null, array(
|
||||
'em' => 'default',
|
||||
'class' => self::SINGLE_IDENT_CLASS,
|
||||
'multiple' => true,
|
||||
));
|
||||
$form->setData($emptyArray);
|
||||
$form->submit(null);
|
||||
$this->assertInternalType('array', $form->getData());
|
||||
$this->assertEquals(array(), $form->getData());
|
||||
$this->assertEquals(array(), $form->getNormData());
|
||||
$this->assertSame(array(), $form->getViewData(), 'View data is always an array');
|
||||
}
|
||||
|
||||
public function testSetDataNonEmptyArraySubmitNullMultiple()
|
||||
{
|
||||
$entity1 = new SingleIntIdEntity(1, 'Foo');
|
||||
$this->persist(array($entity1));
|
||||
$form = $this->factory->create(static::TESTED_TYPE, null, array(
|
||||
'em' => 'default',
|
||||
'class' => self::SINGLE_IDENT_CLASS,
|
||||
'multiple' => true,
|
||||
));
|
||||
$existing = array(0 => $entity1);
|
||||
$form->setData($existing);
|
||||
$form->submit(null);
|
||||
$this->assertInternalType('array', $form->getData());
|
||||
$this->assertEquals(array(), $form->getData());
|
||||
$this->assertEquals(array(), $form->getNormData());
|
||||
$this->assertSame(array(), $form->getViewData(), 'View data is always an array');
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
"require-dev": {
|
||||
"symfony/stopwatch": "~2.8|~3.0",
|
||||
"symfony/dependency-injection": "~3.3",
|
||||
"symfony/form": "^3.2.5",
|
||||
"symfony/form": "^3.3.10",
|
||||
"symfony/http-kernel": "~2.8|~3.0",
|
||||
"symfony/property-access": "~2.8|~3.0",
|
||||
"symfony/property-info": "~2.8|3.0",
|
||||
|
@ -47,8 +47,6 @@ class ConsoleFormatter implements FormatterInterface
|
||||
private $dumper;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* Available options:
|
||||
* * format: The format of the outputted log string. The following placeholders are supported: %datetime%, %start_tag%, %level_name%, %end_tag%, %channel%, %message%, %context%, %extra%;
|
||||
* * date_format: The format of the outputted date string;
|
||||
|
@ -57,8 +57,6 @@ class ConsoleHandler extends AbstractProcessingHandler implements EventSubscribe
|
||||
);
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param OutputInterface|null $output The console output to use (the handler remains disabled when passing null
|
||||
* until the output is set, e.g. by using console events)
|
||||
* @param bool $bubble Whether the messages that are handled can bubble up the stack
|
||||
|
@ -42,8 +42,6 @@ class ProxyDumper implements DumperInterface
|
||||
private $classGenerator;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $salt
|
||||
*/
|
||||
public function __construct($salt = '')
|
||||
|
@ -27,8 +27,6 @@ class CodeExtension extends AbstractExtension
|
||||
private $charset;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string|FileLinkFormatter $fileLinkFormat The format for links to source files
|
||||
* @param string $rootDir The project root directory
|
||||
* @param string $charset The charset
|
||||
|
@ -26,8 +26,6 @@ use Twig\Node\SetNode;
|
||||
use Twig\NodeVisitor\AbstractNodeVisitor;
|
||||
|
||||
/**
|
||||
* TranslationDefaultDomainNodeVisitor.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
|
||||
@ -37,9 +35,6 @@ class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
|
||||
*/
|
||||
private $scope;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->scope = new Scope();
|
||||
|
@ -25,8 +25,6 @@ class RouterCacheWarmer implements CacheWarmerInterface
|
||||
protected $router;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param RouterInterface $router A Router instance
|
||||
*/
|
||||
public function __construct(RouterInterface $router)
|
||||
|
@ -30,8 +30,6 @@ class TemplateFinder implements TemplateFinderInterface
|
||||
private $templates;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param KernelInterface $kernel A KernelInterface instance
|
||||
* @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
|
||||
* @param string $rootDir The directory where global templates can be stored
|
||||
|
@ -26,8 +26,6 @@ class TemplatePathsCacheWarmer extends CacheWarmer
|
||||
protected $locator;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param TemplateFinderInterface $finder A template finder
|
||||
* @param TemplateLocator $locator The template locator
|
||||
*/
|
||||
|
@ -22,8 +22,6 @@ use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
/**
|
||||
* Application.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class Application extends BaseApplication
|
||||
@ -32,8 +30,6 @@ class Application extends BaseApplication
|
||||
private $commandsRegistered = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param KernelInterface $kernel A KernelInterface instance
|
||||
*/
|
||||
public function __construct(KernelInterface $kernel)
|
||||
|
@ -24,9 +24,6 @@ use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper;
|
||||
*/
|
||||
class DescriptorHelper extends BaseDescriptorHelper
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
|
@ -25,8 +25,6 @@ class ControllerNameParser
|
||||
protected $kernel;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param KernelInterface $kernel A KernelInterface instance
|
||||
*/
|
||||
public function __construct(KernelInterface $kernel)
|
||||
|
@ -17,8 +17,6 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver;
|
||||
|
||||
/**
|
||||
* ControllerResolver.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class ControllerResolver extends ContainerControllerResolver
|
||||
@ -26,8 +24,6 @@ class ControllerResolver extends ContainerControllerResolver
|
||||
protected $parser;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ContainerInterface $container A ContainerInterface instance
|
||||
* @param ControllerNameParser $parser A ControllerNameParser instance
|
||||
* @param LoggerInterface $logger A LoggerInterface instance
|
||||
|
@ -29,8 +29,6 @@ abstract class HttpCache extends BaseHttpCache
|
||||
protected $kernel;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param HttpKernelInterface $kernel An HttpKernelInterface instance
|
||||
* @param string $cacheDir The cache directory (default used if null)
|
||||
*/
|
||||
|
@ -30,8 +30,6 @@ class DelegatingLoader extends BaseDelegatingLoader
|
||||
private $loading = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ControllerNameParser $parser A ControllerNameParser instance
|
||||
* @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
|
||||
*/
|
||||
@ -75,7 +73,7 @@ class DelegatingLoader extends BaseDelegatingLoader
|
||||
}
|
||||
|
||||
foreach ($collection->all() as $route) {
|
||||
if (!$controller = $route->getDefault('_controller')) {
|
||||
if (!is_string($controller = $route->getDefault('_controller')) || !$controller) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -33,8 +33,6 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberI
|
||||
private $collectedParameters = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ContainerInterface $container A ContainerInterface instance
|
||||
* @param mixed $resource The main resource to load
|
||||
* @param array $options An array of options
|
||||
|
@ -25,8 +25,6 @@ class DelegatingEngine extends BaseDelegatingEngine implements EngineInterface
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ContainerInterface $container The DI container
|
||||
* @param array $engineIds An array of engine Ids
|
||||
*/
|
||||
|
@ -25,8 +25,6 @@ class ActionsHelper extends Helper
|
||||
private $handler;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param FragmentHandler $handler A FragmentHandler instance
|
||||
*/
|
||||
public function __construct(FragmentHandler $handler)
|
||||
|
@ -15,8 +15,6 @@ use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
|
||||
use Symfony\Component\Templating\Helper\Helper;
|
||||
|
||||
/**
|
||||
* CodeHelper.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class CodeHelper extends Helper
|
||||
@ -26,8 +24,6 @@ class CodeHelper extends Helper
|
||||
protected $charset;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string|FileLinkFormatter $fileLinkFormat The format for links to source files
|
||||
* @param string $rootDir The project root directory
|
||||
* @param string $charset The charset
|
||||
|
@ -24,8 +24,6 @@ class RouterHelper extends Helper
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param UrlGeneratorInterface $router A Router instance
|
||||
*/
|
||||
public function __construct(UrlGeneratorInterface $router)
|
||||
|
@ -15,8 +15,6 @@ use Symfony\Component\Templating\Helper\Helper;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* TranslatorHelper.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class TranslatorHelper extends Helper
|
||||
@ -24,8 +22,6 @@ class TranslatorHelper extends Helper
|
||||
protected $translator;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param TranslatorInterface $translator A TranslatorInterface instance
|
||||
*/
|
||||
public function __construct(TranslatorInterface $translator)
|
||||
|
@ -26,8 +26,6 @@ class FilesystemLoader implements LoaderInterface
|
||||
protected $locator;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param FileLocatorInterface $locator A FileLocatorInterface instance
|
||||
*/
|
||||
public function __construct(FileLocatorInterface $locator)
|
||||
|
@ -27,8 +27,6 @@ class TemplateLocator implements FileLocatorInterface
|
||||
private $cacheHits = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param FileLocatorInterface $locator A FileLocatorInterface instance
|
||||
* @param string $cacheDir The cache path
|
||||
*/
|
||||
|
@ -27,8 +27,6 @@ class PhpEngine extends BasePhpEngine implements EngineInterface
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
|
||||
* @param ContainerInterface $container The DI container
|
||||
* @param LoaderInterface $loader A loader instance
|
||||
|
@ -28,8 +28,6 @@ class TemplateNameParser extends BaseTemplateNameParser
|
||||
protected $cache = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param KernelInterface $kernel A KernelInterface instance
|
||||
*/
|
||||
public function __construct(KernelInterface $kernel)
|
||||
|
@ -26,8 +26,6 @@ class TimedPhpEngine extends PhpEngine
|
||||
protected $stopwatch;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
|
||||
* @param ContainerInterface $container A ContainerInterface instance
|
||||
* @param LoaderInterface $loader A LoaderInterface instance
|
||||
|
@ -44,3 +44,7 @@ fragment_home:
|
||||
fragment_inlined:
|
||||
path: /fragment_inlined
|
||||
defaults: { _controller: TestBundle:Fragment:inlined }
|
||||
|
||||
array_controller:
|
||||
path: /array_controller
|
||||
defaults: { _controller: [ArrayController, someAction] }
|
||||
|
@ -48,8 +48,6 @@ class Translator extends BaseTranslator implements WarmableInterface
|
||||
private $resources = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* Available options:
|
||||
*
|
||||
* * cache_dir: The cache directory (or null to disable caching)
|
||||
|
@ -27,8 +27,6 @@ use Symfony\Component\Security\Http\FirewallMapInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security\FirewallMap;
|
||||
|
||||
/**
|
||||
* SecurityDataCollector.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class SecurityDataCollector extends DataCollector implements LateDataCollectorInterface
|
||||
@ -41,8 +39,6 @@ class SecurityDataCollector extends DataCollector implements LateDataCollectorIn
|
||||
private $hasVarDumper;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param TokenStorageInterface|null $tokenStorage
|
||||
* @param RoleHierarchyInterface|null $roleHierarchy
|
||||
* @param LogoutUrlGenerator|null $logoutUrlGenerator
|
||||
|
@ -37,8 +37,6 @@ class MainConfiguration implements ConfigurationInterface
|
||||
private $userProviderFactories;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $factories
|
||||
* @param array $userProviderFactories
|
||||
*/
|
||||
|
@ -24,11 +24,6 @@ class LogoutUrlHelper extends Helper
|
||||
{
|
||||
private $generator;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param LogoutUrlGenerator $generator A LogoutUrlGenerator instance
|
||||
*/
|
||||
public function __construct(LogoutUrlGenerator $generator)
|
||||
{
|
||||
$this->generator = $generator;
|
||||
|
@ -35,11 +35,9 @@ class TemplateCacheCacheWarmer implements CacheWarmerInterface, ServiceSubscribe
|
||||
private $paths;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ContainerInterface $container The dependency injection container
|
||||
* @param TemplateFinderInterface $finder The template paths cache warmer
|
||||
* @param array $paths Additional twig paths to warm
|
||||
* @param ContainerInterface $container The dependency injection container
|
||||
* @param TemplateFinderInterface|null $finder The template paths cache warmer
|
||||
* @param array $paths Additional twig paths to warm
|
||||
*/
|
||||
public function __construct(ContainerInterface $container, TemplateFinderInterface $finder = null, array $paths = array())
|
||||
{
|
||||
|
@ -29,8 +29,6 @@ class FilesystemLoader extends BaseFilesystemLoader
|
||||
protected $parser;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param FileLocatorInterface $locator A FileLocatorInterface instance
|
||||
* @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
|
||||
* @param string|null $rootPath The root path common to all relative paths (null for getcwd())
|
||||
|
@ -23,8 +23,6 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Twig\Environment;
|
||||
|
||||
/**
|
||||
* ProfilerController.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class ProfilerController
|
||||
@ -39,8 +37,6 @@ class ProfilerController
|
||||
private $baseDir;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param UrlGeneratorInterface $generator The URL Generator
|
||||
* @param Profiler $profiler The profiler
|
||||
* @param Environment $twig The twig environment
|
||||
|
@ -45,8 +45,6 @@ abstract class Client
|
||||
private $isMainRequest = true;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $server The server parameters (equivalent of $_SERVER)
|
||||
* @param History $history A History instance to store the browser history
|
||||
* @param CookieJar $cookieJar A CookieJar instance to store the cookies
|
||||
|
@ -12,8 +12,6 @@
|
||||
namespace Symfony\Component\BrowserKit;
|
||||
|
||||
/**
|
||||
* Request object.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class Request
|
||||
@ -27,8 +25,6 @@ class Request
|
||||
protected $content;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $uri The request URI
|
||||
* @param string $method The HTTP method request
|
||||
* @param array $parameters The request parameters
|
||||
|
@ -12,8 +12,6 @@
|
||||
namespace Symfony\Component\BrowserKit;
|
||||
|
||||
/**
|
||||
* Response object.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class Response
|
||||
@ -23,8 +21,6 @@ class Response
|
||||
protected $headers;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* The headers array is a set of key/value pairs. If a header is present multiple times
|
||||
* then the value is an array of all the values.
|
||||
*
|
||||
|
@ -20,8 +20,6 @@ class MemcachedAdapter extends AbstractAdapter
|
||||
protected $maxIdLength = 250;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* Using a MemcachedAdapter with a TagAwareAdapter for storing tags is discouraged.
|
||||
* Using a RedisAdapter is recommended instead. If you cannot do otherwise, be aware that:
|
||||
* - the Memcached::OPT_BINARY_PROTOCOL must be enabled
|
||||
|
@ -20,8 +20,6 @@ class PdoAdapter extends AbstractAdapter
|
||||
protected $maxIdLength = 255;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* You can either pass an existing database connection as PDO instance or
|
||||
* a Doctrine DBAL Connection or a DSN string that will be used to
|
||||
* lazy-connect to the database when the cache is actually used.
|
||||
|
@ -20,8 +20,6 @@ class PdoCache extends AbstractCache
|
||||
protected $maxIdLength = 255;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* You can either pass an existing database connection as PDO instance or
|
||||
* a Doctrine DBAL Connection or a DSN string that will be used to
|
||||
* lazy-connect to the database when the cache is actually used.
|
||||
|
@ -61,8 +61,6 @@ class ApcClassLoader
|
||||
protected $decorated;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $prefix The APC namespace prefix to use
|
||||
* @param object $decorated A class loader object that implements the findFile() method
|
||||
*
|
||||
|
@ -25,8 +25,6 @@ class MapClassLoader
|
||||
private $map = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $map A map where keys are classes and values the absolute file path
|
||||
*/
|
||||
public function __construct(array $map)
|
||||
|
@ -60,8 +60,6 @@ class WinCacheClassLoader
|
||||
protected $decorated;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $prefix The WinCache namespace prefix to use
|
||||
* @param object $decorated A class loader object that implements the findFile() method
|
||||
*
|
||||
|
@ -60,8 +60,6 @@ class XcacheClassLoader
|
||||
private $decorated;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $prefix The XCache namespace prefix to use
|
||||
* @param object $decorated A class loader object that implements the findFile() method
|
||||
*
|
||||
|
@ -33,8 +33,6 @@ abstract class BaseNode implements NodeInterface
|
||||
protected $attributes = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name The name of the node
|
||||
* @param NodeInterface $parent The parent of this node
|
||||
*
|
||||
|
@ -26,8 +26,6 @@ class ExprBuilder
|
||||
public $thenPart;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
public function __construct(NodeDefinition $node)
|
||||
|
@ -23,8 +23,6 @@ class MergeBuilder
|
||||
public $allowOverwrite = true;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
public function __construct(NodeDefinition $node)
|
||||
|
@ -21,9 +21,6 @@ class NodeBuilder implements NodeParentInterface
|
||||
protected $parent;
|
||||
protected $nodeMapping;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->nodeMapping = array(
|
||||
|
@ -40,8 +40,6 @@ abstract class NodeDefinition implements NodeParentInterface
|
||||
protected $attributes = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name The name of the node
|
||||
* @param NodeParentInterface|null $parent The parent
|
||||
*/
|
||||
|
@ -23,8 +23,6 @@ class NormalizationBuilder
|
||||
public $remappings = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
public function __construct(NodeDefinition $node)
|
||||
|
@ -22,8 +22,6 @@ class ValidationBuilder
|
||||
public $rules = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
public function __construct(NodeDefinition $node)
|
||||
|
@ -23,8 +23,6 @@ class FileLocator implements FileLocatorInterface
|
||||
protected $paths;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string|array $paths A path or an array of paths where to look for resources
|
||||
*/
|
||||
public function __construct($paths = array())
|
||||
|
@ -24,8 +24,6 @@ use Symfony\Component\Config\Exception\FileLoaderLoadException;
|
||||
class DelegatingLoader extends Loader
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
|
||||
*/
|
||||
public function __construct(LoaderResolverInterface $resolver)
|
||||
|
@ -38,8 +38,6 @@ abstract class FileLoader extends Loader
|
||||
private $currentDir;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param FileLocatorInterface $locator A FileLocatorInterface instance
|
||||
*/
|
||||
public function __construct(FileLocatorInterface $locator)
|
||||
|
@ -27,8 +27,6 @@ class LoaderResolver implements LoaderResolverInterface
|
||||
private $loaders = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param LoaderInterface[] $loaders An array of loaders
|
||||
*/
|
||||
public function __construct(array $loaders = array())
|
||||
|
@ -22,8 +22,6 @@ class DirectoryResource implements SelfCheckingResourceInterface, \Serializable
|
||||
private $pattern;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $resource The file path to the resource
|
||||
* @param string|null $pattern A pattern to restrict monitored files
|
||||
*
|
||||
|
@ -26,8 +26,6 @@ class FileExistenceResource implements SelfCheckingResourceInterface, \Serializa
|
||||
private $exists;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $resource The file path to the resource
|
||||
*/
|
||||
public function __construct($resource)
|
||||
|
@ -26,8 +26,6 @@ class FileResource implements SelfCheckingResourceInterface, \Serializable
|
||||
private $resource;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $resource The file path to the resource
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
|
@ -29,8 +29,6 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface,
|
||||
private $hash;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $prefix A directory prefix
|
||||
* @param string $pattern A glob pattern
|
||||
* @param bool $recursive Whether directories should be scanned recursively or not
|
||||
|
@ -699,7 +699,7 @@ class Application
|
||||
$width = 1 << 31;
|
||||
}
|
||||
$lines = array();
|
||||
foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) {
|
||||
foreach (preg_split('/\r?\n/', trim($e->getMessage())) as $line) {
|
||||
foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
|
||||
// pre-format lines to get the right string length
|
||||
$lineLength = Helper::strlen($line) + 4;
|
||||
@ -1121,9 +1121,8 @@ class Application
|
||||
$lines[] = str_pad($line, $width);
|
||||
$line = $char;
|
||||
}
|
||||
if ('' !== $line) {
|
||||
$lines[] = count($lines) ? str_pad($line, $width) : $line;
|
||||
}
|
||||
|
||||
$lines[] = count($lines) ? str_pad($line, $width) : $line;
|
||||
|
||||
mb_convert_variables($encoding, 'utf8', $lines);
|
||||
|
||||
|
@ -46,8 +46,6 @@ class Command
|
||||
private $helperSet;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string|null $name The name of the command; passing null means it must be set in configure()
|
||||
*
|
||||
* @throws LogicException When the command name is empty
|
||||
|
@ -55,8 +55,6 @@ class ApplicationDescription
|
||||
private $showHidden;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Application $application
|
||||
* @param string|null $namespace
|
||||
* @param bool $showHidden
|
||||
|
@ -29,8 +29,6 @@ class OutputFormatterStyleStack
|
||||
private $emptyStyle;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param OutputFormatterStyleInterface|null $emptyStyle
|
||||
*/
|
||||
public function __construct(OutputFormatterStyleInterface $emptyStyle = null)
|
||||
|
@ -31,9 +31,6 @@ class DescriptorHelper extends Helper
|
||||
*/
|
||||
private $descriptors = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
|
@ -28,8 +28,6 @@ class HelperSet implements \IteratorAggregate
|
||||
private $command;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Helper[] $helpers An array of helper
|
||||
*/
|
||||
public function __construct(array $helpers = array())
|
||||
|
@ -44,8 +44,6 @@ class ArgvInput extends Input
|
||||
private $parsed;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array|null $argv An array of parameters from the CLI (in the argv format)
|
||||
* @param InputDefinition|null $definition A InputDefinition instance
|
||||
*/
|
||||
|
@ -28,8 +28,6 @@ class ArrayInput extends Input
|
||||
private $parameters;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
* @param InputDefinition|null $definition A InputDefinition instance
|
||||
*/
|
||||
|
@ -37,8 +37,6 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
||||
protected $interactive = true;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param InputDefinition|null $definition A InputDefinition instance
|
||||
*/
|
||||
public function __construct(InputDefinition $definition = null)
|
||||
|
@ -31,8 +31,6 @@ class InputArgument
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name The argument name
|
||||
* @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL
|
||||
* @param string $description A description text
|
||||
|
@ -36,8 +36,6 @@ class InputDefinition
|
||||
private $shortcuts;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $definition An array of InputArgument and InputOption instance
|
||||
*/
|
||||
public function __construct(array $definition = array())
|
||||
|
@ -33,8 +33,6 @@ class InputOption
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name The option name
|
||||
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
||||
* @param int $mode The option mode: One of the VALUE_* constants
|
||||
|
@ -28,8 +28,6 @@ class StringInput extends ArgvInput
|
||||
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $input An array of parameters from the CLI (in the argv format)
|
||||
*/
|
||||
public function __construct($input)
|
||||
|
@ -35,8 +35,6 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
||||
private $stderr;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
|
||||
* @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
|
||||
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
|
||||
|
@ -33,8 +33,6 @@ abstract class Output implements OutputInterface
|
||||
private $formatter;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
|
||||
* @param bool $decorated Whether to decorate messages
|
||||
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
|
||||
|
@ -33,8 +33,6 @@ class StreamOutput extends Output
|
||||
private $stream;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param resource $stream A stream resource
|
||||
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
|
||||
* @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
|
||||
|
@ -26,8 +26,6 @@ class ChoiceQuestion extends Question
|
||||
private $errorMessage = 'Value "%s" is invalid';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $question The question to ask to the user
|
||||
* @param array $choices The list of available choices
|
||||
* @param mixed $default The default answer to return
|
||||
|
@ -21,8 +21,6 @@ class ConfirmationQuestion extends Question
|
||||
private $trueAnswerRegex;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $question The question to ask to the user
|
||||
* @param bool $default The default answer to return, true or false
|
||||
* @param string $trueAnswerRegex A regex to match the "yes" answer
|
||||
|
@ -31,8 +31,6 @@ class Question
|
||||
private $normalizer;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $question The question to ask to the user
|
||||
* @param mixed $default The default answer to return if the user enters nothing
|
||||
*/
|
||||
|
@ -32,8 +32,6 @@ class CommandTester
|
||||
private $statusCode;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Command $command A Command instance to test
|
||||
*/
|
||||
public function __construct(Command $command)
|
||||
|
@ -652,6 +652,22 @@ class ApplicationTest extends TestCase
|
||||
putenv('COLUMNS=120');
|
||||
}
|
||||
|
||||
public function testRenderExceptionLineBreaks()
|
||||
{
|
||||
$application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getTerminalWidth'))->getMock();
|
||||
$application->setAutoExit(false);
|
||||
$application->expects($this->any())
|
||||
->method('getTerminalWidth')
|
||||
->will($this->returnValue(120));
|
||||
$application->register('foo')->setCode(function () {
|
||||
throw new \InvalidArgumentException("\n\nline 1 with extra spaces \nline 2\n\nline 4\n");
|
||||
});
|
||||
$tester = new ApplicationTester($application);
|
||||
|
||||
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks');
|
||||
}
|
||||
|
||||
public function testRun()
|
||||
{
|
||||
$application = new Application();
|
||||
|
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
[InvalidArgumentException]
|
||||
line 1 with extra spaces
|
||||
line 2
|
||||
|
||||
line 4
|
||||
|
||||
|
||||
foo
|
||||
|
@ -45,8 +45,6 @@ class Specificity
|
||||
private $c;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param int $a
|
||||
* @param int $b
|
||||
* @param int $c
|
||||
|
@ -33,8 +33,6 @@ class Parser implements ParserInterface
|
||||
private $tokenizer;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param null|Tokenizer $tokenizer
|
||||
*/
|
||||
public function __construct(Tokenizer $tokenizer = null)
|
||||
|
@ -33,9 +33,6 @@ class Tokenizer
|
||||
*/
|
||||
private $handlers;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$patterns = new TokenizerPatterns();
|
||||
|
@ -83,9 +83,6 @@ class TokenizerPatterns
|
||||
*/
|
||||
private $quotedStringPattern;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->unicodeEscapePattern = '\\\\([0-9a-f]{1,6})(?:\r\n|[ \n\r\t\f])?';
|
||||
|
@ -29,8 +29,6 @@ use Symfony\Component\CssSelector\XPath\XPathExpr;
|
||||
class HtmlExtension extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Translator $translator
|
||||
*/
|
||||
public function __construct(Translator $translator)
|
||||
|
@ -37,8 +37,6 @@ class NodeExtension extends AbstractExtension
|
||||
private $flags;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param int $flags
|
||||
*/
|
||||
public function __construct($flags = 0)
|
||||
|
@ -34,11 +34,6 @@ class DebugClassLoader
|
||||
private static $php7Reserved = array('int', 'float', 'bool', 'string', 'true', 'false', 'null');
|
||||
private static $darwinCache = array('/' => array('/', array()));
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param callable $classLoader A class loader
|
||||
*/
|
||||
public function __construct(callable $classLoader)
|
||||
{
|
||||
$this->classLoader = $classLoader;
|
||||
|
@ -39,7 +39,7 @@ class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass
|
||||
$aliases = array();
|
||||
foreach ($container->getAliases() as $name => $target) {
|
||||
$this->currentId = $name;
|
||||
$aliases[$this->bag->resolveValue($name)] = $this->bag->resolveValue($target);
|
||||
$aliases[$this->bag->resolveValue($name)] = $target;
|
||||
}
|
||||
$container->setAliases($aliases);
|
||||
} catch (ParameterNotFoundException $e) {
|
||||
|
@ -758,8 +758,6 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
$bagClass
|
||||
|
||||
/*{$this->docStar}
|
||||
* $class.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
@ -785,9 +783,6 @@ EOF;
|
||||
|
||||
$code = <<<EOF
|
||||
|
||||
/*{$this->docStar}
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{{$targetDirs}
|
||||
parent::__construct($arguments);
|
||||
@ -818,9 +813,6 @@ EOF;
|
||||
|
||||
$code = <<<EOF
|
||||
|
||||
/*{$this->docStar}
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{{$targetDirs}
|
||||
EOF;
|
||||
|
@ -11,8 +11,6 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* Container.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
@ -23,9 +21,6 @@ class Container extends AbstractContainer
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
|
@ -9,8 +9,6 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* ProjectServiceContainer.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
@ -21,9 +19,6 @@ class ProjectServiceContainer extends Container
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user