Merge branch '2.7' into 2.8
* 2.7: fixes CS
This commit is contained in:
commit
aad7963ede
@ -75,20 +75,23 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Naming pattern for the configuration service id, for example
|
* Naming pattern for the configuration service id, for example
|
||||||
* 'doctrine.orm.%s_configuration'
|
* 'doctrine.orm.%s_configuration'.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $configurationPattern;
|
private $configurationPattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method name to call on the configuration service. This depends on the
|
* Method name to call on the configuration service. This depends on the
|
||||||
* Doctrine implementation. For example addEntityNamespace
|
* Doctrine implementation. For example addEntityNamespace.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $registerAliasMethodName;
|
private $registerAliasMethodName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map of alias to namespace.
|
* Map of alias to namespace.
|
||||||
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
private $aliasMap;
|
private $aliasMap;
|
||||||
|
@ -136,7 +136,6 @@ abstract class DoctrineType extends AbstractType
|
|||||||
|
|
||||||
// Unless the choices are given explicitly, load them on demand
|
// Unless the choices are given explicitly, load them on demand
|
||||||
if (null === $options['choices']) {
|
if (null === $options['choices']) {
|
||||||
|
|
||||||
$hash = null;
|
$hash = null;
|
||||||
$qbParts = null;
|
$qbParts = null;
|
||||||
|
|
||||||
@ -144,7 +143,6 @@ abstract class DoctrineType extends AbstractType
|
|||||||
// also if concrete Type can return important QueryBuilder parts to generate
|
// also if concrete Type can return important QueryBuilder parts to generate
|
||||||
// hash key we go for it as well
|
// hash key we go for it as well
|
||||||
if (!$options['query_builder'] || false !== ($qbParts = $type->getQueryBuilderPartsForCachingHash($options['query_builder']))) {
|
if (!$options['query_builder'] || false !== ($qbParts = $type->getQueryBuilderPartsForCachingHash($options['query_builder']))) {
|
||||||
|
|
||||||
$hash = CachingFactoryDecorator::generateHash(array(
|
$hash = CachingFactoryDecorator::generateHash(array(
|
||||||
$options['em'],
|
$options['em'],
|
||||||
$options['class'],
|
$options['class'],
|
||||||
|
@ -162,10 +162,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$newEmConfigs = $method->invoke($this->extension, $emConfigs, $bundles);
|
$newEmConfigs = $method->invoke($this->extension, $emConfigs, $bundles);
|
||||||
|
|
||||||
$this->assertEquals($newEmConfigs["em1"], array_merge(array(
|
$this->assertEquals($newEmConfigs['em1'], array_merge(array(
|
||||||
'auto_mapping' => false,
|
'auto_mapping' => false,
|
||||||
), $expectedEm1));
|
), $expectedEm1));
|
||||||
$this->assertEquals($newEmConfigs["em2"], array_merge(array(
|
$this->assertEquals($newEmConfigs['em2'], array_merge(array(
|
||||||
'auto_mapping' => false,
|
'auto_mapping' => false,
|
||||||
), $expectedEm2));
|
), $expectedEm2));
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 2.5.4
|
* @since 2.5.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
* @group legacy
|
* @group legacy
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ class SwiftMailerHandler extends BaseSwiftMailerHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* After the CLI application has been terminated we will always flush messages
|
* After the CLI application has been terminated we will always flush messages.
|
||||||
*
|
*
|
||||||
* @param ConsoleTerminateEvent $event
|
* @param ConsoleTerminateEvent $event
|
||||||
*/
|
*/
|
||||||
|
@ -177,7 +177,7 @@ EOF
|
|||||||
if ($info['valid'] && $output->isVerbose()) {
|
if ($info['valid'] && $output->isVerbose()) {
|
||||||
$output->writeln('<info>OK</info>'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
|
$output->writeln('<info>OK</info>'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
|
||||||
} elseif (!$info['valid']) {
|
} elseif (!$info['valid']) {
|
||||||
$errors++;
|
++$errors;
|
||||||
$this->renderException($output, $info['template'], $info['exception'], $info['file']);
|
$this->renderException($output, $info['template'], $info['exception'], $info['file']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ EOF
|
|||||||
if (!$v['valid']) {
|
if (!$v['valid']) {
|
||||||
$v['message'] = $v['exception']->getMessage();
|
$v['message'] = $v['exception']->getMessage();
|
||||||
unset($v['exception']);
|
unset($v['exception']);
|
||||||
$errors++;
|
++$errors;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ EOF
|
|||||||
|
|
||||||
private function renderException(OutputInterface $output, $template, \Twig_Error $exception, $file = null)
|
private function renderException(OutputInterface $output, $template, \Twig_Error $exception, $file = null)
|
||||||
{
|
{
|
||||||
$line = $exception->getTemplateLine();
|
$line = $exception->getTemplateLine();
|
||||||
|
|
||||||
if ($file) {
|
if ($file) {
|
||||||
$output->writeln(sprintf('<error>KO</error> in %s (line %s)', $file, $line));
|
$output->writeln(sprintf('<error>KO</error> in %s (line %s)', $file, $line));
|
||||||
@ -239,7 +239,7 @@ EOF
|
|||||||
$result = array();
|
$result = array();
|
||||||
while ($position < $max) {
|
while ($position < $max) {
|
||||||
$result[$position + 1] = $lines[$position];
|
$result[$position + 1] = $lines[$position];
|
||||||
$position++;
|
++$position;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -116,7 +116,7 @@ class TwigDataCollector extends DataCollector implements LateDataCollectorInterf
|
|||||||
if (!isset($templates[$p->getTemplate()])) {
|
if (!isset($templates[$p->getTemplate()])) {
|
||||||
$templates[$p->getTemplate()] = 1;
|
$templates[$p->getTemplate()] = 1;
|
||||||
} else {
|
} else {
|
||||||
$templates[$p->getTemplate()]++;
|
++$templates[$p->getTemplate()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ class DebugExtensionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$expectedTags = array(
|
$expectedTags = array(
|
||||||
array(
|
array(
|
||||||
"id" => "dump",
|
'id' => 'dump',
|
||||||
"template" => "@Debug/Profiler/dump.html.twig",
|
'template' => '@Debug/Profiler/dump.html.twig',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ EOF
|
|||||||
if ($info['valid'] && $output->isVerbose()) {
|
if ($info['valid'] && $output->isVerbose()) {
|
||||||
$output->writeln('<info>OK</info>'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
|
$output->writeln('<info>OK</info>'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
|
||||||
} elseif (!$info['valid']) {
|
} elseif (!$info['valid']) {
|
||||||
$errors++;
|
++$errors;
|
||||||
$output->writeln(sprintf('<error>KO</error> in %s', $info['file']));
|
$output->writeln(sprintf('<error>KO</error> in %s', $info['file']));
|
||||||
$output->writeln(sprintf('<error>>> %s</error>', $info['message']));
|
$output->writeln(sprintf('<error>>> %s</error>', $info['message']));
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ EOF
|
|||||||
array_walk($filesInfo, function (&$v) use (&$errors) {
|
array_walk($filesInfo, function (&$v) use (&$errors) {
|
||||||
$v['file'] = (string) $v['file'];
|
$v['file'] = (string) $v['file'];
|
||||||
if (!$v['valid']) {
|
if (!$v['valid']) {
|
||||||
$errors++;
|
++$errors;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ class ControllerNameParser
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to find a bundle that is *similar* to the given bundle name
|
* Attempts to find a bundle that is *similar* to the given bundle name.
|
||||||
*
|
*
|
||||||
* @param string $nonExistentBundleName
|
* @param string $nonExistentBundleName
|
||||||
*
|
*
|
||||||
|
@ -74,7 +74,7 @@ class ObjectsProvider
|
|||||||
$builder->setParameter('database_name', 'symfony');
|
$builder->setParameter('database_name', 'symfony');
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'parameter' => $builder,
|
'parameter' => $builder,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,6 +98,7 @@ class ControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $token
|
* @param $token
|
||||||
|
*
|
||||||
* @return ContainerInterface
|
* @return ContainerInterface
|
||||||
*/
|
*/
|
||||||
private function getContainerWithTokenStorage($token = null)
|
private function getContainerWithTokenStorage($token = null)
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
|
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass;
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
||||||
use Symfony\Component\DependencyInjection\Definition;
|
|
||||||
|
|
||||||
class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase
|
class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
@ -46,7 +44,7 @@ class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$definition->expects($this->once())
|
$definition->expects($this->once())
|
||||||
->method('getClass')
|
->method('getClass')
|
||||||
->will($this->returnValue("%translator.class%"));
|
->will($this->returnValue('%translator.class%'));
|
||||||
|
|
||||||
$parameterBag->expects($this->once())
|
$parameterBag->expects($this->once())
|
||||||
->method('resolveValue')
|
->method('resolveValue')
|
||||||
|
@ -24,7 +24,7 @@ use Symfony\Component\Security\Acl\Permission\MaskBuilder;
|
|||||||
use Symfony\Component\Security\Acl\Model\MutableAclProviderInterface;
|
use Symfony\Component\Security\Acl\Model\MutableAclProviderInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets ACL for objects
|
* Sets ACL for objects.
|
||||||
*
|
*
|
||||||
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
|
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
|
||||||
*/
|
*/
|
||||||
@ -162,7 +162,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the mask builder
|
* Gets the mask builder.
|
||||||
*
|
*
|
||||||
* @return MaskBuilder
|
* @return MaskBuilder
|
||||||
*/
|
*/
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity;
|
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Car
|
* Car.
|
||||||
*
|
*
|
||||||
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
|
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +21,7 @@ use Symfony\Component\Security\Acl\Exception\NoAceFoundException;
|
|||||||
use Symfony\Component\Security\Acl\Permission\BasicPermissionMap;
|
use Symfony\Component\Security\Acl\Permission\BasicPermissionMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests SetAclCommand
|
* Tests SetAclCommand.
|
||||||
*
|
*
|
||||||
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
|
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder;
|
|||||||
use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests UserPasswordEncoderCommand
|
* Tests UserPasswordEncoderCommand.
|
||||||
*
|
*
|
||||||
* @author Sarah Khalil <mkhalil.sarah@gmail.com>
|
* @author Sarah Khalil <mkhalil.sarah@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,7 @@ class PreviewErrorControllerTest extends TestCase
|
|||||||
$self = $this;
|
$self = $this;
|
||||||
|
|
||||||
$request = Request::create('whatever');
|
$request = Request::create('whatever');
|
||||||
$response = new Response("");
|
$response = new Response('');
|
||||||
$code = 123;
|
$code = 123;
|
||||||
$logicalControllerName = 'foo:bar:baz';
|
$logicalControllerName = 'foo:bar:baz';
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\WebProfilerBundle\Twig;
|
|||||||
use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
|
use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twig extension for the profiler
|
* Twig extension for the profiler.
|
||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
*/
|
*/
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Asset\Context;
|
namespace Symfony\Component\Asset\Context;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A context that does nothing.
|
* A context that does nothing.
|
||||||
*
|
*
|
||||||
|
@ -67,7 +67,7 @@ class Packages
|
|||||||
* @return PackageInterface An asset package
|
* @return PackageInterface An asset package
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException If there is no package by that name
|
* @throws InvalidArgumentException If there is no package by that name
|
||||||
* @throws LogicException If no default package is defined
|
* @throws LogicException If no default package is defined
|
||||||
*/
|
*/
|
||||||
public function getPackage($name = null)
|
public function getPackage($name = null)
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,7 @@ class ConfigCache implements ConfigCacheInterface
|
|||||||
* Gets the cache file path.
|
* Gets the cache file path.
|
||||||
*
|
*
|
||||||
* @return string The cache file path
|
* @return string The cache file path
|
||||||
|
*
|
||||||
* @deprecated since 2.7, to be removed in 3.0. Use getPath() instead.
|
* @deprecated since 2.7, to be removed in 3.0. Use getPath() instead.
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
|
@ -23,8 +23,8 @@ interface ConfigCacheFactoryInterface
|
|||||||
/**
|
/**
|
||||||
* Creates a cache instance and (re-)initializes it if necessary.
|
* Creates a cache instance and (re-)initializes it if necessary.
|
||||||
*
|
*
|
||||||
* @param string $file The absolute cache file path
|
* @param string $file The absolute cache file path
|
||||||
* @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback
|
* @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback
|
||||||
*
|
*
|
||||||
* @return ConfigCacheInterface $configCache The cache instance
|
* @return ConfigCacheInterface $configCache The cache instance
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Component\Config;
|
|||||||
use Symfony\Component\Config\Resource\ResourceInterface;
|
use Symfony\Component\Config\Resource\ResourceInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for ConfigCache
|
* Interface for ConfigCache.
|
||||||
*
|
*
|
||||||
* @author Matthias Pigulla <mp@webfactory.de>
|
* @author Matthias Pigulla <mp@webfactory.de>
|
||||||
*/
|
*/
|
||||||
|
@ -247,7 +247,7 @@ class XmlReferenceDumper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs a single config reference line
|
* Outputs a single config reference line.
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @param int $indent
|
* @param int $indent
|
||||||
|
@ -125,7 +125,7 @@ class YamlReferenceDumper
|
|||||||
if ($info = $node->getInfo()) {
|
if ($info = $node->getInfo()) {
|
||||||
$this->writeLine('');
|
$this->writeLine('');
|
||||||
// indenting multi-line info
|
// indenting multi-line info
|
||||||
$info = str_replace("\n", sprintf("\n%".($depth * 4)."s# ", ' '), $info);
|
$info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info);
|
||||||
$this->writeLine('# '.$info, $depth * 4);
|
$this->writeLine('# '.$info, $depth * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ class YamlReferenceDumper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs a single config reference line
|
* Outputs a single config reference line.
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @param int $indent
|
* @param int $indent
|
||||||
|
@ -19,19 +19,19 @@ namespace Symfony\Component\Console\Event;
|
|||||||
class ConsoleCommandEvent extends ConsoleEvent
|
class ConsoleCommandEvent extends ConsoleEvent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The return code for skipped commands, this will also be passed into the terminate event
|
* The return code for skipped commands, this will also be passed into the terminate event.
|
||||||
*/
|
*/
|
||||||
const RETURN_CODE_DISABLED = 113;
|
const RETURN_CODE_DISABLED = 113;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the command should be run or skipped
|
* Indicates if the command should be run or skipped.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
private $commandShouldRun = true;
|
private $commandShouldRun = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables the command, so it won't be run
|
* Disables the command, so it won't be run.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -41,7 +41,7 @@ class ConsoleCommandEvent extends ConsoleEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables the command
|
* Enables the command.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -51,7 +51,7 @@ class ConsoleCommandEvent extends ConsoleEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the command is runnable, false otherwise
|
* Returns true if the command is runnable, false otherwise.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@ class DebugFormatterHelper extends Helper
|
|||||||
private $count = -1;
|
private $count = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a debug formatting session
|
* Starts a debug formatting session.
|
||||||
*
|
*
|
||||||
* @param string $id The id of the formatting session
|
* @param string $id The id of the formatting session
|
||||||
* @param string $message The message to display
|
* @param string $message The message to display
|
||||||
@ -41,7 +41,7 @@ class DebugFormatterHelper extends Helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds progress to a formatting session
|
* Adds progress to a formatting session.
|
||||||
*
|
*
|
||||||
* @param string $id The id of the formatting session
|
* @param string $id The id of the formatting session
|
||||||
* @param string $buffer The message to display
|
* @param string $buffer The message to display
|
||||||
@ -61,7 +61,7 @@ class DebugFormatterHelper extends Helper
|
|||||||
unset($this->started[$id]['out']);
|
unset($this->started[$id]['out']);
|
||||||
}
|
}
|
||||||
if (!isset($this->started[$id]['err'])) {
|
if (!isset($this->started[$id]['err'])) {
|
||||||
$message .= sprintf("%s<bg=red;fg=white> %s </> ", $this->getBorder($id), $errorPrefix);
|
$message .= sprintf('%s<bg=red;fg=white> %s </> ', $this->getBorder($id), $errorPrefix);
|
||||||
$this->started[$id]['err'] = true;
|
$this->started[$id]['err'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class DebugFormatterHelper extends Helper
|
|||||||
unset($this->started[$id]['err']);
|
unset($this->started[$id]['err']);
|
||||||
}
|
}
|
||||||
if (!isset($this->started[$id]['out'])) {
|
if (!isset($this->started[$id]['out'])) {
|
||||||
$message .= sprintf("%s<bg=green;fg=white> %s </> ", $this->getBorder($id), $prefix);
|
$message .= sprintf('%s<bg=green;fg=white> %s </> ', $this->getBorder($id), $prefix);
|
||||||
$this->started[$id]['out'] = true;
|
$this->started[$id]['out'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class DebugFormatterHelper extends Helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops a formatting session
|
* Stops a formatting session.
|
||||||
*
|
*
|
||||||
* @param string $id The id of the formatting session
|
* @param string $id The id of the formatting session
|
||||||
* @param string $message The message to display
|
* @param string $message The message to display
|
||||||
|
@ -247,7 +247,7 @@ class Table
|
|||||||
}
|
}
|
||||||
|
|
||||||
$markup = $this->style->getCrossingChar();
|
$markup = $this->style->getCrossingChar();
|
||||||
for ($column = 0; $column < $count; $column++) {
|
for ($column = 0; $column < $count; ++$column) {
|
||||||
$markup .= str_repeat($this->style->getHorizontalBorderChar(), $this->columnWidths[$column]).$this->style->getCrossingChar();
|
$markup .= str_repeat($this->style->getHorizontalBorderChar(), $this->columnWidths[$column]).$this->style->getCrossingChar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ class Table
|
|||||||
private function buildTableRows($rows)
|
private function buildTableRows($rows)
|
||||||
{
|
{
|
||||||
$unmergedRows = array();
|
$unmergedRows = array();
|
||||||
for ($rowKey = 0; $rowKey < count($rows); $rowKey++) {
|
for ($rowKey = 0; $rowKey < count($rows); ++$rowKey) {
|
||||||
$rows = $this->fillNextRows($rows, $rowKey);
|
$rows = $this->fillNextRows($rows, $rowKey);
|
||||||
|
|
||||||
// Remove any new line breaks and replace it with a new line
|
// Remove any new line breaks and replace it with a new line
|
||||||
|
@ -18,9 +18,10 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PSR-3 compliant console logger
|
* PSR-3 compliant console logger.
|
||||||
*
|
*
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @author Kévin Dunglas <dunglas@gmail.com>
|
||||||
|
*
|
||||||
* @link http://www.php-fig.org/psr/psr-3/
|
* @link http://www.php-fig.org/psr/psr-3/
|
||||||
*/
|
*/
|
||||||
class ConsoleLogger extends AbstractLogger
|
class ConsoleLogger extends AbstractLogger
|
||||||
@ -93,7 +94,7 @@ class ConsoleLogger extends AbstractLogger
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interpolates context values into the message placeholders
|
* Interpolates context values into the message placeholders.
|
||||||
*
|
*
|
||||||
* @author PHP Framework Interoperability Group
|
* @author PHP Framework Interoperability Group
|
||||||
*
|
*
|
||||||
|
@ -23,8 +23,8 @@ class ConfirmationQuestion extends Question
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param string $question The question to ask to the user
|
* @param string $question The question to ask to the user
|
||||||
* @param bool $default The default answer to return, true or false
|
* @param bool $default The default answer to return, true or false
|
||||||
* @param string $trueAnswerRegex A regex to match the "yes" answer
|
* @param string $trueAnswerRegex A regex to match the "yes" answer
|
||||||
*/
|
*/
|
||||||
public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i')
|
public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i')
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Console\Helper\ProgressBar;
|
|||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates output to add console style guide helpers
|
* Decorates output to add console style guide helpers.
|
||||||
*
|
*
|
||||||
* @author Kevin Bond <kevinbond@gmail.com>
|
* @author Kevin Bond <kevinbond@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,7 @@ namespace Symfony\Component\Console\Tests\Fixtures;
|
|||||||
use Symfony\Component\Console\Output\BufferedOutput;
|
use Symfony\Component\Console\Output\BufferedOutput;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dummy output
|
* Dummy output.
|
||||||
*
|
*
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @author Kévin Dunglas <dunglas@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -315,7 +315,7 @@ class ProgressBarTest extends \PHPUnit_Framework_TestCase
|
|||||||
$bar = new ProgressBar($output = $this->getOutputStream(false), 200);
|
$bar = new ProgressBar($output = $this->getOutputStream(false), 200);
|
||||||
$bar->start();
|
$bar->start();
|
||||||
|
|
||||||
for ($i = 0; $i < 200; $i++) {
|
for ($i = 0; $i < 200; ++$i) {
|
||||||
$bar->advance();
|
$bar->advance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ class ProgressBarTest extends \PHPUnit_Framework_TestCase
|
|||||||
$output->write("\n");
|
$output->write("\n");
|
||||||
$bar3->start();
|
$bar3->start();
|
||||||
|
|
||||||
for ($i = 1; $i <= 3; $i++) {
|
for ($i = 1; $i <= 3; ++$i) {
|
||||||
// up two lines
|
// up two lines
|
||||||
$output->write("\033[2A");
|
$output->write("\033[2A");
|
||||||
if ($i <= 2) {
|
if ($i <= 2) {
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Console\Tests\Fixtures\DummyOutput;
|
|||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Console logger test
|
* Console logger test.
|
||||||
*
|
*
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @author Kévin Dunglas <dunglas@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -78,7 +78,7 @@ class Specificity
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns -1 if the object specificity is lower than the argument,
|
* Returns -1 if the object specificity is lower than the argument,
|
||||||
* 0 if they are equal, and 1 if the argument is lower
|
* 0 if they are equal, and 1 if the argument is lower.
|
||||||
*
|
*
|
||||||
* @param Specificity $specificity
|
* @param Specificity $specificity
|
||||||
*
|
*
|
||||||
|
@ -22,8 +22,8 @@ class LegacyDefinitionTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$def = new Definition('stdClass');
|
$def = new Definition('stdClass');
|
||||||
$this->assertNull($def->getFactoryClass());
|
$this->assertNull($def->getFactoryClass());
|
||||||
$this->assertSame($def, $def->setFactoryClass('stdClass2'), "->setFactoryClass() implements a fluent interface.");
|
$this->assertSame($def, $def->setFactoryClass('stdClass2'), '->setFactoryClass() implements a fluent interface.');
|
||||||
$this->assertEquals('stdClass2', $def->getFactoryClass(), "->getFactoryClass() returns current class to construct this service.");
|
$this->assertEquals('stdClass2', $def->getFactoryClass(), '->getFactoryClass() returns current class to construct this service.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetGetFactoryMethod()
|
public function testSetGetFactoryMethod()
|
||||||
@ -38,7 +38,7 @@ class LegacyDefinitionTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$def = new Definition('stdClass');
|
$def = new Definition('stdClass');
|
||||||
$this->assertNull($def->getFactoryService());
|
$this->assertNull($def->getFactoryService());
|
||||||
$this->assertSame($def, $def->setFactoryService('foo.bar'), "->setFactoryService() implements a fluent interface.");
|
$this->assertSame($def, $def->setFactoryService('foo.bar'), '->setFactoryService() implements a fluent interface.');
|
||||||
$this->assertEquals('foo.bar', $def->getFactoryService(), "->getFactoryService() returns current service to construct this service.");
|
$this->assertEquals('foo.bar', $def->getFactoryService(), '->getFactoryService() returns current service to construct this service.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,7 +355,7 @@ class Form extends Link implements \ArrayAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables validation
|
* Disables validation.
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
|
@ -135,7 +135,7 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$invoked = 0;
|
$invoked = 0;
|
||||||
$listener = function () use (&$invoked) {
|
$listener = function () use (&$invoked) {
|
||||||
$invoked++;
|
++$invoked;
|
||||||
};
|
};
|
||||||
$this->dispatcher->addListener('pre.foo', $listener);
|
$this->dispatcher->addListener('pre.foo', $listener);
|
||||||
$this->dispatcher->addListener('post.foo', $listener);
|
$this->dispatcher->addListener('post.foo', $listener);
|
||||||
|
@ -110,8 +110,8 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
|||||||
$tdispatcher->addListener('foo', $listener1 = function () {; });
|
$tdispatcher->addListener('foo', $listener1 = function () {; });
|
||||||
$tdispatcher->addListener('foo', $listener2 = function () {; });
|
$tdispatcher->addListener('foo', $listener2 = function () {; });
|
||||||
|
|
||||||
$logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
|
$logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".');
|
||||||
$logger->expects($this->at(1))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
|
$logger->expects($this->at(1))->method('debug')->with('Notified event "foo" to listener "closure".');
|
||||||
|
|
||||||
$tdispatcher->dispatch('foo');
|
$tdispatcher->dispatch('foo');
|
||||||
}
|
}
|
||||||
@ -125,9 +125,9 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
|||||||
$tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); });
|
$tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); });
|
||||||
$tdispatcher->addListener('foo', $listener2 = function () {; });
|
$tdispatcher->addListener('foo', $listener2 = function () {; });
|
||||||
|
|
||||||
$logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
|
$logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".');
|
||||||
$logger->expects($this->at(1))->method('debug')->with("Listener \"closure\" stopped propagation of the event \"foo\".");
|
$logger->expects($this->at(1))->method('debug')->with('Listener "closure" stopped propagation of the event "foo".');
|
||||||
$logger->expects($this->at(2))->method('debug')->with("Listener \"closure\" was not called for event \"foo\".");
|
$logger->expects($this->at(2))->method('debug')->with('Listener "closure" was not called for event "foo".');
|
||||||
|
|
||||||
$tdispatcher->dispatch('foo');
|
$tdispatcher->dispatch('foo');
|
||||||
}
|
}
|
||||||
|
@ -43,32 +43,32 @@ class Parser
|
|||||||
'+' => array('precedence' => 500),
|
'+' => array('precedence' => 500),
|
||||||
);
|
);
|
||||||
$this->binaryOperators = array(
|
$this->binaryOperators = array(
|
||||||
'or' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT),
|
'or' => array('precedence' => 10, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'||' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT),
|
'||' => array('precedence' => 10, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'and' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT),
|
'and' => array('precedence' => 15, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'&&' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT),
|
'&&' => array('precedence' => 15, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'|' => array('precedence' => 16, 'associativity' => Parser::OPERATOR_LEFT),
|
'|' => array('precedence' => 16, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'^' => array('precedence' => 17, 'associativity' => Parser::OPERATOR_LEFT),
|
'^' => array('precedence' => 17, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'&' => array('precedence' => 18, 'associativity' => Parser::OPERATOR_LEFT),
|
'&' => array('precedence' => 18, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'==' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'===' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'===' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'!=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'!=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'!==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'!==' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'<' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'<' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'>' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'>' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'>=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'>=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'<=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'<=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'not in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'not in' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'in' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'matches' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
|
'matches' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'..' => array('precedence' => 25, 'associativity' => Parser::OPERATOR_LEFT),
|
'..' => array('precedence' => 25, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'+' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT),
|
'+' => array('precedence' => 30, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'-' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT),
|
'-' => array('precedence' => 30, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'~' => array('precedence' => 40, 'associativity' => Parser::OPERATOR_LEFT),
|
'~' => array('precedence' => 40, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'*' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
|
'*' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'/' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
|
'/' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'%' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
|
'%' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT),
|
||||||
'**' => array('precedence' => 200, 'associativity' => Parser::OPERATOR_RIGHT),
|
'**' => array('precedence' => 200, 'associativity' => self::OPERATOR_RIGHT),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class TokenStream
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if end of stream was reached
|
* Checks if end of stream was reached.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
namespace Symfony\Component\Filesystem\Exception;
|
namespace Symfony\Component\Filesystem\Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception class thrown when a file couldn't be found
|
* Exception class thrown when a file couldn't be found.
|
||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
* @author Christian Gärtner <christiangaertner.film@googlemail.com>
|
* @author Christian Gärtner <christiangaertner.film@googlemail.com>
|
||||||
|
@ -19,7 +19,7 @@ namespace Symfony\Component\Filesystem\Exception;
|
|||||||
interface IOExceptionInterface extends ExceptionInterface
|
interface IOExceptionInterface extends ExceptionInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns the associated path for the exception
|
* Returns the associated path for the exception.
|
||||||
*
|
*
|
||||||
* @return string The path.
|
* @return string The path.
|
||||||
*/
|
*/
|
||||||
|
@ -32,8 +32,9 @@ class LockHandler
|
|||||||
private $handle;
|
private $handle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name The lock name
|
* @param string $name The lock name
|
||||||
* @param string|null $lockPath The directory to store the lock. Default values will use temporary directory
|
* @param string|null $lockPath The directory to store the lock. Default values will use temporary directory
|
||||||
|
*
|
||||||
* @throws IOException If the lock directory could not be created or is not writable
|
* @throws IOException If the lock directory could not be created or is not writable
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $lockPath = null)
|
public function __construct($name, $lockPath = null)
|
||||||
@ -53,10 +54,12 @@ class LockHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lock the resource
|
* Lock the resource.
|
||||||
|
*
|
||||||
|
* @param bool $blocking wait until the lock is released
|
||||||
|
*
|
||||||
|
* @return bool Returns true if the lock was acquired, false otherwise
|
||||||
*
|
*
|
||||||
* @param bool $blocking wait until the lock is released
|
|
||||||
* @return bool Returns true if the lock was acquired, false otherwise
|
|
||||||
* @throws IOException If the lock file could not be created or opened
|
* @throws IOException If the lock file could not be created or opened
|
||||||
*/
|
*/
|
||||||
public function lock($blocking = false)
|
public function lock($blocking = false)
|
||||||
@ -98,7 +101,7 @@ class LockHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Release the resource
|
* Release the resource.
|
||||||
*/
|
*/
|
||||||
public function release()
|
public function release()
|
||||||
{
|
{
|
||||||
|
@ -336,8 +336,6 @@ class Button implements \IteratorAggregate, FormInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unsupported method.
|
* Unsupported method.
|
||||||
*
|
|
||||||
* @return null Always returns null
|
|
||||||
*/
|
*/
|
||||||
public function getTransformationFailure()
|
public function getTransformationFailure()
|
||||||
{
|
{
|
||||||
|
@ -48,9 +48,9 @@ interface ChoiceLoaderInterface
|
|||||||
* The callable receives the choice as first and the array key as the second
|
* The callable receives the choice as first and the array key as the second
|
||||||
* argument.
|
* argument.
|
||||||
*
|
*
|
||||||
* @param string[] $values An array of choice values. Non-existing
|
* @param string[] $values An array of choice values. Non-existing
|
||||||
* values in this array are ignored
|
* values in this array are ignored
|
||||||
* @param null|callable $value The callable generating the choice values
|
* @param null|callable $value The callable generating the choice values
|
||||||
*
|
*
|
||||||
* @return array An array of choices
|
* @return array An array of choices
|
||||||
*/
|
*/
|
||||||
@ -66,9 +66,9 @@ interface ChoiceLoaderInterface
|
|||||||
* The callable receives the choice as first and the array key as the second
|
* The callable receives the choice as first and the array key as the second
|
||||||
* argument.
|
* argument.
|
||||||
*
|
*
|
||||||
* @param array $choices An array of choices. Non-existing choices in
|
* @param array $choices An array of choices. Non-existing choices in
|
||||||
* this array are ignored
|
* this array are ignored
|
||||||
* @param null|callable $value The callable generating the choice values
|
* @param null|callable $value The callable generating the choice values
|
||||||
*
|
*
|
||||||
* @return string[] An array of choice values
|
* @return string[] An array of choice values
|
||||||
*/
|
*/
|
||||||
|
@ -19,14 +19,14 @@ namespace Symfony\Component\Form\ChoiceList\View;
|
|||||||
class ChoiceGroupView implements \IteratorAggregate
|
class ChoiceGroupView implements \IteratorAggregate
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The label of the group
|
* The label of the group.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The choice views in the group
|
* The choice views in the group.
|
||||||
*
|
*
|
||||||
* @var ChoiceGroupView[]|ChoiceView[]
|
* @var ChoiceGroupView[]|ChoiceView[]
|
||||||
*/
|
*/
|
||||||
@ -35,7 +35,7 @@ class ChoiceGroupView implements \IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Creates a new choice group view.
|
* Creates a new choice group view.
|
||||||
*
|
*
|
||||||
* @param string $label The label of the group.
|
* @param string $label The label of the group.
|
||||||
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views in the
|
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views in the
|
||||||
* group.
|
* group.
|
||||||
*/
|
*/
|
||||||
|
@ -15,6 +15,7 @@ namespace Symfony\Component\Form\Deprecated;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated since version 2.7, to be removed in 3.0.
|
* @deprecated since version 2.7, to be removed in 3.0.
|
||||||
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
final class FormEvents
|
final class FormEvents
|
||||||
|
@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\DataMapper;
|
|||||||
|
|
||||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||||
use Symfony\Component\Form\DataMapperInterface;
|
use Symfony\Component\Form\DataMapperInterface;
|
||||||
use Symfony\Component\Form\Exception;
|
|
||||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Extension\Core\View;
|
|||||||
|
|
||||||
@trigger_error('The '.__NAMESPACE__.'\ChoiceView class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED);
|
@trigger_error('The '.__NAMESPACE__.'\ChoiceView class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Represents a choice in templates.
|
* Represents a choice in templates.
|
||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
|
@ -22,6 +22,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
|
|||||||
* is expected.
|
* is expected.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @deprecated since version 2.4, to be removed in 3.0.
|
* @deprecated since version 2.4, to be removed in 3.0.
|
||||||
|
@ -18,6 +18,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
|
|||||||
* Adapter for using the new token generator with the old interface.
|
* Adapter for using the new token generator with the old interface.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @deprecated since version 2.4, to be removed in 3.0.
|
* @deprecated since version 2.4, to be removed in 3.0.
|
||||||
|
@ -18,6 +18,7 @@ use Symfony\Component\Form\AbstractExtension;
|
|||||||
* Extension for collecting data of the forms on a page.
|
* Extension for collecting data of the forms on a page.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Robert Schönthal <robert.schoenthal@gmail.com>
|
* @author Robert Schönthal <robert.schoenthal@gmail.com>
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -21,6 +21,7 @@ use Symfony\Component\Form\FormEvents;
|
|||||||
* and {@link FormEvents::POST_SUBMIT} events.
|
* and {@link FormEvents::POST_SUBMIT} events.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
class DataCollectorListener implements EventSubscriberInterface
|
class DataCollectorListener implements EventSubscriberInterface
|
||||||
|
@ -21,6 +21,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
|||||||
* Data collector for {@link FormInterface} instances.
|
* Data collector for {@link FormInterface} instances.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Robert Schönthal <robert.schoenthal@gmail.com>
|
* @author Robert Schönthal <robert.schoenthal@gmail.com>
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -19,6 +19,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
|
|||||||
* Collects and structures information about forms.
|
* Collects and structures information about forms.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
interface FormDataCollectorInterface extends DataCollectorInterface
|
interface FormDataCollectorInterface extends DataCollectorInterface
|
||||||
|
@ -20,6 +20,7 @@ use Symfony\Component\Validator\ConstraintViolationInterface;
|
|||||||
* Default implementation of {@link FormDataExtractorInterface}.
|
* Default implementation of {@link FormDataExtractorInterface}.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
class FormDataExtractor implements FormDataExtractorInterface
|
class FormDataExtractor implements FormDataExtractorInterface
|
||||||
|
@ -18,6 +18,7 @@ use Symfony\Component\Form\FormView;
|
|||||||
* Extracts arrays of information out of forms.
|
* Extracts arrays of information out of forms.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
interface FormDataExtractorInterface
|
interface FormDataExtractorInterface
|
||||||
|
@ -22,6 +22,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface;
|
|||||||
* Proxy that invokes a data collector when creating a form and its view.
|
* Proxy that invokes a data collector when creating a form and its view.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface
|
class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface
|
||||||
|
@ -21,6 +21,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface;
|
|||||||
* instances.
|
* instances.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface
|
class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface
|
||||||
|
@ -20,6 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
* Type extension for collecting data of a form with this type.
|
* Type extension for collecting data of a form with this type.
|
||||||
*
|
*
|
||||||
* @since 2.4
|
* @since 2.4
|
||||||
|
*
|
||||||
* @author Robert Schönthal <robert.schoenthal@gmail.com>
|
* @author Robert Schönthal <robert.schoenthal@gmail.com>
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -50,7 +50,7 @@ class ValidatorExtension extends AbstractExtension
|
|||||||
// the DIC, where the XML file is loaded automatically. Thus the following
|
// the DIC, where the XML file is loaded automatically. Thus the following
|
||||||
// code must be kept synchronized with validation.xml
|
// code must be kept synchronized with validation.xml
|
||||||
|
|
||||||
/** @var $metadata ClassMetadata */
|
/* @var $metadata ClassMetadata */
|
||||||
$metadata->addConstraint(new Form());
|
$metadata->addConstraint(new Form());
|
||||||
$metadata->addPropertyConstraint('children', new Valid());
|
$metadata->addPropertyConstraint('children', new Valid());
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
|
|||||||
if ($error instanceof FormError) {
|
if ($error instanceof FormError) {
|
||||||
$string .= 'ERROR: '.$error->getMessage()."\n";
|
$string .= 'ERROR: '.$error->getMessage()."\n";
|
||||||
} else {
|
} else {
|
||||||
/** @var $error FormErrorIterator */
|
/* @var $error FormErrorIterator */
|
||||||
$string .= $error->form->getName().":\n";
|
$string .= $error->form->getName().":\n";
|
||||||
$string .= self::indent((string) $error);
|
$string .= self::indent((string) $error);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the Symfony package.
|
* This file is part of the Symfony package.
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the Symfony package.
|
* This file is part of the Symfony package.
|
||||||
*
|
*
|
||||||
|
@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 2.5.3
|
* @since 2.5.3
|
||||||
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
* @group legacy
|
* @group legacy
|
||||||
*/
|
*/
|
||||||
|
@ -20,8 +20,8 @@ use Symfony\Component\Form\Test\FormIntegrationTestCase as BaseFormIntegrationTe
|
|||||||
abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase
|
abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormIntegrationTestCase class instead.', E_USER_DEPRECATED);
|
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormIntegrationTestCase class instead.', E_USER_DEPRECATED);
|
||||||
|
@ -20,8 +20,8 @@ use Symfony\Component\Form\Test\FormPerformanceTestCase as BaseFormPerformanceTe
|
|||||||
abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase
|
abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormPerformanceTestCase class instead.', E_USER_DEPRECATED);
|
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormPerformanceTestCase class instead.', E_USER_DEPRECATED);
|
||||||
|
@ -308,6 +308,7 @@ class BinaryFileResponse extends Response
|
|||||||
/**
|
/**
|
||||||
* If this is set to true, the file will be unlinked after the request is send
|
* If this is set to true, the file will be unlinked after the request is send
|
||||||
* Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used.
|
* Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used.
|
||||||
|
*
|
||||||
* @param bool $shouldDelete
|
* @param bool $shouldDelete
|
||||||
*
|
*
|
||||||
* @return BinaryFileResponse
|
* @return BinaryFileResponse
|
||||||
|
@ -2001,7 +2001,7 @@ class Request
|
|||||||
if (self::$requestFactory) {
|
if (self::$requestFactory) {
|
||||||
$request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content);
|
$request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content);
|
||||||
|
|
||||||
if (!$request instanceof Request) {
|
if (!$request instanceof self) {
|
||||||
throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.');
|
throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ class LegacyPdoSessionHandler implements \SessionHandlerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a PDO instance
|
* Return a PDO instance.
|
||||||
*
|
*
|
||||||
* @return \PDO
|
* @return \PDO
|
||||||
*/
|
*/
|
||||||
|
@ -108,7 +108,7 @@ class MemcacheSessionHandler implements \SessionHandlerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a Memcache instance
|
* Return a Memcache instance.
|
||||||
*
|
*
|
||||||
* @return \Memcache
|
* @return \Memcache
|
||||||
*/
|
*/
|
||||||
|
@ -114,7 +114,7 @@ class MemcachedSessionHandler implements \SessionHandlerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a Memcached instance
|
* Return a Memcached instance.
|
||||||
*
|
*
|
||||||
* @return \Memcached
|
* @return \Memcached
|
||||||
*/
|
*/
|
||||||
|
@ -177,7 +177,7 @@ class MongoDbSessionHandler implements \SessionHandlerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a Mongo instance
|
* Return a Mongo instance.
|
||||||
*
|
*
|
||||||
* @return \Mongo
|
* @return \Mongo
|
||||||
*/
|
*/
|
||||||
|
@ -51,7 +51,7 @@ class StreamedResponse extends Response
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory method for chainability
|
* Factory method for chainability.
|
||||||
*
|
*
|
||||||
* @param callable|null $callback A valid PHP callback or null to set it later
|
* @param callable|null $callback A valid PHP callback or null to set it later
|
||||||
* @param int $status The response status code
|
* @param int $status The response status code
|
||||||
|
@ -205,7 +205,7 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simulates session_regenerate_id(true) which will require an INSERT or UPDATE (replace)
|
* Simulates session_regenerate_id(true) which will require an INSERT or UPDATE (replace).
|
||||||
*/
|
*/
|
||||||
public function testWriteDifferentSessionIdThanRead()
|
public function testWriteDifferentSessionIdThanRead()
|
||||||
{
|
{
|
||||||
|
@ -157,7 +157,7 @@ class ControllerResolver implements ControllerResolverInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an instantiated controller
|
* Returns an instantiated controller.
|
||||||
*
|
*
|
||||||
* @param string $class A class name
|
* @param string $class A class name
|
||||||
*
|
*
|
||||||
|
@ -54,7 +54,7 @@ class ValueExporter
|
|||||||
return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1));
|
return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sprintf("[%s]", implode(', ', $a));
|
return sprintf('[%s]', implode(', ', $a));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_resource($value)) {
|
if (is_resource($value)) {
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
|||||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds configured formats to each request
|
* Adds configured formats to each request.
|
||||||
*
|
*
|
||||||
* @author Gildas Quemener <gildas.quemener@gmail.com>
|
* @author Gildas Quemener <gildas.quemener@gmail.com>
|
||||||
*/
|
*/
|
||||||
@ -36,7 +36,7 @@ class AddRequestFormatsListener implements EventSubscriberInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds request formats
|
* Adds request formats.
|
||||||
*
|
*
|
||||||
* @param GetResponseEvent $event
|
* @param GetResponseEvent $event
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
|||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates
|
* SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates.
|
||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +48,7 @@ abstract class TestSessionListener implements EventSubscriberInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if session was initialized and saves if current request is master
|
* Checks if session was initialized and saves if current request is master
|
||||||
* Runs on 'kernel.response' in test environment
|
* Runs on 'kernel.response' in test environment.
|
||||||
*
|
*
|
||||||
* @param FilterResponseEvent $event
|
* @param FilterResponseEvent $event
|
||||||
*/
|
*/
|
||||||
|
@ -156,6 +156,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||||||
* Gets the Surrogate instance.
|
* Gets the Surrogate instance.
|
||||||
*
|
*
|
||||||
* @throws \LogicException
|
* @throws \LogicException
|
||||||
|
*
|
||||||
* @return SurrogateInterface A Surrogate instance
|
* @return SurrogateInterface A Surrogate instance
|
||||||
*/
|
*/
|
||||||
public function getSurrogate()
|
public function getSurrogate()
|
||||||
|
@ -45,7 +45,7 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface
|
|||||||
$this->maxAges[] = $response->getMaxAge();
|
$this->maxAges[] = $response->getMaxAge();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->embeddedResponses++;
|
++$this->embeddedResponses;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
interface SurrogateInterface
|
interface SurrogateInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns surrogate name
|
* Returns surrogate name.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test AddRequestFormatsListener class
|
* Test AddRequestFormatsListener class.
|
||||||
*
|
*
|
||||||
* @author Gildas Quemener <gildas.quemener@gmail.com>
|
* @author Gildas Quemener <gildas.quemener@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@ use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener;
|
|||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DebugHandlersListenerTest
|
* DebugHandlersListenerTest.
|
||||||
*
|
*
|
||||||
* @author Nicolas Grekas <p@tchwork.com>
|
* @author Nicolas Grekas <p@tchwork.com>
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@ use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
|
|||||||
use Symfony\Component\VarDumper\VarDumper;
|
use Symfony\Component\VarDumper\VarDumper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DumpListenerTest
|
* DumpListenerTest.
|
||||||
*
|
*
|
||||||
* @author Nicolas Grekas <p@tchwork.com>
|
* @author Nicolas Grekas <p@tchwork.com>
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +23,7 @@ use Symfony\Component\HttpKernel\Kernel;
|
|||||||
class ProfilerListenerTest extends \PHPUnit_Framework_TestCase
|
class ProfilerListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Test to ensure BC without RequestStack
|
* Test to ensure BC without RequestStack.
|
||||||
*
|
*
|
||||||
* @group legacy
|
* @group legacy
|
||||||
*/
|
*/
|
||||||
@ -79,7 +79,7 @@ class ProfilerListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$subRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')
|
$subRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ EOF;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a mock for the BundleInterface
|
* Returns a mock for the BundleInterface.
|
||||||
*
|
*
|
||||||
* @return BundleInterface
|
* @return BundleInterface
|
||||||
*/
|
*/
|
||||||
|
@ -43,7 +43,7 @@ class UriSignerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$signer = new UriSigner('foobar');
|
$signer = new UriSigner('foobar');
|
||||||
|
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
"http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D",
|
'http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D',
|
||||||
$signer->sign('http://example.com/foo?foo=bar&baz=bay')
|
$signer->sign('http://example.com/foo?foo=bar&baz=bay')
|
||||||
);
|
);
|
||||||
$this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay')));
|
$this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay')));
|
||||||
|
@ -434,7 +434,6 @@ class OptionsResolver implements Options, OptionsResolverInterface
|
|||||||
* @throws AccessException If called from a lazy option or normalizer
|
* @throws AccessException If called from a lazy option or normalizer
|
||||||
*
|
*
|
||||||
* @see setNormalizer()
|
* @see setNormalizer()
|
||||||
*
|
|
||||||
* @deprecated since version 2.6, to be removed in 3.0.
|
* @deprecated since version 2.6, to be removed in 3.0.
|
||||||
*/
|
*/
|
||||||
public function setNormalizers(array $normalizers)
|
public function setNormalizers(array $normalizers)
|
||||||
|
@ -54,7 +54,7 @@ abstract class AbstractPipes implements PipesInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unblocks streams
|
* Unblocks streams.
|
||||||
*/
|
*/
|
||||||
protected function unblock()
|
protected function unblock()
|
||||||
{
|
{
|
||||||
|
@ -200,7 +200,7 @@ class UnixPipes extends AbstractPipes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new UnixPipes instance
|
* Creates a new UnixPipes instance.
|
||||||
*
|
*
|
||||||
* @param Process $process
|
* @param Process $process
|
||||||
* @param string|resource $input
|
* @param string|resource $input
|
||||||
|
@ -173,7 +173,7 @@ class WindowsPipes extends AbstractPipes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes temporary files
|
* Removes temporary files.
|
||||||
*/
|
*/
|
||||||
private function removeFiles()
|
private function removeFiles()
|
||||||
{
|
{
|
||||||
@ -186,7 +186,7 @@ class WindowsPipes extends AbstractPipes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes input to stdin
|
* Writes input to stdin.
|
||||||
*
|
*
|
||||||
* @param bool $blocking
|
* @param bool $blocking
|
||||||
* @param bool $close
|
* @param bool $close
|
||||||
|
@ -524,7 +524,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
|||||||
$process = $this->getProcess('echo foo');
|
$process = $this->getProcess('echo foo');
|
||||||
|
|
||||||
$this->assertSame($process, $process->mustRun());
|
$this->assertSame($process, $process->mustRun());
|
||||||
$this->assertEquals("foo".PHP_EOL, $process->getOutput());
|
$this->assertEquals('foo'.PHP_EOL, $process->getOutput());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSuccessfulMustRunHasCorrectExitCode()
|
public function testSuccessfulMustRunHasCorrectExitCode()
|
||||||
@ -559,7 +559,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
|||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
$process->start();
|
$process->start();
|
||||||
$end = microtime(true);
|
$end = microtime(true);
|
||||||
$this->assertLessThan(0.2, $end-$start);
|
$this->assertLessThan(0.2, $end - $start);
|
||||||
$process->wait();
|
$process->wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that ProcessFailedException does not extract information from
|
* Tests that ProcessFailedException does not extract information from
|
||||||
* process output if it was previously disabled
|
* process output if it was previously disabled.
|
||||||
*/
|
*/
|
||||||
public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput()
|
public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput()
|
||||||
{
|
{
|
||||||
|
@ -229,7 +229,7 @@ class PropertyAccessor implements PropertyAccessorInterface
|
|||||||
|
|
||||||
// the final value of the path must not be validated
|
// the final value of the path must not be validated
|
||||||
if ($i + 1 < $propertyPath->getLength() && !is_object($objectOrArray) && !is_array($objectOrArray)) {
|
if ($i + 1 < $propertyPath->getLength() && !is_object($objectOrArray) && !is_array($objectOrArray)) {
|
||||||
throw new UnexpectedTypeException($objectOrArray, $propertyPath, $i+1);
|
throw new UnexpectedTypeException($objectOrArray, $propertyPath, $i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$propertyValues[] = &$propertyValue;
|
$propertyValues[] = &$propertyValue;
|
||||||
|
@ -24,4 +24,4 @@ class TestClassIsWritable
|
|||||||
{
|
{
|
||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,4 +29,4 @@ class TestClassSetValue
|
|||||||
{
|
{
|
||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user