Merge branch '3.3' into 3.4
* 3.3: [Serializer] Fix extra attributes when no group specified [Intl] Make intl-data tests pass and save language aliases again [Console] Fix CommandTester::setInputs() docblock [Serializer] readd default argument value [VarDumper] fix trailling comma when dumping an exception Remove useless docblocks [FrameworkBundle] Fix docblocks [PropertyInfo] Remove useless docblocks
This commit is contained in:
commit
73982760f7
@ -21,11 +21,11 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
*/
|
||||
class DoctrineValidationPass implements CompilerPassInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $managerType;
|
||||
|
||||
/**
|
||||
* @param string $managerType
|
||||
*/
|
||||
public function __construct($managerType)
|
||||
{
|
||||
$this->managerType = $managerType;
|
||||
|
@ -113,7 +113,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
|
||||
* present to enable the mapping. Set to false
|
||||
* to not do any check, optional.
|
||||
* @param string $configurationPattern Pattern for the Configuration service name
|
||||
* @param string $registerAliasMethodName name of Configuration class method to
|
||||
* @param string $registerAliasMethodName Name of Configuration class method to
|
||||
* register alias
|
||||
* @param string[] $aliasMap Map of alias to namespace
|
||||
*/
|
||||
@ -178,7 +178,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
|
||||
/**
|
||||
* Create the service definition for the metadata driver.
|
||||
*
|
||||
* @param ContainerBuilder $container passed on in case an extending class
|
||||
* @param ContainerBuilder $container Passed on in case an extending class
|
||||
* needs access to the container
|
||||
*
|
||||
* @return Definition|Reference the metadata driver to add to all chain drivers
|
||||
|
@ -24,9 +24,6 @@ use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
|
||||
*/
|
||||
class DoctrineParserCache implements ParserCacheInterface
|
||||
{
|
||||
/**
|
||||
* @var Cache
|
||||
*/
|
||||
private $cache;
|
||||
|
||||
public function __construct(Cache $cache)
|
||||
|
@ -24,24 +24,9 @@ use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
*/
|
||||
class DoctrineChoiceLoader implements ChoiceLoaderInterface
|
||||
{
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
private $manager;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $class;
|
||||
|
||||
/**
|
||||
* @var IdReader
|
||||
*/
|
||||
private $idReader;
|
||||
|
||||
/**
|
||||
* @var null|EntityLoaderInterface
|
||||
*/
|
||||
private $objectLoader;
|
||||
|
||||
/**
|
||||
@ -57,13 +42,10 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
|
||||
* mapper implementations.
|
||||
*
|
||||
* @param ObjectManager $manager The object manager
|
||||
* @param string $class The class name of the
|
||||
* loaded objects
|
||||
* @param IdReader $idReader the reader for the object
|
||||
* IDs
|
||||
* @param string $class The class name of the loaded objects
|
||||
* @param IdReader $idReader The reader for the object IDs
|
||||
* @param null|EntityLoaderInterface $objectLoader The objects loader
|
||||
* @param ChoiceListFactoryInterface $factory The factory for creating
|
||||
* the loaded choice list
|
||||
* @param ChoiceListFactoryInterface $factory The factory for creating the loaded choice list
|
||||
*/
|
||||
public function __construct($manager, $class, $idReader = null, $objectLoader = null, $factory = null)
|
||||
{
|
||||
|
@ -24,29 +24,10 @@ use Symfony\Component\Form\Exception\RuntimeException;
|
||||
*/
|
||||
class IdReader
|
||||
{
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
private $om;
|
||||
|
||||
/**
|
||||
* @var ClassMetadata
|
||||
*/
|
||||
private $classMetadata;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $singleId;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $intId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $idField;
|
||||
|
||||
/**
|
||||
|
@ -27,9 +27,6 @@ use Symfony\Component\PropertyInfo\Type;
|
||||
*/
|
||||
class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface
|
||||
{
|
||||
/**
|
||||
* @var ClassMetadataFactory
|
||||
*/
|
||||
private $classMetadataFactory;
|
||||
|
||||
public function __construct(ClassMetadataFactory $classMetadataFactory)
|
||||
|
@ -26,9 +26,6 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
*/
|
||||
class UniqueEntityValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* @var ManagerRegistry
|
||||
*/
|
||||
private $registry;
|
||||
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
|
@ -26,19 +26,8 @@ use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
|
||||
*/
|
||||
class ProxyDumper implements DumperInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $salt;
|
||||
|
||||
/**
|
||||
* @var LazyLoadingValueHolderGenerator
|
||||
*/
|
||||
private $proxyGenerator;
|
||||
|
||||
/**
|
||||
* @var BaseGeneratorStrategy
|
||||
*/
|
||||
private $classGenerator;
|
||||
|
||||
/**
|
||||
|
@ -23,10 +23,6 @@ use Twig\Extension\AbstractExtension;
|
||||
class StopwatchExtension extends AbstractExtension
|
||||
{
|
||||
private $stopwatch;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $enabled;
|
||||
|
||||
public function __construct(Stopwatch $stopwatch = null, $enabled = true)
|
||||
|
@ -30,9 +30,6 @@ use Twig\NodeVisitor\AbstractNodeVisitor;
|
||||
*/
|
||||
class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var Scope
|
||||
*/
|
||||
private $scope;
|
||||
|
||||
public function __construct()
|
||||
|
@ -42,11 +42,6 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface
|
||||
*/
|
||||
private $prefix = '';
|
||||
|
||||
/**
|
||||
* The twig environment.
|
||||
*
|
||||
* @var Environment
|
||||
*/
|
||||
private $twig;
|
||||
|
||||
public function __construct(Environment $twig)
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Controller;
|
||||
|
||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
@ -23,10 +24,9 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Component\Security\Csrf\CsrfToken;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\Form;
|
||||
use Symfony\Component\Form\FormBuilder;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Doctrine\Bundle\DoctrineBundle\Registry;
|
||||
|
||||
/**
|
||||
* Common features needed in controllers.
|
||||
@ -71,7 +71,7 @@ trait ControllerTrait
|
||||
* Generates a URL from the given parameters.
|
||||
*
|
||||
* @param string $route The name of the route
|
||||
* @param mixed $parameters An array of parameters
|
||||
* @param array $parameters An array of parameters
|
||||
* @param int $referenceType The type of reference (one of the constants in UrlGeneratorInterface)
|
||||
*
|
||||
* @return string The generated URL
|
||||
@ -380,7 +380,7 @@ trait ControllerTrait
|
||||
* @param mixed $data The initial data for the form
|
||||
* @param array $options Options for the form
|
||||
*
|
||||
* @return Form
|
||||
* @return FormInterface
|
||||
*
|
||||
* @final since version 3.4
|
||||
*/
|
||||
@ -395,7 +395,7 @@ trait ControllerTrait
|
||||
* @param mixed $data The initial data for the form
|
||||
* @param array $options Options for the form
|
||||
*
|
||||
* @return FormBuilder
|
||||
* @return FormBuilderInterface
|
||||
*
|
||||
* @final since version 3.4
|
||||
*/
|
||||
@ -407,7 +407,7 @@ trait ControllerTrait
|
||||
/**
|
||||
* Shortcut to return the Doctrine Registry service.
|
||||
*
|
||||
* @return Registry
|
||||
* @return ManagerRegistry
|
||||
*
|
||||
* @throws \LogicException If DoctrineBundle is not available
|
||||
*
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use Symfony\Component\HttpFoundation\File\File;
|
||||
@ -21,8 +22,6 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
||||
use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Symfony\Component\Security\Core\User\User;
|
||||
@ -533,98 +532,25 @@ abstract class ControllerTraitTest extends TestCase
|
||||
|
||||
trait TestControllerTrait
|
||||
{
|
||||
public function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
|
||||
{
|
||||
return parent::generateUrl($route, $parameters, $referenceType);
|
||||
}
|
||||
|
||||
public function redirect($url, $status = 302)
|
||||
{
|
||||
return parent::redirect($url, $status);
|
||||
}
|
||||
|
||||
public function forward($controller, array $path = array(), array $query = array())
|
||||
{
|
||||
return parent::forward($controller, $path, $query);
|
||||
}
|
||||
|
||||
public function getUser()
|
||||
{
|
||||
return parent::getUser();
|
||||
}
|
||||
|
||||
public function json($data, $status = 200, $headers = array(), $context = array())
|
||||
{
|
||||
return parent::json($data, $status, $headers, $context);
|
||||
}
|
||||
|
||||
public function file($file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT)
|
||||
{
|
||||
return parent::file($file, $fileName, $disposition);
|
||||
}
|
||||
|
||||
public function isGranted($attributes, $object = null)
|
||||
{
|
||||
return parent::isGranted($attributes, $object);
|
||||
}
|
||||
|
||||
public function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.')
|
||||
{
|
||||
parent::denyAccessUnlessGranted($attributes, $object, $message);
|
||||
}
|
||||
|
||||
public function redirectToRoute($route, array $parameters = array(), $status = 302)
|
||||
{
|
||||
return parent::redirectToRoute($route, $parameters, $status);
|
||||
}
|
||||
|
||||
public function addFlash($type, $message)
|
||||
{
|
||||
parent::addFlash($type, $message);
|
||||
}
|
||||
|
||||
public function isCsrfTokenValid($id, $token)
|
||||
{
|
||||
return parent::isCsrfTokenValid($id, $token);
|
||||
}
|
||||
|
||||
public function renderView($view, array $parameters = array())
|
||||
{
|
||||
return parent::renderView($view, $parameters);
|
||||
}
|
||||
|
||||
public function render($view, array $parameters = array(), Response $response = null)
|
||||
{
|
||||
return parent::render($view, $parameters, $response);
|
||||
}
|
||||
|
||||
public function stream($view, array $parameters = array(), StreamedResponse $response = null)
|
||||
{
|
||||
return parent::stream($view, $parameters, $response);
|
||||
}
|
||||
|
||||
public function createNotFoundException($message = 'Not Found', \Exception $previous = null)
|
||||
{
|
||||
return parent::createNotFoundException($message, $previous);
|
||||
}
|
||||
|
||||
public function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null)
|
||||
{
|
||||
return parent::createAccessDeniedException($message, $previous);
|
||||
}
|
||||
|
||||
public function createForm($type, $data = null, array $options = array())
|
||||
{
|
||||
return parent::createForm($type, $data, $options);
|
||||
}
|
||||
|
||||
public function createFormBuilder($data = null, array $options = array())
|
||||
{
|
||||
return parent::createFormBuilder($data, $options);
|
||||
}
|
||||
|
||||
public function getDoctrine()
|
||||
{
|
||||
return parent::getDoctrine();
|
||||
use ControllerTrait {
|
||||
generateUrl as public;
|
||||
redirect as public;
|
||||
forward as public;
|
||||
getUser as public;
|
||||
json as public;
|
||||
file as public;
|
||||
isGranted as public;
|
||||
denyAccessUnlessGranted as public;
|
||||
redirectToRoute as public;
|
||||
addFlash as public;
|
||||
isCsrfTokenValid as public;
|
||||
renderView as public;
|
||||
render as public;
|
||||
stream as public;
|
||||
createNotFoundException as public;
|
||||
createAccessDeniedException as public;
|
||||
createForm as public;
|
||||
createFormBuilder as public;
|
||||
getDoctrine as public;
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ class TranslationLoader extends TranslationReader
|
||||
/**
|
||||
* Loads translation messages from a directory to the catalogue.
|
||||
*
|
||||
* @param string $directory the directory to look into
|
||||
* @param MessageCatalogue $catalogue the catalogue
|
||||
* @param string $directory The directory to look into
|
||||
* @param MessageCatalogue $catalogue The catalogue
|
||||
*/
|
||||
public function loadMessages($directory, MessageCatalogue $catalogue)
|
||||
{
|
||||
|
@ -29,12 +29,12 @@ use Twig\Loader\ExistsLoaderInterface;
|
||||
class ExceptionController
|
||||
{
|
||||
protected $twig;
|
||||
|
||||
/**
|
||||
* @var bool Show error (false) or exception (true) pages by default
|
||||
*/
|
||||
protected $debug;
|
||||
|
||||
/**
|
||||
* @param Environment $twig
|
||||
* @param bool $debug Show error (false) or exception (true) pages by default
|
||||
*/
|
||||
public function __construct(Environment $twig, $debug)
|
||||
{
|
||||
$this->twig = $twig;
|
||||
|
@ -51,12 +51,6 @@ namespace Symfony\Component\ClassLoader;
|
||||
class XcacheClassLoader
|
||||
{
|
||||
private $prefix;
|
||||
|
||||
/**
|
||||
* A class loader object that implements the findFile() method.
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
private $decorated;
|
||||
|
||||
/**
|
||||
|
@ -22,9 +22,6 @@ namespace Symfony\Component\Config;
|
||||
*/
|
||||
class ConfigCacheFactory implements ConfigCacheFactoryInterface
|
||||
{
|
||||
/**
|
||||
* @var bool Debug flag passed to the ConfigCache
|
||||
*/
|
||||
private $debug;
|
||||
|
||||
/**
|
||||
|
@ -82,7 +82,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
/**
|
||||
* Sets the xml remappings that should be performed.
|
||||
*
|
||||
* @param array $remappings an array of the form array(array(string, string))
|
||||
* @param array $remappings An array of the form array(array(string, string))
|
||||
*/
|
||||
public function setXmlRemappings(array $remappings)
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
|
||||
/**
|
||||
* Sets a prototype for child nodes.
|
||||
*
|
||||
* @param string $type the type of node
|
||||
* @param string $type The type of node
|
||||
*
|
||||
* @return NodeDefinition
|
||||
*/
|
||||
@ -154,7 +154,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
|
||||
*
|
||||
* This method is applicable to prototype nodes only.
|
||||
*
|
||||
* @param int|string|array|null $children the number of children|The child name|The children names to be added
|
||||
* @param int|string|array|null $children The number of children|The child name|The children names to be added
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -61,7 +61,7 @@ class NodeBuilder implements NodeParentInterface
|
||||
/**
|
||||
* Creates a child scalar node.
|
||||
*
|
||||
* @param string $name the name of the node
|
||||
* @param string $name The name of the node
|
||||
*
|
||||
* @return ScalarNodeDefinition The child node
|
||||
*/
|
||||
@ -85,7 +85,7 @@ class NodeBuilder implements NodeParentInterface
|
||||
/**
|
||||
* Creates a child integer node.
|
||||
*
|
||||
* @param string $name the name of the node
|
||||
* @param string $name The name of the node
|
||||
*
|
||||
* @return IntegerNodeDefinition The child node
|
||||
*/
|
||||
@ -97,7 +97,7 @@ class NodeBuilder implements NodeParentInterface
|
||||
/**
|
||||
* Creates a child float node.
|
||||
*
|
||||
* @param string $name the name of the node
|
||||
* @param string $name The name of the node
|
||||
*
|
||||
* @return FloatNodeDefinition The child node
|
||||
*/
|
||||
|
@ -24,8 +24,6 @@ final class ConsoleEvents
|
||||
* before they are handled to the command.
|
||||
*
|
||||
* @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const COMMAND = 'console.command';
|
||||
|
||||
@ -34,8 +32,6 @@ final class ConsoleEvents
|
||||
* executed by the console.
|
||||
*
|
||||
* @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent")
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const TERMINATE = 'console.terminate';
|
||||
|
||||
@ -48,8 +44,6 @@ final class ConsoleEvents
|
||||
*
|
||||
* @Event("Symfony\Component\Console\Event\ConsoleExceptionEvent")
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @deprecated The console.exception event is deprecated since version 3.3 and will be removed in 4.0. Use the console.error event instead.
|
||||
*/
|
||||
const EXCEPTION = 'console.exception';
|
||||
@ -61,8 +55,6 @@ final class ConsoleEvents
|
||||
* to modify the thrown exception.
|
||||
*
|
||||
* @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const ERROR = 'console.error';
|
||||
}
|
||||
|
@ -25,8 +25,6 @@ class ConsoleCommandEvent extends ConsoleEvent
|
||||
|
||||
/**
|
||||
* Indicates if the command should be run or skipped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $commandShouldRun = true;
|
||||
|
||||
|
@ -24,7 +24,6 @@ use Symfony\Component\Console\Terminal;
|
||||
*/
|
||||
final class ProgressBar
|
||||
{
|
||||
// options
|
||||
private $barWidth = 28;
|
||||
private $barChar;
|
||||
private $emptyBarChar = '-';
|
||||
@ -32,10 +31,6 @@ final class ProgressBar
|
||||
private $format;
|
||||
private $internalFormat;
|
||||
private $redrawFreq = 1;
|
||||
|
||||
/**
|
||||
* @var OutputInterface
|
||||
*/
|
||||
private $output;
|
||||
private $step = 0;
|
||||
private $max;
|
||||
|
@ -306,7 +306,7 @@ class InputDefinition
|
||||
/**
|
||||
* Gets an InputOption by shortcut.
|
||||
*
|
||||
* @param string $shortcut the Shortcut name
|
||||
* @param string $shortcut The Shortcut name
|
||||
*
|
||||
* @return InputOption An InputOption object
|
||||
*/
|
||||
|
@ -16,9 +16,6 @@ namespace Symfony\Component\Console\Output;
|
||||
*/
|
||||
class BufferedOutput extends Output
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $buffer = '';
|
||||
|
||||
/**
|
||||
|
@ -29,9 +29,6 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
||||
*/
|
||||
class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
||||
{
|
||||
/**
|
||||
* @var StreamOutput
|
||||
*/
|
||||
private $stderr;
|
||||
|
||||
/**
|
||||
|
@ -132,8 +132,8 @@ class CommandTester
|
||||
/**
|
||||
* Sets the user inputs.
|
||||
*
|
||||
* @param array an array of strings representing each input
|
||||
* passed to the command input stream
|
||||
* @param array $inputs An array of strings representing each input
|
||||
* passed to the command input stream
|
||||
*
|
||||
* @return CommandTester
|
||||
*/
|
||||
|
@ -23,14 +23,7 @@ namespace Symfony\Component\CssSelector\Node;
|
||||
*/
|
||||
class ElementNode extends AbstractNode
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $namespace;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $element;
|
||||
|
||||
/**
|
||||
|
@ -23,19 +23,8 @@ namespace Symfony\Component\CssSelector\Parser;
|
||||
*/
|
||||
class Reader
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $source;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $length;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $position = 0;
|
||||
|
||||
/**
|
||||
|
@ -31,19 +31,8 @@ class Token
|
||||
const TYPE_NUMBER = 'number';
|
||||
const TYPE_STRING = 'string';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $type;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $position;
|
||||
|
||||
/**
|
||||
|
@ -23,64 +23,17 @@ namespace Symfony\Component\CssSelector\Parser\Tokenizer;
|
||||
*/
|
||||
class TokenizerPatterns
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $unicodeEscapePattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $simpleEscapePattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $newLineEscapePattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $escapePattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $stringEscapePattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $nonAsciiPattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $nmCharPattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $nmStartPattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $identifierPattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $hashPattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $numberPattern;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $quotedStringPattern;
|
||||
|
||||
public function __construct()
|
||||
|
@ -31,9 +31,6 @@ class NodeExtension extends AbstractExtension
|
||||
const ATTRIBUTE_NAME_IN_LOWER_CASE = 2;
|
||||
const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $flags;
|
||||
|
||||
/**
|
||||
|
@ -23,19 +23,8 @@ namespace Symfony\Component\CssSelector\XPath;
|
||||
*/
|
||||
class XPathExpr
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $path;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $element;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $condition;
|
||||
|
||||
/**
|
||||
|
@ -26,9 +26,6 @@ class RepeatedPass implements CompilerPassInterface
|
||||
*/
|
||||
private $repeat = false;
|
||||
|
||||
/**
|
||||
* @var RepeatablePassInterface[]
|
||||
*/
|
||||
private $passes;
|
||||
|
||||
/**
|
||||
|
@ -145,7 +145,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
* If you are not using the loaders and therefore don't want
|
||||
* to depend on the Config component, set this flag to false.
|
||||
*
|
||||
* @param bool $track true if you want to track resources, false otherwise
|
||||
* @param bool $track True if you want to track resources, false otherwise
|
||||
*/
|
||||
public function setResourceTracking($track)
|
||||
{
|
||||
@ -155,7 +155,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
/**
|
||||
* Checks if resources are tracked.
|
||||
*
|
||||
* @return bool true if resources are tracked, false otherwise
|
||||
* @return bool true If resources are tracked, false otherwise
|
||||
*/
|
||||
public function isTrackingResources()
|
||||
{
|
||||
|
@ -42,15 +42,11 @@ class PhpDumper extends Dumper
|
||||
{
|
||||
/**
|
||||
* Characters that might appear in the generated variable name as first character.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
/**
|
||||
* Characters that might appear in the generated variable name as any but the first character.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_';
|
||||
|
||||
|
@ -25,11 +25,10 @@ interface InstantiatorInterface
|
||||
/**
|
||||
* Instantiates a proxy object.
|
||||
*
|
||||
* @param ContainerInterface $container the container from which the service is being requested
|
||||
* @param Definition $definition the definition of the requested service
|
||||
* @param string $id identifier of the requested service
|
||||
* @param callable $realInstantiator zero-argument callback that is capable of producing the real
|
||||
* service instance
|
||||
* @param ContainerInterface $container The container from which the service is being requested
|
||||
* @param Definition $definition The definition of the requested service
|
||||
* @param string $id Identifier of the requested service
|
||||
* @param callable $realInstantiator Zero-argument callback that is capable of producing the real service instance
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
|
@ -31,8 +31,8 @@ interface DumperInterface
|
||||
* Generates the code to be used to instantiate a proxy in the dumped factory code.
|
||||
*
|
||||
* @param Definition $definition
|
||||
* @param string $id service identifier
|
||||
* @param string $factoryCode the code to execute to create the service, will be added to the interface in 4.0
|
||||
* @param string $id Service identifier
|
||||
* @param string $factoryCode The code to execute to create the service, will be added to the interface in 4.0
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -20,9 +20,6 @@ use Symfony\Component\CssSelector\CssSelectorConverter;
|
||||
*/
|
||||
class Crawler implements \Countable, \IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* @var string The current URI
|
||||
*/
|
||||
protected $uri;
|
||||
|
||||
/**
|
||||
@ -58,14 +55,14 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
private $isHtml = true;
|
||||
|
||||
/**
|
||||
* @param mixed $node A Node to use as the base for the crawling
|
||||
* @param string $currentUri The current URI
|
||||
* @param string $baseHref The base href value
|
||||
* @param mixed $node A Node to use as the base for the crawling
|
||||
* @param string $uri The current URI
|
||||
* @param string $baseHref The base href value
|
||||
*/
|
||||
public function __construct($node = null, $currentUri = null, $baseHref = null)
|
||||
public function __construct($node = null, $uri = null, $baseHref = null)
|
||||
{
|
||||
$this->uri = $currentUri;
|
||||
$this->baseHref = $baseHref ?: $currentUri;
|
||||
$this->uri = $uri;
|
||||
$this->baseHref = $baseHref ?: $uri;
|
||||
|
||||
$this->add($node);
|
||||
}
|
||||
|
@ -24,19 +24,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
*/
|
||||
class RegisterListenersPass implements CompilerPassInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $dispatcherService;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $listenerTag;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $subscriberTag;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ interface EventDispatcherInterface
|
||||
* @param string $eventName The name of the event to dispatch. The name of
|
||||
* the event is the name of the method that is
|
||||
* invoked on listeners.
|
||||
* @param Event $event the event to pass to the event handlers/listeners
|
||||
* @param Event $event The event to pass to the event handlers/listeners
|
||||
* If not supplied, an empty Event instance is created
|
||||
*
|
||||
* @return Event
|
||||
|
@ -20,22 +20,13 @@ namespace Symfony\Component\EventDispatcher;
|
||||
*/
|
||||
class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* Event subject.
|
||||
*
|
||||
* @var mixed usually object or callable
|
||||
*/
|
||||
protected $subject;
|
||||
|
||||
/**
|
||||
* Array of arguments.
|
||||
*/
|
||||
protected $arguments;
|
||||
|
||||
/**
|
||||
* Encapsulate an event with $subject and $args.
|
||||
*
|
||||
* @param mixed $subject The subject of the event, usually an object
|
||||
* @param mixed $subject The subject of the event, usually an object or a callable
|
||||
* @param array $arguments Arguments to store in the event
|
||||
*/
|
||||
public function __construct($subject = null, array $arguments = array())
|
||||
|
@ -23,9 +23,6 @@ use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
|
||||
*/
|
||||
class ExpressionLanguage
|
||||
{
|
||||
/**
|
||||
* @var CacheItemPoolInterface
|
||||
*/
|
||||
private $cache;
|
||||
private $lexer;
|
||||
private $parser;
|
||||
|
@ -62,7 +62,7 @@ class LockHandler
|
||||
/**
|
||||
* Lock the resource.
|
||||
*
|
||||
* @param bool $blocking wait until the lock is released
|
||||
* @param bool $blocking Wait until the lock is released
|
||||
*
|
||||
* @return bool Returns true if the lock was acquired, false otherwise
|
||||
*
|
||||
|
@ -92,7 +92,7 @@ class FilesystemTestCase extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $expectedFilePerms expected file permissions as three digits (i.e. 755)
|
||||
* @param int $expectedFilePerms Expected file permissions as three digits (i.e. 755)
|
||||
* @param string $filePath
|
||||
*/
|
||||
protected function assertFilePermissions($expectedFilePerms, $filePath)
|
||||
|
@ -13,9 +13,9 @@ namespace Symfony\Component\Finder\Tests\Iterator;
|
||||
|
||||
class MockSplFileInfo extends \SplFileInfo
|
||||
{
|
||||
const TYPE_DIRECTORY = 1;
|
||||
const TYPE_FILE = 2;
|
||||
const TYPE_UNKNOWN = 3;
|
||||
const TYPE_DIRECTORY = 1;
|
||||
const TYPE_FILE = 2;
|
||||
const TYPE_UNKNOWN = 3;
|
||||
|
||||
private $contents = null;
|
||||
private $mode = null;
|
||||
|
@ -129,13 +129,13 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface
|
||||
*
|
||||
* @see getResourceForBlockHierarchy()
|
||||
*
|
||||
* @param string $cacheKey the cache key used for storing the
|
||||
* @param string $cacheKey The cache key used for storing the
|
||||
* resource
|
||||
* @param FormView $view the form view for finding the applying
|
||||
* @param FormView $view The form view for finding the applying
|
||||
* themes
|
||||
* @param array $blockNameHierarchy the block hierarchy, with the most
|
||||
* @param array $blockNameHierarchy The block hierarchy, with the most
|
||||
* specific block name at the end
|
||||
* @param int $hierarchyLevel the level in the block hierarchy that
|
||||
* @param int $hierarchyLevel The level in the block hierarchy that
|
||||
* should be loaded
|
||||
*
|
||||
* @return bool True if the resource could be loaded, false otherwise
|
||||
|
@ -16,18 +16,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
class CallbackTransformer implements DataTransformerInterface
|
||||
{
|
||||
/**
|
||||
* The callback used for forward transform.
|
||||
*
|
||||
* @var callable
|
||||
*/
|
||||
private $transform;
|
||||
|
||||
/**
|
||||
* The callback used for reverse transform.
|
||||
*
|
||||
* @var callable
|
||||
*/
|
||||
private $reverseTransform;
|
||||
|
||||
/**
|
||||
|
@ -27,11 +27,6 @@ use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
*/
|
||||
class LazyChoiceList implements ChoiceListInterface
|
||||
{
|
||||
/**
|
||||
* The choice loader.
|
||||
*
|
||||
* @var ChoiceLoaderInterface
|
||||
*/
|
||||
private $loader;
|
||||
|
||||
/**
|
||||
@ -65,8 +60,7 @@ class LazyChoiceList implements ChoiceListInterface
|
||||
* argument.
|
||||
*
|
||||
* @param ChoiceLoaderInterface $loader The choice loader
|
||||
* @param null|callable $value The callable generating the choice
|
||||
* values
|
||||
* @param null|callable $value The callable generating the choice values
|
||||
*/
|
||||
public function __construct(ChoiceLoaderInterface $loader, callable $value = null)
|
||||
{
|
||||
|
@ -18,26 +18,14 @@ namespace Symfony\Component\Form\ChoiceList\View;
|
||||
*/
|
||||
class ChoiceGroupView implements \IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* The label of the group.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* The choice views in the group.
|
||||
*
|
||||
* @var ChoiceGroupView[]|ChoiceView[]
|
||||
*/
|
||||
public $choices;
|
||||
|
||||
/**
|
||||
* Creates a new choice group view.
|
||||
*
|
||||
* @param string $label The label of the group
|
||||
* @param ChoiceGroupView[]|ChoiceView[] $choices the choice views in the
|
||||
* group
|
||||
* @param ChoiceGroupView[]|ChoiceView[] $choices the choice views in the group
|
||||
*/
|
||||
public function __construct($label, array $choices = array())
|
||||
{
|
||||
|
@ -22,26 +22,14 @@ namespace Symfony\Component\Form\ChoiceList\View;
|
||||
*/
|
||||
class ChoiceListView
|
||||
{
|
||||
/**
|
||||
* The choices.
|
||||
*
|
||||
* @var ChoiceGroupView[]|ChoiceView[]
|
||||
*/
|
||||
public $choices;
|
||||
|
||||
/**
|
||||
* The preferred choices.
|
||||
*
|
||||
* @var ChoiceGroupView[]|ChoiceView[]
|
||||
*/
|
||||
public $preferredChoices;
|
||||
|
||||
/**
|
||||
* Creates a new choice list view.
|
||||
*
|
||||
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views
|
||||
* @param ChoiceGroupView[]|ChoiceView[] $preferredChoices the preferred
|
||||
* choice views
|
||||
* @param ChoiceGroupView[]|ChoiceView[] $preferredChoices the preferred choice views
|
||||
*/
|
||||
public function __construct(array $choices = array(), array $preferredChoices = array())
|
||||
{
|
||||
|
@ -18,25 +18,8 @@ namespace Symfony\Component\Form\ChoiceList\View;
|
||||
*/
|
||||
class ChoiceView
|
||||
{
|
||||
/**
|
||||
* The label displayed to humans.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* The view representation of the choice.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $value;
|
||||
|
||||
/**
|
||||
* The original choice value.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
public $data;
|
||||
|
||||
/**
|
||||
|
@ -26,14 +26,7 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
*/
|
||||
class CoreExtension extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
* @var PropertyAccessorInterface
|
||||
*/
|
||||
private $propertyAccessor;
|
||||
|
||||
/**
|
||||
* @var ChoiceListFactoryInterface
|
||||
*/
|
||||
private $choiceListFactory;
|
||||
|
||||
public function __construct(PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null)
|
||||
|
@ -22,17 +22,10 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
*/
|
||||
class BooleanToStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
/**
|
||||
* The value emitted upon transform if the input is true.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $trueValue;
|
||||
|
||||
/**
|
||||
* Sets the value emitted upon transform if the input is true.
|
||||
*
|
||||
* @param string $trueValue
|
||||
* @param string $trueValue The value emitted upon transform if the input is true
|
||||
*/
|
||||
public function __construct($trueValue)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
|
||||
/**
|
||||
* Returns a preconfigured IntlDateFormatter instance.
|
||||
*
|
||||
* @param bool $ignoreTimezone use UTC regardless of the configured timezone
|
||||
* @param bool $ignoreTimezone Use UTC regardless of the configured timezone
|
||||
*
|
||||
* @return \IntlDateFormatter
|
||||
*
|
||||
|
@ -32,7 +32,6 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface
|
||||
);
|
||||
|
||||
private $type;
|
||||
|
||||
private $scale;
|
||||
|
||||
/**
|
||||
|
@ -21,27 +21,12 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
*/
|
||||
class MergeCollectionListener implements EventSubscriberInterface
|
||||
{
|
||||
/**
|
||||
* Whether elements may be added to the collection.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $allowAdd;
|
||||
|
||||
/**
|
||||
* Whether elements may be removed from the collection.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $allowDelete;
|
||||
|
||||
/**
|
||||
* Creates a new listener.
|
||||
*
|
||||
* @param bool $allowAdd whether values might be added to the
|
||||
* collection
|
||||
* @param bool $allowDelete whether values might be removed from the
|
||||
* collection
|
||||
* @param bool $allowAdd Whether values might be added to the collection
|
||||
* @param bool $allowDelete Whether values might be removed from the collection
|
||||
*/
|
||||
public function __construct($allowAdd = false, $allowDelete = false)
|
||||
{
|
||||
|
@ -34,8 +34,8 @@ class ResizeFormListener implements EventSubscriberInterface
|
||||
/**
|
||||
* @param string $type
|
||||
* @param array $options
|
||||
* @param bool $allowAdd whether children could be added to the group
|
||||
* @param bool $allowDelete whether children could be removed from the group
|
||||
* @param bool $allowAdd Whether children could be added to the group
|
||||
* @param bool $allowDelete Whether children could be removed from the group
|
||||
* @param bool|callable $deleteEmpty
|
||||
*/
|
||||
public function __construct($type, array $options = array(), $allowAdd = false, $allowDelete = false, $deleteEmpty = false)
|
||||
|
@ -37,11 +37,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class ChoiceType extends AbstractType
|
||||
{
|
||||
/**
|
||||
* Caches created choice lists.
|
||||
*
|
||||
* @var ChoiceListFactoryInterface
|
||||
*/
|
||||
private $choiceListFactory;
|
||||
|
||||
public function __construct(ChoiceListFactoryInterface $choiceListFactory = null)
|
||||
|
@ -30,7 +30,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
class DateTimeType extends AbstractType
|
||||
{
|
||||
const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM;
|
||||
|
||||
const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM;
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,6 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
|
||||
class DateType extends AbstractType
|
||||
{
|
||||
const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM;
|
||||
|
||||
const HTML5_FORMAT = 'yyyy-MM-dd';
|
||||
|
||||
private static $acceptedFormats = array(
|
||||
|
@ -24,9 +24,6 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
|
||||
class FormType extends BaseType
|
||||
{
|
||||
/**
|
||||
* @var PropertyAccessorInterface
|
||||
*/
|
||||
private $propertyAccessor;
|
||||
|
||||
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
|
||||
|
@ -22,19 +22,8 @@ use Symfony\Component\Translation\TranslatorInterface;
|
||||
*/
|
||||
class CsrfExtension extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
* @var CsrfTokenManagerInterface
|
||||
*/
|
||||
private $tokenManager;
|
||||
|
||||
/**
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
private $translationDomain;
|
||||
|
||||
/**
|
||||
|
@ -25,50 +25,12 @@ use Symfony\Component\Translation\TranslatorInterface;
|
||||
*/
|
||||
class CsrfValidationListener implements EventSubscriberInterface
|
||||
{
|
||||
/**
|
||||
* The name of the CSRF field.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $fieldName;
|
||||
|
||||
/**
|
||||
* The generator for CSRF tokens.
|
||||
*
|
||||
* @var CsrfTokenManagerInterface
|
||||
*/
|
||||
private $tokenManager;
|
||||
|
||||
/**
|
||||
* A text mentioning the tokenId of the CSRF token.
|
||||
*
|
||||
* Validation of the token will only succeed if it was generated in the
|
||||
* same session and with the same tokenId.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $tokenId;
|
||||
|
||||
/**
|
||||
* The message displayed in case of an error.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $errorMessage;
|
||||
|
||||
/**
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
private $translationDomain;
|
||||
|
||||
/**
|
||||
* @var ServerParams
|
||||
*/
|
||||
private $serverParams;
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
|
@ -26,36 +26,21 @@ use Symfony\Component\Translation\TranslatorInterface;
|
||||
*/
|
||||
class FormTypeCsrfExtension extends AbstractTypeExtension
|
||||
{
|
||||
/**
|
||||
* @var CsrfTokenManagerInterface
|
||||
*/
|
||||
private $defaultTokenManager;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $defaultEnabled;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $defaultFieldName;
|
||||
|
||||
/**
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
private $translationDomain;
|
||||
|
||||
/**
|
||||
* @var ServerParams
|
||||
*/
|
||||
private $serverParams;
|
||||
|
||||
/**
|
||||
* @param CsrfTokenManagerInterface $defaultTokenManager
|
||||
* @param bool $defaultEnabled
|
||||
* @param string $defaultFieldName
|
||||
* @param TranslatorInterface $translator
|
||||
* @param null|string $translationDomain
|
||||
* @param ServerParams $serverParams
|
||||
*/
|
||||
public function __construct(CsrfTokenManagerInterface $defaultTokenManager, $defaultEnabled = true, $defaultFieldName = '_token', TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null)
|
||||
{
|
||||
$this->defaultTokenManager = $defaultTokenManager;
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\DataCollector;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Form\AbstractExtension;
|
||||
|
||||
/**
|
||||
@ -22,9 +21,6 @@ use Symfony\Component\Form\AbstractExtension;
|
||||
*/
|
||||
class DataCollectorExtension extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
* @var EventSubscriberInterface
|
||||
*/
|
||||
private $dataCollector;
|
||||
|
||||
public function __construct(FormDataCollectorInterface $dataCollector)
|
||||
|
@ -24,9 +24,6 @@ use Symfony\Component\Form\FormEvents;
|
||||
*/
|
||||
class DataCollectorListener implements EventSubscriberInterface
|
||||
{
|
||||
/**
|
||||
* @var FormDataCollectorInterface
|
||||
*/
|
||||
private $dataCollector;
|
||||
|
||||
public function __construct(FormDataCollectorInterface $dataCollector)
|
||||
|
@ -25,14 +25,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface;
|
||||
*/
|
||||
class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface
|
||||
{
|
||||
/**
|
||||
* @var ResolvedFormTypeInterface
|
||||
*/
|
||||
private $proxiedType;
|
||||
|
||||
/**
|
||||
* @var FormDataCollectorInterface
|
||||
*/
|
||||
private $dataCollector;
|
||||
|
||||
public function __construct(ResolvedFormTypeInterface $proxiedType, FormDataCollectorInterface $dataCollector)
|
||||
|
@ -24,14 +24,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface;
|
||||
*/
|
||||
class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface
|
||||
{
|
||||
/**
|
||||
* @var ResolvedFormTypeFactoryInterface
|
||||
*/
|
||||
private $proxiedFactory;
|
||||
|
||||
/**
|
||||
* @var FormDataCollectorInterface
|
||||
*/
|
||||
private $dataCollector;
|
||||
|
||||
public function __construct(ResolvedFormTypeFactoryInterface $proxiedFactory, FormDataCollectorInterface $dataCollector)
|
||||
|
@ -25,7 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
class DataCollectorTypeExtension extends AbstractTypeExtension
|
||||
{
|
||||
/**
|
||||
* @var \Symfony\Component\EventDispatcher\EventSubscriberInterface
|
||||
* @var DataCollectorListener
|
||||
*/
|
||||
private $listener;
|
||||
|
||||
|
@ -26,9 +26,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
*/
|
||||
class HttpFoundationRequestHandler implements RequestHandlerInterface
|
||||
{
|
||||
/**
|
||||
* @var ServerParams
|
||||
*/
|
||||
private $serverParams;
|
||||
|
||||
/**
|
||||
|
@ -20,9 +20,6 @@ use Symfony\Component\Templating\EngineInterface;
|
||||
*/
|
||||
class TemplatingRendererEngine extends AbstractRendererEngine
|
||||
{
|
||||
/**
|
||||
* @var EngineInterface
|
||||
*/
|
||||
private $engine;
|
||||
|
||||
public function __construct(EngineInterface $engine, array $defaultThemes = array())
|
||||
|
@ -23,14 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class FormTypeValidatorExtension extends BaseValidatorExtension
|
||||
{
|
||||
/**
|
||||
* @var ValidatorInterface
|
||||
*/
|
||||
private $validator;
|
||||
|
||||
/**
|
||||
* @var ViolationMapper
|
||||
*/
|
||||
private $violationMapper;
|
||||
|
||||
public function __construct(ValidatorInterface $validator)
|
||||
|
@ -242,7 +242,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
* @param string $property The property for which to find constraints
|
||||
* @param \Closure $closure The closure that returns a guess
|
||||
* for a given constraint
|
||||
* @param mixed $defaultValue the default value assumed if no other value
|
||||
* @param mixed $defaultValue The default value assumed if no other value
|
||||
* can be guessed
|
||||
*
|
||||
* @return Guess|null The guessed value with the highest confidence
|
||||
|
@ -19,21 +19,15 @@ use Symfony\Component\Form\Exception\ErrorMappingException;
|
||||
*/
|
||||
class MappingRule
|
||||
{
|
||||
/**
|
||||
* @var FormInterface
|
||||
*/
|
||||
private $origin;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $propertyPath;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $targetPath;
|
||||
|
||||
/**
|
||||
* @param FormInterface $origin
|
||||
* @param string $propertyPath
|
||||
* @param string $targetPath
|
||||
*/
|
||||
public function __construct(FormInterface $origin, $propertyPath, $targetPath)
|
||||
{
|
||||
$this->origin = $origin;
|
||||
|
@ -19,9 +19,6 @@ use Symfony\Component\PropertyAccess\PropertyPath;
|
||||
*/
|
||||
class RelativePath extends PropertyPath
|
||||
{
|
||||
/**
|
||||
* @var FormInterface
|
||||
*/
|
||||
private $root;
|
||||
|
||||
/**
|
||||
|
@ -24,10 +24,8 @@ interface ViolationMapperInterface
|
||||
* the given form.
|
||||
*
|
||||
* @param ConstraintViolation $violation The violation to map
|
||||
* @param FormInterface $form the root form of the tree
|
||||
* to map it to
|
||||
* @param bool $allowNonSynchronized whether to allow
|
||||
* mapping to non-synchronized forms
|
||||
* @param FormInterface $form The root form of the tree to map it to
|
||||
* @param bool $allowNonSynchronized Whether to allow mapping to non-synchronized forms
|
||||
*/
|
||||
public function mapViolation(ConstraintViolation $violation, FormInterface $form, $allowNonSynchronized = false);
|
||||
}
|
||||
|
@ -48,8 +48,7 @@ class ViolationPath implements \IteratorAggregate, PropertyPathInterface
|
||||
/**
|
||||
* Creates a new violation path from a string.
|
||||
*
|
||||
* @param string $violationPath the property path of a {@link \Symfony\Component\Validator\ConstraintViolation}
|
||||
* object
|
||||
* @param string $violationPath The property path of a {@link \Symfony\Component\Validator\ConstraintViolation} object
|
||||
*/
|
||||
public function __construct($violationPath)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
|
||||
* view to the normalized format.
|
||||
*
|
||||
* @param DataTransformerInterface $viewTransformer
|
||||
* @param bool $forcePrepend if set to true, prepend instead of appending
|
||||
* @param bool $forcePrepend If set to true, prepend instead of appending
|
||||
*
|
||||
* @return $this The configuration object
|
||||
*/
|
||||
@ -70,7 +70,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
|
||||
* normalized to the model format.
|
||||
*
|
||||
* @param DataTransformerInterface $modelTransformer
|
||||
* @param bool $forceAppend if set to true, append instead of prepending
|
||||
* @param bool $forceAppend If set to true, append instead of prepending
|
||||
*
|
||||
* @return $this The configuration object
|
||||
*/
|
||||
@ -146,7 +146,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
|
||||
/**
|
||||
* Sets the property path that the form should be mapped to.
|
||||
*
|
||||
* @param null|string|PropertyPathInterface $propertyPath the property path or null if the path should be set
|
||||
* @param null|string|PropertyPathInterface $propertyPath The property path or null if the path should be set
|
||||
* automatically based on the form's name
|
||||
*
|
||||
* @return $this The configuration object
|
||||
@ -166,7 +166,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
|
||||
/**
|
||||
* Sets whether the form's data should be modified by reference.
|
||||
*
|
||||
* @param bool $byReference whether the data should be
|
||||
* @param bool $byReference Whether the data should be
|
||||
* modified by reference
|
||||
*
|
||||
* @return $this The configuration object
|
||||
|
@ -33,26 +33,17 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
|
||||
{
|
||||
/**
|
||||
* The prefix used for indenting nested error messages.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const INDENTATION = ' ';
|
||||
|
||||
/**
|
||||
* @var FormInterface
|
||||
*/
|
||||
private $form;
|
||||
|
||||
/**
|
||||
* @var FormError[]|FormErrorIterator[]
|
||||
*/
|
||||
private $errors;
|
||||
|
||||
/**
|
||||
* Creates a new iterator.
|
||||
*
|
||||
* @param FormInterface $form The erroneous form
|
||||
* @param array $errors The form errors
|
||||
* @param FormInterface $form The erroneous form
|
||||
* @param FormError[]|FormErrorIterator[] $errors The form errors
|
||||
*
|
||||
* @throws InvalidArgumentException If the errors are invalid
|
||||
*/
|
||||
|
@ -268,7 +268,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable
|
||||
* Submits data to the form, transforms and validates it.
|
||||
*
|
||||
* @param mixed $submittedData The submitted data
|
||||
* @param bool $clearMissing whether to set fields to NULL when they
|
||||
* @param bool $clearMissing Whether to set fields to NULL when they
|
||||
* are missing in the submitted data
|
||||
*
|
||||
* @return $this
|
||||
|
@ -42,7 +42,7 @@ interface FormRendererEngineInterface
|
||||
* First the themes attached directly to the
|
||||
* view with {@link setTheme()} are considered,
|
||||
* then the ones of its parent etc.
|
||||
* @param string $blockName the name of the block to render
|
||||
* @param string $blockName The name of the block to render
|
||||
*
|
||||
* @return mixed the renderer resource or false, if none was found
|
||||
*/
|
||||
@ -76,7 +76,7 @@ interface FormRendererEngineInterface
|
||||
* First the themes attached directly to
|
||||
* the view with {@link setTheme()} are
|
||||
* considered, then the ones of its parent etc.
|
||||
* @param array $blockNameHierarchy the block name hierarchy, with the root block
|
||||
* @param array $blockNameHierarchy The block name hierarchy, with the root block
|
||||
* at the beginning
|
||||
* @param int $hierarchyLevel The level in the hierarchy at which to start
|
||||
* looking. Level 0 indicates the root block, i.e.
|
||||
@ -116,7 +116,7 @@ interface FormRendererEngineInterface
|
||||
* First the themes attached directly to
|
||||
* the view with {@link setTheme()} are
|
||||
* considered, then the ones of its parent etc.
|
||||
* @param array $blockNameHierarchy the block name hierarchy, with the root block
|
||||
* @param array $blockNameHierarchy The block name hierarchy, with the root block
|
||||
* at the beginning
|
||||
* @param int $hierarchyLevel The level in the hierarchy at which to start
|
||||
* looking. Level 0 indicates the root block, i.e.
|
||||
|
@ -26,29 +26,21 @@ abstract class Guess
|
||||
{
|
||||
/**
|
||||
* Marks an instance with a value that is extremely likely to be correct.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const VERY_HIGH_CONFIDENCE = 3;
|
||||
|
||||
/**
|
||||
* Marks an instance with a value that is very likely to be correct.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const HIGH_CONFIDENCE = 2;
|
||||
|
||||
/**
|
||||
* Marks an instance with a value that is likely to be correct.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const MEDIUM_CONFIDENCE = 1;
|
||||
|
||||
/**
|
||||
* Marks an instance with a value that may be correct.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const LOW_CONFIDENCE = 0;
|
||||
|
||||
|
@ -20,19 +20,8 @@ use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
*/
|
||||
class PreloadedExtension implements FormExtensionInterface
|
||||
{
|
||||
/**
|
||||
* @var FormTypeInterface[]
|
||||
*/
|
||||
private $types = array();
|
||||
|
||||
/**
|
||||
* @var array[FormTypeExtensionInterface[]]
|
||||
*/
|
||||
private $typeExtensions = array();
|
||||
|
||||
/**
|
||||
* @var FormTypeGuesserInterface
|
||||
*/
|
||||
private $typeGuesser;
|
||||
|
||||
/**
|
||||
|
@ -29,11 +29,8 @@ use Symfony\Component\Validator\ConstraintViolationInterface;
|
||||
class ViolationMapperTest extends TestCase
|
||||
{
|
||||
const LEVEL_0 = 0;
|
||||
|
||||
const LEVEL_1 = 1;
|
||||
|
||||
const LEVEL_1B = 2;
|
||||
|
||||
const LEVEL_2 = 3;
|
||||
|
||||
/**
|
||||
|
@ -58,9 +58,9 @@ class OrderedHashMapIterator implements \Iterator
|
||||
/**
|
||||
* Creates a new iterator.
|
||||
*
|
||||
* @param array $elements the elements of the map, indexed by their
|
||||
* @param array $elements The elements of the map, indexed by their
|
||||
* keys
|
||||
* @param array $orderedKeys the keys of the map in the order in which
|
||||
* @param array $orderedKeys The keys of the map in the order in which
|
||||
* they should be iterated
|
||||
* @param array $managedCursors An array from which to reference the
|
||||
* iterator's cursor as long as it is alive.
|
||||
|
@ -18,24 +18,9 @@ namespace Symfony\Component\HttpFoundation;
|
||||
*/
|
||||
class AcceptHeaderItem
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $quality = 1.0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $index = 0;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $attributes = array();
|
||||
|
||||
/**
|
||||
|
@ -24,41 +24,10 @@ use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
|
||||
*/
|
||||
class UploadedFile extends File
|
||||
{
|
||||
/**
|
||||
* Whether the test mode is activated.
|
||||
*
|
||||
* Local files are used in test mode hence the code should not enforce HTTP uploads.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $test = false;
|
||||
|
||||
/**
|
||||
* The original name of the uploaded file.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $originalName;
|
||||
|
||||
/**
|
||||
* The mime type provided by the uploader.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $mimeType;
|
||||
|
||||
/**
|
||||
* The file size provided by the uploader.
|
||||
*
|
||||
* @var int|null
|
||||
*/
|
||||
private $size;
|
||||
|
||||
/**
|
||||
* The UPLOAD_ERR_XXX constant provided by the uploader.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $error;
|
||||
|
||||
/**
|
||||
@ -76,11 +45,12 @@ class UploadedFile extends File
|
||||
* Calling any other method on an non-valid instance will cause an unpredictable result.
|
||||
*
|
||||
* @param string $path The full temporary path to the file
|
||||
* @param string $originalName The original file name
|
||||
* @param string $originalName The original file name of the uploaded file
|
||||
* @param string|null $mimeType The type of the file as provided by PHP; null defaults to application/octet-stream
|
||||
* @param int|null $size The file size
|
||||
* @param int|null $size The file size provided by the uploader
|
||||
* @param int|null $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants); null defaults to UPLOAD_ERR_OK
|
||||
* @param bool $test Whether the test mode is active
|
||||
* Local files are used in test mode hence the code should not enforce HTTP uploads
|
||||
*
|
||||
* @throws FileException If file_uploads is disabled
|
||||
* @throws FileNotFoundException If the file does not exist
|
||||
|
@ -795,8 +795,8 @@ class Request
|
||||
*
|
||||
* Order of precedence: PATH (routing placeholders or custom attributes), GET, BODY
|
||||
*
|
||||
* @param string $key the key
|
||||
* @param mixed $default the default value if the parameter key does not exist
|
||||
* @param string $key The key
|
||||
* @param mixed $default The default value if the parameter key does not exist
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -19,11 +19,6 @@ namespace Symfony\Component\HttpFoundation\Session\Attribute;
|
||||
*/
|
||||
class NamespacedAttributeBag extends AttributeBag
|
||||
{
|
||||
/**
|
||||
* Namespace character.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $namespaceCharacter;
|
||||
|
||||
/**
|
||||
|
@ -24,21 +24,9 @@ use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
|
||||
*/
|
||||
class Session implements SessionInterface, \IteratorAggregate, \Countable
|
||||
{
|
||||
/**
|
||||
* Storage driver.
|
||||
*
|
||||
* @var SessionStorageInterface
|
||||
*/
|
||||
protected $storage;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $flashName;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $attributeName;
|
||||
|
||||
/**
|
||||
|
@ -20,9 +20,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
||||
*/
|
||||
class MemcacheSessionHandler implements \SessionHandlerInterface
|
||||
{
|
||||
/**
|
||||
* @var \Memcache Memcache driver
|
||||
*/
|
||||
private $memcache;
|
||||
|
||||
/**
|
||||
|
@ -21,9 +21,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
||||
*/
|
||||
class MemcachedSessionHandler extends AbstractSessionHandler
|
||||
{
|
||||
/**
|
||||
* @var \Memcached Memcached driver
|
||||
*/
|
||||
private $memcached;
|
||||
|
||||
/**
|
||||
|
@ -21,9 +21,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
||||
*/
|
||||
class MongoDbSessionHandler extends AbstractSessionHandler
|
||||
{
|
||||
/**
|
||||
* @var \Mongo|\MongoClient|\MongoDB\Client
|
||||
*/
|
||||
private $mongo;
|
||||
|
||||
/**
|
||||
|
@ -22,9 +22,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
||||
*/
|
||||
class WriteCheckSessionHandler implements \SessionHandlerInterface
|
||||
{
|
||||
/**
|
||||
* @var \SessionHandlerInterface
|
||||
*/
|
||||
private $wrappedSessionHandler;
|
||||
|
||||
/**
|
||||
|
@ -24,9 +24,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage;
|
||||
*/
|
||||
class MockFileSessionStorage extends MockArraySessionStorage
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $savePath;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy;
|
||||
@trigger_error('The '.__NAMESPACE__.'\NativeProxy class is deprecated since version 3.4 and will be removed in 4.0. Use your session handler implementation directly.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* This proxy is built-in session handlers in PHP 5.3.x
|
||||
* This proxy is built-in session handlers in PHP 5.3.x.
|
||||
*
|
||||
* @deprecated since version 3.4, to be removed in 4.0. Use your session handler implementation directly.
|
||||
*
|
||||
|
@ -16,9 +16,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy;
|
||||
*/
|
||||
class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface
|
||||
{
|
||||
/**
|
||||
* @var \SessionHandlerInterface
|
||||
*/
|
||||
protected $handler;
|
||||
|
||||
public function __construct(\SessionHandlerInterface $handler)
|
||||
|
@ -23,6 +23,7 @@ class MemcacheSessionHandlerTest extends TestCase
|
||||
{
|
||||
const PREFIX = 'prefix_';
|
||||
const TTL = 1000;
|
||||
|
||||
/**
|
||||
* @var MemcacheSessionHandler
|
||||
*/
|
||||
|
@ -24,8 +24,8 @@ class ValueExporter
|
||||
* Converts a PHP value to a string.
|
||||
*
|
||||
* @param mixed $value The PHP value
|
||||
* @param int $depth only for internal usage
|
||||
* @param bool $deep only for internal usage
|
||||
* @param int $depth Only for internal usage
|
||||
* @param bool $deep Only for internal usage
|
||||
*
|
||||
* @return string The string representation of the given value
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user