Merge branch '3.1' into 3.2
* 3.1: do not depend on a fixed date in layout tests [Console] Escape default value when dumping help [Console] OS X Can't call cli_set_process_title php without superuser Fixed @return when returning this or static #bis fixed @return when returning this or static Polish translation improvement in Validator component [Console] Descriptors should use Helper::strlen [Config] Improve PHPdoc / IDE autocomplete [Debug] Wrap call to ->log in a try catch block [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes fix merge [cache] Bump RedisAdapter timeout to 5s fixed @return when returning this or static [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService remove is_writable check on filesystem cache
This commit is contained in:
commit
8df0540c9f
@ -22,7 +22,7 @@
|
||||
"require-dev": {
|
||||
"symfony/asset": "~2.8|~3.0",
|
||||
"symfony/finder": "~2.8|~3.0",
|
||||
"symfony/form": "~3.0.4",
|
||||
"symfony/form": "~3.1.9|^3.2.2",
|
||||
"symfony/http-kernel": "~3.2",
|
||||
"symfony/polyfill-intl-icu": "~1.0",
|
||||
"symfony/routing": "~2.8|~3.0",
|
||||
|
@ -39,7 +39,7 @@
|
||||
"symfony/dom-crawler": "~2.8|~3.0",
|
||||
"symfony/polyfill-intl-icu": "~1.0",
|
||||
"symfony/security": "~2.8|~3.0",
|
||||
"symfony/form": "~2.8|~3.0",
|
||||
"symfony/form": "~2.8.16|~3.1.9|^3.2.2",
|
||||
"symfony/expression-language": "~2.8|~3.0",
|
||||
"symfony/process": "~2.8|~3.0",
|
||||
"symfony/security-core": "~3.2",
|
||||
|
@ -97,7 +97,8 @@ class RememberMeFactory implements SecurityFactoryInterface
|
||||
if (count($userProviders) === 0) {
|
||||
throw new \RuntimeException('You must configure at least one remember-me aware listener (such as form-login) for each firewall that has remember-me enabled.');
|
||||
}
|
||||
$rememberMeServices->replaceArgument(0, $userProviders);
|
||||
|
||||
$rememberMeServices->replaceArgument(0, array_unique($userProviders));
|
||||
|
||||
// remember-me listener
|
||||
$listenerId = 'security.authentication.listener.rememberme.'.$id;
|
||||
|
@ -77,6 +77,10 @@ class FilesystemAdapter extends AbstractAdapter
|
||||
$ok = $this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".serialize($value), $expiresAt) && $ok;
|
||||
}
|
||||
|
||||
if (!$ok && !is_writable($this->directory)) {
|
||||
throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory));
|
||||
}
|
||||
|
||||
return $ok;
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Cache\Adapter;
|
||||
|
||||
use Symfony\Component\Cache\Exception\CacheException;
|
||||
use Symfony\Component\Cache\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
@ -40,9 +41,7 @@ trait FilesystemAdapterTrait
|
||||
if (false === $dir = realpath($dir) ?: (file_exists($dir) ? $dir : false)) {
|
||||
throw new InvalidArgumentException(sprintf('Cache directory does not exist (%s)', $directory));
|
||||
}
|
||||
if (!is_writable($dir .= DIRECTORY_SEPARATOR)) {
|
||||
throw new InvalidArgumentException(sprintf('Cache directory is not writable (%s)', $directory));
|
||||
}
|
||||
$dir .= DIRECTORY_SEPARATOR;
|
||||
// On Windows the whole path is limited to 258 chars
|
||||
if ('\\' === DIRECTORY_SEPARATOR && strlen($dir) > 234) {
|
||||
throw new InvalidArgumentException(sprintf('Cache directory too long (%s)', $directory));
|
||||
|
@ -122,6 +122,10 @@ class PhpFilesAdapter extends AbstractAdapter
|
||||
}
|
||||
}
|
||||
|
||||
if (!$ok && !is_writable($this->directory)) {
|
||||
throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory));
|
||||
}
|
||||
|
||||
return $ok;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class RedisAdapter extends AbstractAdapter
|
||||
'class' => null,
|
||||
'persistent' => 0,
|
||||
'persistent_id' => null,
|
||||
'timeout' => 0,
|
||||
'timeout' => 30,
|
||||
'read_timeout' => 0,
|
||||
'retry_interval' => 0,
|
||||
);
|
||||
|
@ -210,7 +210,7 @@ class ExprBuilder
|
||||
/**
|
||||
* Returns the related node.
|
||||
*
|
||||
* @return NodeDefinition
|
||||
* @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
|
||||
*
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
|
@ -63,7 +63,7 @@ class MergeBuilder
|
||||
/**
|
||||
* Returns the related node.
|
||||
*
|
||||
* @return NodeDefinition
|
||||
* @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
|
||||
*/
|
||||
public function end()
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ abstract class NodeDefinition implements NodeParentInterface
|
||||
/**
|
||||
* Returns the parent node.
|
||||
*
|
||||
* @return NodeParentInterface|NodeBuilder|NodeDefinition|null The builder of the parent node
|
||||
* @return NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null The builder of the parent node
|
||||
*/
|
||||
public function end()
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ class ValidationBuilder
|
||||
*
|
||||
* @param \Closure $closure
|
||||
*
|
||||
* @return ExprBuilder|ValidationBuilder
|
||||
* @return ExprBuilder|$this
|
||||
*/
|
||||
public function rule(\Closure $closure = null)
|
||||
{
|
||||
|
@ -228,7 +228,14 @@ class Command
|
||||
|
||||
if (null !== $this->processTitle) {
|
||||
if (function_exists('cli_set_process_title')) {
|
||||
cli_set_process_title($this->processTitle);
|
||||
if (false === @cli_set_process_title($this->processTitle)) {
|
||||
if ('Darwin' === PHP_OS) {
|
||||
$output->writeln('<comment>Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.</comment>');
|
||||
} else {
|
||||
$error = error_get_last();
|
||||
trigger_error($error['message'], E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
} elseif (function_exists('setproctitle')) {
|
||||
setproctitle($this->processTitle);
|
||||
} elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
|
||||
|
@ -13,6 +13,7 @@ namespace Symfony\Component\Console\Descriptor;
|
||||
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\Helper;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
@ -94,7 +95,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
|
||||
$this->write(
|
||||
$command->getName()."\n"
|
||||
.str_repeat('-', strlen($command->getName()))."\n\n"
|
||||
.str_repeat('-', Helper::strlen($command->getName()))."\n\n"
|
||||
.'* Description: '.($command->getDescription() ?: '<none>')."\n"
|
||||
.'* Usage:'."\n\n"
|
||||
.array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) {
|
||||
@ -121,7 +122,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
$describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
|
||||
$description = new ApplicationDescription($application, $describedNamespace);
|
||||
|
||||
$this->write($application->getName()."\n".str_repeat('=', strlen($application->getName())));
|
||||
$this->write($application->getName()."\n".str_repeat('=', Helper::strlen($application->getName())));
|
||||
|
||||
foreach ($description->getNamespaces() as $namespace) {
|
||||
if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
|
||||
|
@ -13,6 +13,8 @@ namespace Symfony\Component\Console\Descriptor;
|
||||
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||
use Symfony\Component\Console\Helper\Helper;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
@ -37,7 +39,7 @@ class TextDescriptor extends Descriptor
|
||||
$default = '';
|
||||
}
|
||||
|
||||
$totalWidth = isset($options['total_width']) ? $options['total_width'] : strlen($argument->getName());
|
||||
$totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName());
|
||||
$spacingWidth = $totalWidth - strlen($argument->getName());
|
||||
|
||||
$this->writeText(sprintf(' <info>%s</info> %s%s%s',
|
||||
@ -75,7 +77,7 @@ class TextDescriptor extends Descriptor
|
||||
sprintf('--%s%s', $option->getName(), $value)
|
||||
);
|
||||
|
||||
$spacingWidth = $totalWidth - strlen($synopsis);
|
||||
$spacingWidth = $totalWidth - Helper::strlen($synopsis);
|
||||
|
||||
$this->writeText(sprintf(' <info>%s</info> %s%s%s%s',
|
||||
$synopsis,
|
||||
@ -94,7 +96,7 @@ class TextDescriptor extends Descriptor
|
||||
{
|
||||
$totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions());
|
||||
foreach ($definition->getArguments() as $argument) {
|
||||
$totalWidth = max($totalWidth, strlen($argument->getName()));
|
||||
$totalWidth = max($totalWidth, Helper::strlen($argument->getName()));
|
||||
}
|
||||
|
||||
if ($definition->getArguments()) {
|
||||
@ -209,7 +211,7 @@ class TextDescriptor extends Descriptor
|
||||
foreach ($namespace['commands'] as $name) {
|
||||
if (isset($commands[$name])) {
|
||||
$this->writeText("\n");
|
||||
$spacingWidth = $width - strlen($name);
|
||||
$spacingWidth = $width - Helper::strlen($name);
|
||||
$command = $commands[$name];
|
||||
$commandAliases = $this->getCommandAliasesText($command);
|
||||
$this->writeText(sprintf(' <info>%s</info>%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options);
|
||||
@ -260,6 +262,16 @@ class TextDescriptor extends Descriptor
|
||||
*/
|
||||
private function formatDefaultValue($default)
|
||||
{
|
||||
if (is_string($default)) {
|
||||
$default = OutputFormatter::escape($default);
|
||||
} elseif (is_array($default)) {
|
||||
foreach ($default as $key => $value) {
|
||||
if (is_string($value)) {
|
||||
$default[$key] = OutputFormatter::escape($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return str_replace('\\\\', '\\', json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
|
||||
@ -273,9 +285,9 @@ class TextDescriptor extends Descriptor
|
||||
$widths = array();
|
||||
|
||||
foreach ($commands as $command) {
|
||||
$widths[] = strlen($command->getName());
|
||||
$widths[] = Helper::strlen($command->getName());
|
||||
foreach ($command->getAliases() as $alias) {
|
||||
$widths[] = strlen($alias);
|
||||
$widths[] = Helper::strlen($alias);
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,10 +304,10 @@ class TextDescriptor extends Descriptor
|
||||
$totalWidth = 0;
|
||||
foreach ($options as $option) {
|
||||
// "-" + shortcut + ", --" + name
|
||||
$nameLength = 1 + max(strlen($option->getShortcut()), 1) + 4 + strlen($option->getName());
|
||||
$nameLength = 1 + max(Helper::strlen($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName());
|
||||
|
||||
if ($option->acceptValue()) {
|
||||
$valueLength = 1 + strlen($option->getName()); // = + value
|
||||
$valueLength = 1 + Helper::strlen($option->getName()); // = + value
|
||||
$valueLength += $option->isValueOptional() ? 2 : 0; // [ + ]
|
||||
|
||||
$nameLength += $valueLength;
|
||||
|
@ -152,7 +152,7 @@ class Table
|
||||
* @param int $columnIndex Column index
|
||||
* @param TableStyle|string $name The style name or a TableStyle instance
|
||||
*
|
||||
* @return Table
|
||||
* @return $this
|
||||
*/
|
||||
public function setColumnStyle($columnIndex, $name)
|
||||
{
|
||||
@ -187,7 +187,7 @@ class Table
|
||||
* @param int $columnIndex Column index
|
||||
* @param int $width Minimum column width in characters
|
||||
*
|
||||
* @return Table
|
||||
* @return $this
|
||||
*/
|
||||
public function setColumnWidth($columnIndex, $width)
|
||||
{
|
||||
@ -201,7 +201,7 @@ class Table
|
||||
*
|
||||
* @param array $widths
|
||||
*
|
||||
* @return Table
|
||||
* @return $this
|
||||
*/
|
||||
public function setColumnWidths(array $widths)
|
||||
{
|
||||
|
@ -335,6 +335,9 @@ class CommandTest extends \PHPUnit_Framework_TestCase
|
||||
$command->setProcessTitle('foo');
|
||||
$this->assertSame(0, $command->run(new StringInput(''), new NullOutput()));
|
||||
if (function_exists('cli_set_process_title')) {
|
||||
if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) {
|
||||
$this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.');
|
||||
}
|
||||
$this->assertEquals('foo', cli_get_process_title());
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
abstract protected function getFormat();
|
||||
|
||||
private function getDescriptionTestData(array $objects)
|
||||
protected function getDescriptionTestData(array $objects)
|
||||
{
|
||||
$data = array();
|
||||
foreach ($objects as $name => $object) {
|
||||
|
@ -12,9 +12,27 @@
|
||||
namespace Symfony\Component\Console\Tests\Descriptor;
|
||||
|
||||
use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
|
||||
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
|
||||
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;
|
||||
|
||||
class MarkdownDescriptorTest extends AbstractDescriptorTest
|
||||
{
|
||||
public function getDescribeCommandTestData()
|
||||
{
|
||||
return $this->getDescriptionTestData(array_merge(
|
||||
ObjectsProvider::getCommands(),
|
||||
array('command_mbstring' => new DescriptorCommandMbString())
|
||||
));
|
||||
}
|
||||
|
||||
public function getDescribeApplicationTestData()
|
||||
{
|
||||
return $this->getDescriptionTestData(array_merge(
|
||||
ObjectsProvider::getApplications(),
|
||||
array('application_mbstring' => new DescriptorApplicationMbString())
|
||||
));
|
||||
}
|
||||
|
||||
protected function getDescriptor()
|
||||
{
|
||||
return new MarkdownDescriptor();
|
||||
|
@ -31,6 +31,7 @@ class ObjectsProvider
|
||||
'input_argument_2' => new InputArgument('argument_name', InputArgument::IS_ARRAY, 'argument description'),
|
||||
'input_argument_3' => new InputArgument('argument_name', InputArgument::OPTIONAL, 'argument description', 'default_value'),
|
||||
'input_argument_4' => new InputArgument('argument_name', InputArgument::REQUIRED, "multiline\nargument description"),
|
||||
'input_argument_with_style' => new InputArgument('argument_name', InputArgument::OPTIONAL, 'argument description', '<comment>style</>'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -43,6 +44,8 @@ class ObjectsProvider
|
||||
'input_option_4' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'option description', array()),
|
||||
'input_option_5' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, "multiline\noption description"),
|
||||
'input_option_6' => new InputOption('option_name', array('o', 'O'), InputOption::VALUE_REQUIRED, 'option with multiple shortcuts'),
|
||||
'input_option_with_style' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, 'option description', '<comment>style</>'),
|
||||
'input_option_with_style_array' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'option description', array('<comment>Hello</comment>', '<info>world</info>')),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -12,9 +12,27 @@
|
||||
namespace Symfony\Component\Console\Tests\Descriptor;
|
||||
|
||||
use Symfony\Component\Console\Descriptor\TextDescriptor;
|
||||
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
|
||||
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;
|
||||
|
||||
class TextDescriptorTest extends AbstractDescriptorTest
|
||||
{
|
||||
public function getDescribeCommandTestData()
|
||||
{
|
||||
return $this->getDescriptionTestData(array_merge(
|
||||
ObjectsProvider::getCommands(),
|
||||
array('command_mbstring' => new DescriptorCommandMbString())
|
||||
));
|
||||
}
|
||||
|
||||
public function getDescribeApplicationTestData()
|
||||
{
|
||||
return $this->getDescriptionTestData(array_merge(
|
||||
ObjectsProvider::getApplications(),
|
||||
array('application_mbstring' => new DescriptorApplicationMbString())
|
||||
));
|
||||
}
|
||||
|
||||
protected function getDescriptor()
|
||||
{
|
||||
return new TextDescriptor();
|
||||
|
@ -0,0 +1,24 @@
|
||||
<?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\Tests\Fixtures;
|
||||
|
||||
use Symfony\Component\Console\Application;
|
||||
|
||||
class DescriptorApplicationMbString extends Application
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('MbString åpplicätion');
|
||||
|
||||
$this->add(new DescriptorCommandMbString());
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?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\Tests\Fixtures;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class DescriptorCommandMbString extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('descriptor:åèä')
|
||||
->setDescription('command åèä description')
|
||||
->setHelp('command åèä help')
|
||||
->addUsage('-o|--option_name <argument_name>')
|
||||
->addUsage('<argument_name>')
|
||||
->addArgument('argument_åèä', InputArgument::REQUIRED)
|
||||
->addOption('option_åèä', 'o', InputOption::VALUE_NONE)
|
||||
;
|
||||
}
|
||||
}
|
@ -0,0 +1,309 @@
|
||||
MbString åpplicätion
|
||||
====================
|
||||
|
||||
* help
|
||||
* list
|
||||
|
||||
**descriptor:**
|
||||
|
||||
* descriptor:åèä
|
||||
|
||||
help
|
||||
----
|
||||
|
||||
* Description: Displays help for a command
|
||||
* Usage:
|
||||
|
||||
* `help [--xml] [--format FORMAT] [--raw] [--] [<command_name>]`
|
||||
|
||||
The <info>help</info> command displays help for a given command:
|
||||
|
||||
<info>php app/console help list</info>
|
||||
|
||||
You can also output the help in other formats by using the <comment>--format</comment> option:
|
||||
|
||||
<info>php app/console help --format=xml list</info>
|
||||
|
||||
To display the list of available commands, please use the <info>list</info> command.
|
||||
|
||||
### Arguments:
|
||||
|
||||
**command_name:**
|
||||
|
||||
* Name: command_name
|
||||
* Is required: no
|
||||
* Is array: no
|
||||
* Description: The command name
|
||||
* Default: `'help'`
|
||||
|
||||
### Options:
|
||||
|
||||
**xml:**
|
||||
|
||||
* Name: `--xml`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: To output help as XML
|
||||
* Default: `false`
|
||||
|
||||
**format:**
|
||||
|
||||
* Name: `--format`
|
||||
* Shortcut: <none>
|
||||
* Accept value: yes
|
||||
* Is value required: yes
|
||||
* Is multiple: no
|
||||
* Description: The output format (txt, xml, json, or md)
|
||||
* Default: `'txt'`
|
||||
|
||||
**raw:**
|
||||
|
||||
* Name: `--raw`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: To output raw command help
|
||||
* Default: `false`
|
||||
|
||||
**help:**
|
||||
|
||||
* Name: `--help`
|
||||
* Shortcut: `-h`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Display this help message
|
||||
* Default: `false`
|
||||
|
||||
**quiet:**
|
||||
|
||||
* Name: `--quiet`
|
||||
* Shortcut: `-q`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Do not output any message
|
||||
* Default: `false`
|
||||
|
||||
**verbose:**
|
||||
|
||||
* Name: `--verbose`
|
||||
* Shortcut: `-v|-vv|-vvv`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
||||
* Default: `false`
|
||||
|
||||
**version:**
|
||||
|
||||
* Name: `--version`
|
||||
* Shortcut: `-V`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Display this application version
|
||||
* Default: `false`
|
||||
|
||||
**ansi:**
|
||||
|
||||
* Name: `--ansi`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Force ANSI output
|
||||
* Default: `false`
|
||||
|
||||
**no-ansi:**
|
||||
|
||||
* Name: `--no-ansi`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Disable ANSI output
|
||||
* Default: `false`
|
||||
|
||||
**no-interaction:**
|
||||
|
||||
* Name: `--no-interaction`
|
||||
* Shortcut: `-n`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Do not ask any interactive question
|
||||
* Default: `false`
|
||||
|
||||
list
|
||||
----
|
||||
|
||||
* Description: Lists commands
|
||||
* Usage:
|
||||
|
||||
* `list [--xml] [--raw] [--format FORMAT] [--] [<namespace>]`
|
||||
|
||||
The <info>list</info> command lists all commands:
|
||||
|
||||
<info>php app/console list</info>
|
||||
|
||||
You can also display the commands for a specific namespace:
|
||||
|
||||
<info>php app/console list test</info>
|
||||
|
||||
You can also output the information in other formats by using the <comment>--format</comment> option:
|
||||
|
||||
<info>php app/console list --format=xml</info>
|
||||
|
||||
It's also possible to get raw list of commands (useful for embedding command runner):
|
||||
|
||||
<info>php app/console list --raw</info>
|
||||
|
||||
### Arguments:
|
||||
|
||||
**namespace:**
|
||||
|
||||
* Name: namespace
|
||||
* Is required: no
|
||||
* Is array: no
|
||||
* Description: The namespace name
|
||||
* Default: `NULL`
|
||||
|
||||
### Options:
|
||||
|
||||
**xml:**
|
||||
|
||||
* Name: `--xml`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: To output list as XML
|
||||
* Default: `false`
|
||||
|
||||
**raw:**
|
||||
|
||||
* Name: `--raw`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: To output raw command list
|
||||
* Default: `false`
|
||||
|
||||
**format:**
|
||||
|
||||
* Name: `--format`
|
||||
* Shortcut: <none>
|
||||
* Accept value: yes
|
||||
* Is value required: yes
|
||||
* Is multiple: no
|
||||
* Description: The output format (txt, xml, json, or md)
|
||||
* Default: `'txt'`
|
||||
|
||||
descriptor:åèä
|
||||
--------------
|
||||
|
||||
* Description: command åèä description
|
||||
* Usage:
|
||||
|
||||
* `descriptor:åèä [-o|--option_åèä] [--] <argument_åèä>`
|
||||
* `descriptor:åèä -o|--option_name <argument_name>`
|
||||
* `descriptor:åèä <argument_name>`
|
||||
|
||||
command åèä help
|
||||
|
||||
### Arguments:
|
||||
|
||||
**argument_åèä:**
|
||||
|
||||
* Name: argument_åèä
|
||||
* Is required: yes
|
||||
* Is array: no
|
||||
* Description: <none>
|
||||
* Default: `NULL`
|
||||
|
||||
### Options:
|
||||
|
||||
**option_åèä:**
|
||||
|
||||
* Name: `--option_åèä`
|
||||
* Shortcut: `-o`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: <none>
|
||||
* Default: `false`
|
||||
|
||||
**help:**
|
||||
|
||||
* Name: `--help`
|
||||
* Shortcut: `-h`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Display this help message
|
||||
* Default: `false`
|
||||
|
||||
**quiet:**
|
||||
|
||||
* Name: `--quiet`
|
||||
* Shortcut: `-q`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Do not output any message
|
||||
* Default: `false`
|
||||
|
||||
**verbose:**
|
||||
|
||||
* Name: `--verbose`
|
||||
* Shortcut: `-v|-vv|-vvv`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
||||
* Default: `false`
|
||||
|
||||
**version:**
|
||||
|
||||
* Name: `--version`
|
||||
* Shortcut: `-V`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Display this application version
|
||||
* Default: `false`
|
||||
|
||||
**ansi:**
|
||||
|
||||
* Name: `--ansi`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Force ANSI output
|
||||
* Default: `false`
|
||||
|
||||
**no-ansi:**
|
||||
|
||||
* Name: `--no-ansi`
|
||||
* Shortcut: <none>
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Disable ANSI output
|
||||
* Default: `false`
|
||||
|
||||
**no-interaction:**
|
||||
|
||||
* Name: `--no-interaction`
|
||||
* Shortcut: `-n`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: Do not ask any interactive question
|
||||
* Default: `false`
|
@ -0,0 +1,19 @@
|
||||
<info>MbString åpplicätion</info>
|
||||
|
||||
<comment>Usage:</comment>
|
||||
command [options] [arguments]
|
||||
|
||||
<comment>Options:</comment>
|
||||
<info>-h, --help</info> Display this help message
|
||||
<info>-q, --quiet</info> Do not output any message
|
||||
<info>-V, --version</info> Display this application version
|
||||
<info> --ansi</info> Force ANSI output
|
||||
<info> --no-ansi</info> Disable ANSI output
|
||||
<info>-n, --no-interaction</info> Do not ask any interactive question
|
||||
<info>-v|vv|vvv, --verbose</info> Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
||||
|
||||
<comment>Available commands:</comment>
|
||||
<info>help</info> Displays help for a command
|
||||
<info>list</info> Lists commands
|
||||
<comment>descriptor</comment>
|
||||
<info>descriptor:åèä</info> command åèä description
|
@ -0,0 +1,33 @@
|
||||
descriptor:åèä
|
||||
--------------
|
||||
|
||||
* Description: command åèä description
|
||||
* Usage:
|
||||
|
||||
* `descriptor:åèä [-o|--option_åèä] [--] <argument_åèä>`
|
||||
* `descriptor:åèä -o|--option_name <argument_name>`
|
||||
* `descriptor:åèä <argument_name>`
|
||||
|
||||
command åèä help
|
||||
|
||||
### Arguments:
|
||||
|
||||
**argument_åèä:**
|
||||
|
||||
* Name: argument_åèä
|
||||
* Is required: yes
|
||||
* Is array: no
|
||||
* Description: <none>
|
||||
* Default: `NULL`
|
||||
|
||||
### Options:
|
||||
|
||||
**option_åèä:**
|
||||
|
||||
* Name: `--option_åèä`
|
||||
* Shortcut: `-o`
|
||||
* Accept value: no
|
||||
* Is value required: no
|
||||
* Is multiple: no
|
||||
* Description: <none>
|
||||
* Default: `false`
|
@ -0,0 +1,13 @@
|
||||
<comment>Usage:</comment>
|
||||
descriptor:åèä [options] [--] <argument_åèä>
|
||||
descriptor:åèä -o|--option_name <argument_name>
|
||||
descriptor:åèä <argument_name>
|
||||
|
||||
<comment>Arguments:</comment>
|
||||
<info>argument_åèä</info>
|
||||
|
||||
<comment>Options:</comment>
|
||||
<info>-o, --option_åèä</info>
|
||||
|
||||
<comment>Help:</comment>
|
||||
command åèä help
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "argument_name",
|
||||
"is_required": false,
|
||||
"is_array": false,
|
||||
"description": "argument description",
|
||||
"default": "<comment>style</>"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
**argument_name:**
|
||||
|
||||
* Name: argument_name
|
||||
* Is required: no
|
||||
* Is array: no
|
||||
* Description: argument description
|
||||
* Default: `'<comment>style</>'`
|
@ -0,0 +1 @@
|
||||
<info>argument_name</info> argument description<comment> [default: "\<comment>style\</>"]</comment>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<argument name="argument_name" is_required="0" is_array="0">
|
||||
<description>argument description</description>
|
||||
<defaults>
|
||||
<default><comment>style</></default>
|
||||
</defaults>
|
||||
</argument>
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "--option_name",
|
||||
"shortcut": "-o",
|
||||
"accept_value": true,
|
||||
"is_value_required": true,
|
||||
"is_multiple": false,
|
||||
"description": "option description",
|
||||
"default": "<comment>style</>"
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
**option_name:**
|
||||
|
||||
* Name: `--option_name`
|
||||
* Shortcut: `-o`
|
||||
* Accept value: yes
|
||||
* Is value required: yes
|
||||
* Is multiple: no
|
||||
* Description: option description
|
||||
* Default: `'<comment>style</>'`
|
@ -0,0 +1 @@
|
||||
<info>-o, --option_name=OPTION_NAME</info> option description<comment> [default: "\<comment>style\</>"]</comment>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<option name="--option_name" shortcut="-o" accept_value="1" is_value_required="1" is_multiple="0">
|
||||
<description>option description</description>
|
||||
<defaults>
|
||||
<default><comment>style</></default>
|
||||
</defaults>
|
||||
</option>
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "--option_name",
|
||||
"shortcut": "-o",
|
||||
"accept_value": true,
|
||||
"is_value_required": true,
|
||||
"is_multiple": true,
|
||||
"description": "option description",
|
||||
"default": [
|
||||
"<comment>Hello</comment>",
|
||||
"<info>world</info>"
|
||||
]
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
**option_name:**
|
||||
|
||||
* Name: `--option_name`
|
||||
* Shortcut: `-o`
|
||||
* Accept value: yes
|
||||
* Is value required: yes
|
||||
* Is multiple: yes
|
||||
* Description: option description
|
||||
* Default: `array ( 0 => '<comment>Hello</comment>', 1 => '<info>world</info>',)`
|
@ -0,0 +1 @@
|
||||
<info>-o, --option_name=OPTION_NAME</info> option description<comment> [default: ["\<comment>Hello\</comment>","\<info>world\</info>"]]</comment><comment> (multiple values allowed)</comment>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<option name="--option_name" shortcut="-o" accept_value="1" is_value_required="1" is_multiple="1">
|
||||
<description>option description</description>
|
||||
<defaults>
|
||||
<default><comment>Hello</comment></default>
|
||||
<default><info>world</info></default>
|
||||
</defaults>
|
||||
</option>
|
@ -529,7 +529,11 @@ class ErrorHandler
|
||||
}
|
||||
}
|
||||
if ($this->loggedErrors & $type) {
|
||||
try {
|
||||
$this->loggers[$type][0]->log($this->loggers[$type][1], $message, array('exception' => $exception));
|
||||
} catch (\Exception $handlerException) {
|
||||
} catch (\Throwable $handlerException) {
|
||||
}
|
||||
}
|
||||
if ($exception instanceof FatalErrorException && !$exception instanceof OutOfMemoryException && $error) {
|
||||
foreach ($this->getFatalErrorHandlers() as $handler) {
|
||||
|
@ -36,8 +36,13 @@ class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface
|
||||
|
||||
$message = sprintf('Attempted to call an undefined method named "%s" of class "%s".', $methodName, $className);
|
||||
|
||||
if (!class_exists($className) || null === $methods = get_class_methods($className)) {
|
||||
// failed to get the class or its methods on which an unknown method was called (for example on an anonymous class)
|
||||
return new UndefinedMethodException($message, $exception);
|
||||
}
|
||||
|
||||
$candidates = array();
|
||||
foreach (get_class_methods($className) as $definedMethodName) {
|
||||
foreach ($methods as $definedMethodName) {
|
||||
$lev = levenshtein($methodName, $definedMethodName);
|
||||
if ($lev <= strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) {
|
||||
$candidates[] = $definedMethodName;
|
||||
@ -52,6 +57,7 @@ class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface
|
||||
} else {
|
||||
$candidates = '"'.$last;
|
||||
}
|
||||
|
||||
$message .= "\nDid you mean to call ".$candidates;
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,15 @@ class UndefinedMethodFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
),
|
||||
"Attempted to call an undefined method named \"offsetFet\" of class \"SplObjectStorage\".\nDid you mean to call e.g. \"offsetGet\", \"offsetSet\" or \"offsetUnset\"?",
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'type' => 1,
|
||||
'message' => 'Call to undefined method class@anonymous::test()',
|
||||
'file' => '/home/possum/work/symfony/test.php',
|
||||
'line' => 11,
|
||||
),
|
||||
'Attempted to call an undefined method named "test" of class "class@anonymous".',
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ class Definition
|
||||
*
|
||||
* @param bool $shared Whether the service must be shared or not
|
||||
*
|
||||
* @return Definition The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function setShared($shared)
|
||||
{
|
||||
@ -563,7 +563,7 @@ class Definition
|
||||
* @param bool $status
|
||||
* @param string $template Template message to use if the definition is deprecated
|
||||
*
|
||||
* @return Definition the current instance
|
||||
* @return $this
|
||||
*
|
||||
* @throws InvalidArgumentException When the message template is invalid.
|
||||
*/
|
||||
@ -642,7 +642,7 @@ class Definition
|
||||
*
|
||||
* @param string[] $types
|
||||
*
|
||||
* @return Definition The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function setAutowiringTypes(array $types)
|
||||
{
|
||||
@ -670,7 +670,7 @@ class Definition
|
||||
*
|
||||
* @param bool $autowired
|
||||
*
|
||||
* @return Definition The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function setAutowired($autowired)
|
||||
{
|
||||
@ -694,7 +694,7 @@ class Definition
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @return Definition The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function addAutowiringType($type)
|
||||
{
|
||||
@ -708,7 +708,7 @@ class Definition
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @return Definition The current instance
|
||||
* @return $this
|
||||
*/
|
||||
public function removeAutowiringType($type)
|
||||
{
|
||||
|
@ -724,7 +724,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string $value The image alt
|
||||
*
|
||||
* @return Crawler A new instance of Crawler with the filtered list of nodes
|
||||
* @return self A new instance of Crawler with the filtered list of nodes
|
||||
*/
|
||||
public function selectImage($value)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ class ChoiceGroupView implements \IteratorAggregate
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return ChoiceGroupView[]|ChoiceView[]
|
||||
* @return self[]|ChoiceView[]
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ interface ResolvedFormTypeInterface
|
||||
/**
|
||||
* Returns the parent type.
|
||||
*
|
||||
* @return ResolvedFormTypeInterface|null The parent type or null
|
||||
* @return self|null The parent type or null
|
||||
*/
|
||||
public function getParent();
|
||||
|
||||
|
@ -1364,7 +1364,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
|
||||
public function testDateTime()
|
||||
{
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
|
||||
'input' => 'string',
|
||||
'with_seconds' => false,
|
||||
));
|
||||
@ -1383,7 +1383,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
/following-sibling::select
|
||||
[@id="name_date_year"]
|
||||
[@class="form-control"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
/following-sibling::select
|
||||
[@id="name_time_hour"]
|
||||
[@class="form-control"]
|
||||
@ -1438,7 +1438,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
|
||||
public function testDateTimeWithHourAndMinute()
|
||||
{
|
||||
$data = array('year' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
|
||||
$data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
|
||||
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array(
|
||||
'input' => 'array',
|
||||
@ -1460,7 +1460,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
/following-sibling::select
|
||||
[@id="name_date_year"]
|
||||
[@class="form-control"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
/following-sibling::select
|
||||
[@id="name_time_hour"]
|
||||
[@class="form-control"]
|
||||
@ -1477,7 +1477,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
|
||||
public function testDateTimeWithSeconds()
|
||||
{
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
|
||||
'input' => 'string',
|
||||
'with_seconds' => true,
|
||||
));
|
||||
@ -1497,7 +1497,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
/following-sibling::select
|
||||
[@id="name_date_year"]
|
||||
[@class="form-control"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
/following-sibling::select
|
||||
[@id="name_time_hour"]
|
||||
[@class="form-control"]
|
||||
@ -1587,7 +1587,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
|
||||
public function testDateChoice()
|
||||
{
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array(
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array(
|
||||
'input' => 'string',
|
||||
'widget' => 'choice',
|
||||
));
|
||||
@ -1607,7 +1607,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
/following-sibling::select
|
||||
[@id="name_year"]
|
||||
[@class="form-control"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
]
|
||||
[count(./select)=3]
|
||||
'
|
||||
|
@ -1233,7 +1233,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
|
||||
public function testDateTime()
|
||||
{
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
|
||||
'input' => 'string',
|
||||
'with_seconds' => false,
|
||||
));
|
||||
@ -1252,7 +1252,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
[./option[@value="3"][@selected="selected"]]
|
||||
/following-sibling::select
|
||||
[@id="name_date_year"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
]
|
||||
/following-sibling::div
|
||||
[@id="name_time"]
|
||||
@ -1312,7 +1312,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
|
||||
public function testDateTimeWithHourAndMinute()
|
||||
{
|
||||
$data = array('year' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
|
||||
$data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5');
|
||||
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array(
|
||||
'input' => 'array',
|
||||
@ -1333,7 +1333,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
[./option[@value="3"][@selected="selected"]]
|
||||
/following-sibling::select
|
||||
[@id="name_date_year"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
]
|
||||
/following-sibling::div
|
||||
[@id="name_time"]
|
||||
@ -1353,7 +1353,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
|
||||
public function testDateTimeWithSeconds()
|
||||
{
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array(
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array(
|
||||
'input' => 'string',
|
||||
'with_seconds' => true,
|
||||
));
|
||||
@ -1372,7 +1372,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
[./option[@value="3"][@selected="selected"]]
|
||||
/following-sibling::select
|
||||
[@id="name_date_year"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
]
|
||||
/following-sibling::div
|
||||
[@id="name_time"]
|
||||
@ -1459,7 +1459,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
|
||||
public function testDateChoice()
|
||||
{
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array(
|
||||
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array(
|
||||
'input' => 'string',
|
||||
'widget' => 'choice',
|
||||
));
|
||||
@ -1475,7 +1475,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
[./option[@value="3"][@selected="selected"]]
|
||||
/following-sibling::select
|
||||
[@id="name_year"]
|
||||
[./option[@value="2011"][@selected="selected"]]
|
||||
[./option[@value="'.date('Y').'"][@selected="selected"]]
|
||||
]
|
||||
[count(./select)=3]
|
||||
'
|
||||
|
@ -117,7 +117,7 @@ class JsonResponse extends Response
|
||||
*
|
||||
* @param string $json
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @return $this
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
|
@ -148,7 +148,7 @@ class Type
|
||||
*
|
||||
* Only applicable for a collection type.
|
||||
*
|
||||
* @return Type|null
|
||||
* @return self|null
|
||||
*/
|
||||
public function getCollectionKeyType()
|
||||
{
|
||||
@ -160,7 +160,7 @@ class Type
|
||||
*
|
||||
* Only applicable for a collection type.
|
||||
*
|
||||
* @return Type|null
|
||||
* @return self|null
|
||||
*/
|
||||
public function getCollectionValueType()
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ class DumperCollection implements \IteratorAggregate
|
||||
/**
|
||||
* Returns the children routes and collections.
|
||||
*
|
||||
* @return DumperCollection[]|DumperRoute[] Array of DumperCollection|DumperRoute
|
||||
* @return self[]|DumperRoute[]
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
@ -96,7 +96,7 @@ class DumperCollection implements \IteratorAggregate
|
||||
/**
|
||||
* Returns the parent collection.
|
||||
*
|
||||
* @return DumperCollection|null The parent collection or null if the collection has no parent
|
||||
* @return self|null The parent collection or null if the collection has no parent
|
||||
*/
|
||||
protected function getParent()
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ class RouteCollectionBuilder
|
||||
* @param string|null $prefix
|
||||
* @param string $type
|
||||
*
|
||||
* @return RouteCollectionBuilder
|
||||
* @return self
|
||||
*
|
||||
* @throws FileLoaderLoadException
|
||||
*/
|
||||
@ -101,7 +101,7 @@ class RouteCollectionBuilder
|
||||
/**
|
||||
* Returns a RouteCollectionBuilder that can be configured and then added with mount().
|
||||
*
|
||||
* @return RouteCollectionBuilder
|
||||
* @return self
|
||||
*/
|
||||
public function createBuilder()
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ class Section
|
||||
*
|
||||
* @param string $id The child section identifier
|
||||
*
|
||||
* @return Section|null The child section or null when none found
|
||||
* @return self|null The child section or null when none found
|
||||
*/
|
||||
public function get($id)
|
||||
{
|
||||
|
@ -36,11 +36,11 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="9">
|
||||
<source>This field was not expected.</source>
|
||||
<target>To pole nie spodziewano.</target>
|
||||
<target>Tego pola się nie spodziewano.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="10">
|
||||
<source>This field is missing.</source>
|
||||
<target>To pole jest chybianie.</target>
|
||||
<target>Tego pola brakuje.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="11">
|
||||
<source>This value is not a valid date.</source>
|
||||
|
Reference in New Issue
Block a user