8000 Merge branch '3.4' into translation-loader-interface · symfony/symfony@78661af · GitHub
[go: up one dir, main page]

Skip to content

Commit 78661af

Browse files
authored
Merge branch '3.4' into translation-loader-interface
2 parents 95d2096 + 4173f13 commit 78661af

File tree

72 files changed

+635
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+635
-131
lines changed

src/Symfony/Bridge/Twig/Command/DebugCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
class DebugCommand extends Command
2828
{
29+
protected static $defaultName = 'debug:twig';
30+
2931
private $twig;
3032

3133
/**
@@ -66,7 +68,6 @@ protected function getTwigEnvironment()
6668
protected function configure()
6769
{
6870
$this
69-
->setName('debug:twig')
7071
->setDefinition(array(
7172
new InputArgument('filter', InputArgument::OPTIONAL, 'Show details for all entries matching this filter'),
7273
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (text or json)', 'text'),

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
*/
3232
class LintCommand extends Command
3333
{
34+
protected static $defaultName = 'lint:twig';
35+
3436
private $twig;
3537

3638
/**
@@ -71,7 +73,6 @@ protected function getTwigEnvironment()
7173
protected function configure()
7274
{
7375
$this
74-
->setName('lint:twig')
7576
->setDescription('Lints a template and outputs encountered errors')
7677
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
7778
->addArgument('filename', InputArgument::IS_ARRAY)

src/Symfony/Bridge/Twig/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@
3333
"symfony/security": "~2.8|~3.0|~4.0",
3434
"symfony/security-acl": "~2.8|~3.0",
3535
"symfony/stopwatch": "~2.8|~3.0|~4.0",
36-
"symfony/console": "~2.8|~3.0|~4.0",
36+
"symfony/console": "~3.4|~4.0",
3737
"symfony/var-dumper": "~2.8.10|~3.1.4|~3.2|~4.0",
3838
"symfony/expression-language": "~2.8|~3.0|~4.0",
3939
"symfony/web-link": "~3.3|~4.0"
4040
},
4141
"conflict": {
42-
"symfony/form": "<3.2.10|~3.3,<3.3.3"
42+
"symfony/form": "<3.2.10|~3.3,<3.3.3",
43+
"symfony/console": "<3.4"
4344
},
4445
"suggest": {
4546
"symfony/finder": "",

src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@
2828
*/
2929
class AboutCommand extends ContainerAwareCommand
3030
{
31+
protected static $defaultName = 'about';
32+
3133
/**
3234
* {@inheritdoc}
3335
*/
3436
protected function configure()
3537
{
36-
$this
37-
->setName('about')
38-
->setDescription('Displays information about the current project')
39-
;
38+
$this->setDescription('Displays information about the current project');
4039
}
4140

4241
/**

src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class AssetsInstallCommand extends ContainerAwareCommand
3535
const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink';
3636
const METHOD_RELATIVE_SYMLINK = 'relative symlink';
3737

38+
protected static $defaultName = 'assets:install';
39+
3840
private $filesystem;
3941

4042
/**
@@ -61,7 +63,6 @@ public function __construct($filesystem = null)
6163
protected function configure()
6264
{
6365
$this
64-
->setName('assets:install')
6566
->setDefinition(array(
6667
new InputArgument('target', InputArgument::OPTIONAL, 'The target directory', 'public'),
6768
))

src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
*/
3333
class CacheClearCommand extends ContainerAwareCommand
3434
{
35+
protected static $defaultName = 'cache:clear';
36+
3537
private $cacheClearer;
3638
private $filesystem;
3739
private $warning;
@@ -62,7 +64,6 @@ public function __construct($cacheClearer = null, Filesystem $filesystem = null)
6264
protected function configure()
6365
{
6466
$this
65-
->setName('cache:clear')
6667
->setDefinition(array(
6768
new InputOption('no-warmup', '', InputOption::VALUE_NONE, 'Do not warm up the cache'),
6869
new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'),

src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
*/
2626
final class CachePoolClearCommand extends ContainerAwareCommand
2727
{
28+
protected static $defaultName = 'cache:pool:clear';
29+
2830
private $poolClearer;
2931

3032
/**
@@ -51,7 +53,6 @@ public function __construct($poolClearer = null)
5153
protected function configure()
5254
{
5355
$this
54-
->setName('cache:pool:clear')
5556
->setDefinition(array(
5657
new InputArgument('pools', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'A list of cache pools or cache pool clearers'),
5758
))

src/Symfony/Bundle/FrameworkBundle/Command/CachePoolPruneCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
*/
2525
final class CachePoolPruneCommand extends Command
2626
{
27+
protected static $defaultName = 'cache:pool:prune';
28+
2729
private $pools;
2830

2931
/**
@@ -42,7 +44,6 @@ public function __construct($pools)
4244
protected function configure()
4345
{
4446
$this
45-
->setName('cache:pool:prune')
4647
->setDescription('Prune cache pools')
4748
->setHelp(<<<'EOF'
4849
The <info>%command.name%</info> command deletes all expired items from all pruneable pools.

src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
class CacheWarmupCommand extends ContainerAwareCommand
2828
{
29+
protected static $defaultName = 'cache:warmup';
30+
2931
private $cacheWarmer;
3032

3133
/**
@@ -52,7 +54,6 @@ public function __construct($cacheWarmer = null)
5254
protected function configure()
5355
{
5456
$this
55-
->setName('cache:warmup')
5657
->setDefinition(array(
5758
new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'),
5859
))

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
*/
2929
class ConfigDebugCommand extends AbstractConfigCommand
3030
{
31+
protected static $defaultName = 'debug:config';
32+
3133
/**
3234
* {@inheritdoc}
3335
*/
3436
protected function configure()
3537
{
3638
$this
37-
->setName('debug:config')
3839
->setDefinition(array(
3940
new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'),
4041
new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'),

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@
3030
*/
3131
class ConfigDumpReferenceCommand extends AbstractConfigCommand
3232
{
33+
protected static $defaultName = 'config:dump-reference';
34+
3335
/**
3436
* {@inheritdoc}
3537
*/
3638
protected function configure()
3739
{
3840
$this
39-
->setName('config:dump-reference')
4041
->setDefinition(array(
4142
new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'),
4243
new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'),

src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
*/
3333
class ContainerDebugCommand extends ContainerAwareCommand
3434
{
35+
protected static $defaultName = 'debug:container';
36+
3537
/**
3638
* @var ContainerBuilder|null
3739
*/
@@ -43,7 +45,6 @@ class ContainerDebugCommand extends ContainerAwareCommand
4345
protected function configure()
4446
{
4547
$this
46-
->setName('debug:container')
4748
->setDefinition(array(
4849
new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'),
4950
new InputOption('show-private', null, InputOption::VALUE_NONE, 'Used to show public *and* private services'),

src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
class EventDispatcherDebugCommand extends ContainerAwareCommand
3030
{
31+
protected static $defaultName = 'debug:event-dispatcher';
3132
private $dispatcher;
3233

3334
/**
@@ -54,7 +55,6 @@ public function __construct($dispatcher = null)
5455
protected function configure()
5556
{
5657
$this
57-
->setName('debug:event-dispatcher')
5858
->setDefinition(array(
5959
new InputArgument('event', InputArgument::OPTIONAL, 'An event name'),
6060
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),

src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
*/
3333
class RouterDebugCommand extends ContainerAwareCommand
3434
{
35+
protected static $defaultName = 'debug:router';
3536
private $router;
3637

3738
/**
@@ -79,7 +80,6 @@ public function isEnabled()
7980
protected function configure()
8081
{
8182
$this
82-
->setName('debug:router')
8383
->setDefinition(array(
8484
new InputArgument('name', InputArgument::OPTIONAL, 'A route name'),
8585
new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'),

src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*/
3030
class RouterMatchCommand extends ContainerAwareCommand
3131
{
32+
protected static $defaultName = 'router:match';
33+
3234
private $router;
3335

3436
/**
@@ -76,7 +78,6 @@ public function isEnabled()
7678
protected function configure()
7779
{
7880
$this
79-
->setName('router:match')
8081
->setDefinition(array(
8182
new InputArgument('path_info', InputArgument::REQUIRED, 'A path info'),
8283
new InputOption('method', null, InputOption::VALUE_REQUIRED, 'Sets the HTTP method'),

src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class TranslationDebugCommand extends ContainerAwareCommand
4040
const MESSAGE_UNUSED = 1;
4141
const MESSAGE_EQUALS_FALLBACK = 2;
4242

43+
protected static $defaultName = 'debug:translation';
44+
4345
private $translator;
4446
private $reader;
4547
private $extractor;
@@ -72,7 +74,6 @@ public function __construct($translator = null, TranslationReaderInterface $read
7274
protected function configure()
7375
{
7476
$this
75-
->setName('debug:translation')
7677
->setDefinition(array(
7778
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
7879
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'),

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
*/
3434
class TranslationUpdateCommand extends ContainerAwareCommand
3535
{
36+
protected static $defaultName = 'translation:update';
37+
3638
private $writer;
3739
private $reader;
3840
private $extractor;
@@ -68,7 +70,6 @@ public function __construct($writer = null, TranslationReaderInterface $reader =
6870
protected function configure()
6971
{
7072
$this
71-
->setName('translation:update')
7273
->setDefinition(array(
7374
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
7475
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'),

src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
*/
2626
class WorkflowDumpCommand extends ContainerAwareCommand
2727
{
28+
protected static $defaultName = 'workflow:dump';
29+
2830
/**
2931
* {@inheritdoc}
3032
*
@@ -41,7 +43,6 @@ public function isEnabled()
4143
protected function configure()
4244
{
4345
$this
44-
->setName('workflow:dump')
4546
->setDefinition(array(
4647
new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'),
4748
new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'),

src/Symfony/Bundle/FrameworkBundle/Command/XliffLintCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
*/
2525
class XliffLintCommand extends BaseLintCommand
2626
{
27+
protected static $defaultName = 'lint:xliff';
28+
2729
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
2830
{
2931
if (func_num_args()) {

src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
class YamlLintCommand extends BaseLintCommand
2525
{
26+
protected static $defaultName = 'lint:yaml';
27+
2628
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
2729
{
2830
if (func_num_args()) {

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
14411441
$fileRecorder('yml', $file);
14421442
}
14431443

1444-
if ($container->fileExists($dir = $dirname.'/Resources/config/serialization')) {
1444+
if ($container->fileExists($dir = $dirname.'/Resources/config/serialization', '/^$/')) {
14451445
$this->registerMappingFilesFromDir($dir, $fileRecorder);
14461446
}
14471447
}

src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
*/
2828
class InitAclCommand extends ContainerAwareCommand
2929
{
30+
protected static $defaultName = 'init:acl';
31+
3032
private $connection;
3133
private $schema;
3234

@@ -70,7 +72,6 @@ public function isEnabled()
7072
protected function configure()
7173
{
7274
$this
73-
->setName('init:acl')
7475
->setDescription('Mounts ACL tables in the database')
7576
->setHelp(<<<'EOF'
7677
The <info>%command.name%</info> command mounts ACL tables in the database.

src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
*/
3333
class SetAclCommand extends ContainerAwareCommand
3434
{
35+
protected static $defaultName = 'acl:set';
36+
3537
private $provider;
3638

3739
/**
@@ -80,7 +82,6 @@ public function isEnabled()
8082
protected function configure()
8183
{
8284
$this
83-
->setName('acl:set')
8485
->setDescription('Sets ACL for objects')
8586
->setHelp(<<<EOF
8687
The <info>%command.name%</info> command sets ACL.

src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Symfony\Component\Console\Output\OutputInterface;
2020
use Symfony\Component\Console\Question\Question;
2121
use Symfony\Component\Console\Style\SymfonyStyle;
22-
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
2322
use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder;
2423
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
2524
use Symfony\Component\Security\Core\User\User;
@@ -33,6 +32,8 @@
3332
*/
3433
class UserPasswordEncoderCommand extends ContainerAwareCommand
3534
{
35+
protected static $defaultName = 'security:encode-password';
36+
3637
private $encoderFactory;
3738
private $userClasses;
3839

@@ -54,7 +55,6 @@ public function __construct(EncoderFactoryInterface $encoderFactory = null, arra
5455
protected function configure()
5556
{
5657
$this
57-
->setName('security:encode-password')
5858
->setDescription('Encodes a password.')
5959
->addArgument('password', InputArgument::OPTIONAL, 'The plain password to encode.')
6060
->addArgument('user-class', InputArgument::OPTIONAL, 'The User entity class path associated with the encoder used to encode the password.')

0 commit comments

Comments
 (0)
0