Merge branch '2.7'
* 2.7: [2.3] CS And DocBlock Fixes [Serializer] Serialization groups support [2.3] CS Fixes Fixed the issue 11116 [Security] Fixed tests [Debug] use ternary operator to simplify the getClassLoader() method in DebugClassLoader class. [FrameworkBundle] Fixed Translation loader and update translation command. [Console] remove « use » statement for PHP built-in exception classes. [SecurityBundle] replaced deprecated SecurityContextInterface dependency by new TokenStorageInterface instance in SecurityDataCollector. Also added unit tests suite for SecurityDataCollector class. [SecurityBundle] use TokenStorageInterface instead of deprecated SecurityContextInterface in SecurityDataCollector and added unit tests suite. [SecurityBundle] adds unit tests suite for SecurityDataCollector class. [Serializer] Add xml_format_output context option. Close #12517. [WebProfilerBundle] Fixed IE8 support
This commit is contained in:
commit
37909a407f
@ -24,6 +24,7 @@ class ContainerAwareEventManager extends EventManager
|
||||
{
|
||||
/**
|
||||
* Map of registered listeners.
|
||||
*
|
||||
* <event> => <listeners>
|
||||
*
|
||||
* @var array
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\Config\Resource\FileResource;
|
||||
|
||||
/**
|
||||
* Registers additional validators
|
||||
* Registers additional validators.
|
||||
*
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
@ -43,7 +43,7 @@ class DoctrineValidationPass implements CompilerPassInterface
|
||||
|
||||
/**
|
||||
* Gets the validation mapping files for the format and extends them with
|
||||
* files matching a doctrine search pattern (Resources/config/validation.orm.xml)
|
||||
* files matching a doctrine search pattern (Resources/config/validation.orm.xml).
|
||||
*
|
||||
* @param ContainerBuilder $container
|
||||
* @param string $mapping
|
||||
|
@ -35,12 +35,14 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
|
||||
/**
|
||||
* DI object for the driver to use, either a service definition for a
|
||||
* private service or a reference for a public service.
|
||||
*
|
||||
* @var Definition|Reference
|
||||
*/
|
||||
protected $driver;
|
||||
|
||||
/**
|
||||
* List of namespaces handled by the driver
|
||||
* List of namespaces handled by the driver.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $namespaces;
|
||||
@ -48,14 +50,16 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
|
||||
/**
|
||||
* List of potential container parameters that hold the object manager name
|
||||
* to register the mappings with the correct metadata driver, for example
|
||||
* array('acme.manager', 'doctrine.default_entity_manager')
|
||||
* array('acme.manager', 'doctrine.default_entity_manager').
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $managerParameters;
|
||||
|
||||
/**
|
||||
* Naming pattern of the metadata chain driver service ids, for example
|
||||
* 'doctrine.orm.%s_metadata_driver'
|
||||
* 'doctrine.orm.%s_metadata_driver'.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $driverPattern;
|
||||
@ -64,6 +68,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
|
||||
* A name for a parameter in the container. If set, this compiler pass will
|
||||
* only do anything if the parameter is present. (But regardless of the
|
||||
* value of that parameter.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $enabledParameter;
|
||||
|
@ -18,7 +18,7 @@ use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
|
||||
/**
|
||||
* A choice list presenting a list of Doctrine entities as choices
|
||||
* A choice list presenting a list of Doctrine entities as choices.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
@ -41,7 +41,7 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
|
||||
/**
|
||||
* Contains the query builder that builds the query for fetching the
|
||||
* entities
|
||||
* entities.
|
||||
*
|
||||
* This property should only be accessed through queryBuilder.
|
||||
*
|
||||
@ -50,21 +50,21 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
private $entityLoader;
|
||||
|
||||
/**
|
||||
* The identifier field, if the identifier is not composite
|
||||
* The identifier field, if the identifier is not composite.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $idField = null;
|
||||
|
||||
/**
|
||||
* Whether to use the identifier for index generation
|
||||
* Whether to use the identifier for index generation.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $idAsIndex = false;
|
||||
|
||||
/**
|
||||
* Whether to use the identifier for value generation
|
||||
* Whether to use the identifier for value generation.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
@ -98,7 +98,7 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
* the choices are given as flat array.
|
||||
* @param PropertyAccessorInterface $propertyAccessor The reflection graph for reading property paths.
|
||||
*/
|
||||
public function __construct(ObjectManager $manager, $class, $labelPath = null, EntityLoaderInterface $entityLoader = null, $entities = null, array $preferredEntities = array(), $groupPath = null, PropertyAccessorInterface $propertyAccessor = null)
|
||||
public function __construct(ObjectManager $manager, $class, $labelPath = null, EntityLoaderInterface $entityLoader = null, $entities = null, array $preferredEntities = array(), $groupPath = null, PropertyAccessorInterface $propertyAccessor = null)
|
||||
{
|
||||
$this->em = $manager;
|
||||
$this->entityLoader = $entityLoader;
|
||||
@ -128,7 +128,7 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of entities
|
||||
* Returns the list of entities.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
@ -144,7 +144,7 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the values for the entities
|
||||
* Returns the values for the entities.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
|
@ -17,13 +17,13 @@ use Doctrine\DBAL\Connection;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
|
||||
/**
|
||||
* Getting Entities through the ORM QueryBuilder
|
||||
* Getting Entities through the ORM QueryBuilder.
|
||||
*/
|
||||
class ORMQueryBuilderLoader implements EntityLoaderInterface
|
||||
{
|
||||
/**
|
||||
* Contains the query builder that builds the query for fetching the
|
||||
* entities
|
||||
* entities.
|
||||
*
|
||||
* This property should only be accessed through queryBuilder.
|
||||
*
|
||||
@ -32,7 +32,7 @@ class ORMQueryBuilderLoader implements EntityLoaderInterface
|
||||
private $queryBuilder;
|
||||
|
||||
/**
|
||||
* Construct an ORM Query Builder Loader
|
||||
* Construct an ORM Query Builder Loader.
|
||||
*
|
||||
* @param QueryBuilder|\Closure $queryBuilder
|
||||
* @param EntityManager $manager
|
||||
|
@ -39,7 +39,7 @@ interface RegistryInterface extends ManagerRegistryInterface
|
||||
public function getEntityManager($name = null);
|
||||
|
||||
/**
|
||||
* Gets an array of all registered entity managers
|
||||
* Gets an array of all registered entity managers.
|
||||
*
|
||||
* @return array An array of EntityManager instances
|
||||
*/
|
||||
|
@ -39,14 +39,14 @@ class DoctrineTokenProvider implements TokenProviderInterface
|
||||
{
|
||||
/**
|
||||
* Doctrine DBAL database connection
|
||||
* F.ex. service id: doctrine.dbal.default_connection
|
||||
* F.ex. service id: doctrine.dbal.default_connection.
|
||||
*
|
||||
* @var \Doctrine\DBAL\Connection
|
||||
*/
|
||||
private $conn;
|
||||
|
||||
/**
|
||||
* new DoctrineTokenProvider for the RememberMe authentication service
|
||||
* new DoctrineTokenProvider for the RememberMe authentication service.
|
||||
*
|
||||
* @param \Doctrine\DBAL\Connection $conn
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bridge\Doctrine\Tests;
|
||||
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
|
||||
|
||||
/**
|
||||
* Class DoctrineOrmTestCase
|
||||
* Class DoctrineOrmTestCase.
|
||||
*
|
||||
* @deprecated Deprecated as of Symfony 2.4, to be removed in Symfony 3.0.
|
||||
* Use {@link DoctrineTestHelper} instead.
|
||||
|
@ -27,6 +27,7 @@ class AssociationEntity
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="SingleIntIdEntity")
|
||||
*
|
||||
* @var \Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity
|
||||
*/
|
||||
public $single;
|
||||
@ -37,6 +38,7 @@ class AssociationEntity
|
||||
* @ORM\JoinColumn(name="composite_id1", referencedColumnName="id1"),
|
||||
* @ORM\JoinColumn(name="composite_id2", referencedColumnName="id2")
|
||||
* })
|
||||
*
|
||||
* @var \Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity
|
||||
*/
|
||||
public $composite;
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bridge\Doctrine\Validator\Constraints;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
||||
/**
|
||||
* Constraint for the Unique Entity validator
|
||||
* Constraint for the Unique Entity validator.
|
||||
*
|
||||
* @Annotation
|
||||
* @Target({"CLASS", "ANNOTATION"})
|
||||
|
@ -33,7 +33,7 @@ class ChromePhpHandler extends BaseChromePhpHandler
|
||||
private $response;
|
||||
|
||||
/**
|
||||
* Adds the headers to the response once it's created
|
||||
* Adds the headers to the response once it's created.
|
||||
*/
|
||||
public function onKernelResponse(FilterResponseEvent $event)
|
||||
{
|
||||
@ -72,7 +72,7 @@ class ChromePhpHandler extends BaseChromePhpHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Override default behavior since we check it in onKernelResponse
|
||||
* Override default behavior since we check it in onKernelResponse.
|
||||
*/
|
||||
protected function headersAccepted()
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ class FirePHPHandler extends BaseFirePHPHandler
|
||||
private $response;
|
||||
|
||||
/**
|
||||
* Adds the headers to the response once it's created
|
||||
* Adds the headers to the response once it's created.
|
||||
*/
|
||||
public function onKernelResponse(FilterResponseEvent $event)
|
||||
{
|
||||
@ -73,7 +73,7 @@ class FirePHPHandler extends BaseFirePHPHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Override default behavior since we check the user agent in onKernelResponse
|
||||
* Override default behavior since we check the user agent in onKernelResponse.
|
||||
*/
|
||||
protected function headersAccepted()
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Console\Event\ConsoleTerminateEvent;
|
||||
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
|
||||
|
||||
/**
|
||||
* Extended SwiftMailerHandler that flushes mail queue if necessary
|
||||
* Extended SwiftMailerHandler that flushes mail queue if necessary.
|
||||
*
|
||||
* @author Philipp Kräutli <pkraeutli@astina.ch>
|
||||
*/
|
||||
@ -35,7 +35,7 @@ class SwiftMailerHandler extends BaseSwiftMailerHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* After the kernel has been terminated we will always flush messages
|
||||
* After the kernel has been terminated we will always flush messages.
|
||||
*
|
||||
* @param PostResponseEvent $event
|
||||
*/
|
||||
@ -67,7 +67,7 @@ class SwiftMailerHandler extends BaseSwiftMailerHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Flushes the mail queue if a memory spool is used
|
||||
* Flushes the mail queue if a memory spool is used.
|
||||
*/
|
||||
private function flushMemorySpool()
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ use Monolog\Processor\WebProcessor as BaseWebProcessor;
|
||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||
|
||||
/**
|
||||
* WebProcessor override to read from the HttpFoundation's Request
|
||||
* WebProcessor override to read from the HttpFoundation's Request.
|
||||
*
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
*/
|
||||
|
@ -24,21 +24,21 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
||||
class PropelDataCollector extends DataCollector
|
||||
{
|
||||
/**
|
||||
* Propel logger
|
||||
* Propel logger.
|
||||
*
|
||||
* @var \Symfony\Bridge\Propel1\Logger\PropelLogger
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* Propel configuration
|
||||
* Propel configuration.
|
||||
*
|
||||
* @var \PropelConfiguration
|
||||
*/
|
||||
protected $propelConfiguration;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*
|
||||
* @param PropelLogger $logger A Propel logger.
|
||||
* @param \PropelConfiguration $propelConfiguration The Propel configuration object.
|
||||
|
@ -29,7 +29,7 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
class ModelChoiceList extends ObjectChoiceList
|
||||
{
|
||||
/**
|
||||
* The fields of which the identifier of the underlying class consists
|
||||
* The fields of which the identifier of the underlying class consists.
|
||||
*
|
||||
* This property should only be accessed through identifier.
|
||||
*
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
|
||||
/**
|
||||
* listener class for propel1_translatable_collection
|
||||
* listener class for propel1_translatable_collection.
|
||||
*
|
||||
* @author Patrick Kaufmann
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
|
||||
/**
|
||||
* Event Listener class for propel1_translation
|
||||
* Event Listener class for propel1_translation.
|
||||
*
|
||||
* @author Patrick Kaufmann
|
||||
*/
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
use Symfony\Bridge\Propel1\Form\EventListener\TranslationCollectionFormListener;
|
||||
|
||||
/**
|
||||
* form type for i18n-columns in propel
|
||||
* form type for i18n-columns in propel.
|
||||
*
|
||||
* @author Patrick Kaufmann
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
use Symfony\Bridge\Propel1\Form\EventListener\TranslationFormListener;
|
||||
|
||||
/**
|
||||
* Translation type class
|
||||
* Translation type class.
|
||||
*
|
||||
* @author Patrick Kaufmann
|
||||
*/
|
||||
|
@ -45,7 +45,7 @@ class PropelUserProvider implements UserProviderInterface
|
||||
protected $property;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
* Default constructor.
|
||||
*
|
||||
* @param string $class The User model class.
|
||||
* @param string|null $property The property to use to retrieve a user.
|
||||
|
@ -57,7 +57,7 @@ class ItemQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Method from the TableMap API
|
||||
* Method from the TableMap API.
|
||||
*/
|
||||
public function hasColumn($column)
|
||||
{
|
||||
@ -65,7 +65,7 @@ class ItemQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Method from the TableMap API
|
||||
* Method from the TableMap API.
|
||||
*/
|
||||
public function getColumn($column)
|
||||
{
|
||||
@ -75,7 +75,7 @@ class ItemQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Method from the TableMap API
|
||||
* Method from the TableMap API.
|
||||
*/
|
||||
public function hasColumnByInsensitiveCase($column)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ class RuntimeInstantiator implements InstantiatorInterface
|
||||
private $factory;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ class ProxyDumper implements DumperInterface
|
||||
private $classGenerator;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
/**
|
||||
* Integration tests for {@see \Symfony\Component\DependencyInjection\ContainerBuilder} combined
|
||||
* with the ProxyManager bridge
|
||||
* with the ProxyManager bridge.
|
||||
*
|
||||
* @author Marco Pivetta <ocramius@gmail.com>
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
|
||||
|
||||
/**
|
||||
* Integration tests for {@see \Symfony\Component\DependencyInjection\Dumper\PhpDumper} combined
|
||||
* with the ProxyManager bridge
|
||||
* with the ProxyManager bridge.
|
||||
*
|
||||
* @author Marco Pivetta <ocramius@gmail.com>
|
||||
*/
|
||||
@ -45,7 +45,7 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies that the generated container retrieves the same proxy instance on multiple subsequent requests
|
||||
* Verifies that the generated container retrieves the same proxy instance on multiple subsequent requests.
|
||||
*/
|
||||
public function testDumpContainerWithProxyServiceWillShareProxies()
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ use Symfony\Component\DependencyInjection\Parameter;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* ProjectServiceContainer
|
||||
* ProjectServiceContainer.
|
||||
*
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
|
||||
/**
|
||||
* Tests for {@see \Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator}
|
||||
* Tests for {@see \Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator}.
|
||||
*
|
||||
* @author Marco Pivetta <ocramius@gmail.com>
|
||||
*
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
|
||||
/**
|
||||
* Tests for {@see \Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper}
|
||||
* Tests for {@see \Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper}.
|
||||
*
|
||||
* @author Marco Pivetta <ocramius@gmail.com>
|
||||
*
|
||||
|
@ -29,6 +29,7 @@ abstract class ContainerAwareCommand extends Command implements ContainerAwareIn
|
||||
|
||||
/**
|
||||
* @return ContainerInterface
|
||||
*
|
||||
* @throws \LogicException
|
||||
*/
|
||||
protected function getContainer()
|
||||
|
@ -136,6 +136,13 @@ EOF
|
||||
? new DiffOperation($currentCatalogue, $extractedCatalogue)
|
||||
: new MergeOperation($currentCatalogue, $extractedCatalogue);
|
||||
|
||||
// Exit if no messages found.
|
||||
if (!count($operation->getDomains())) {
|
||||
$output->writeln("\n<comment>No translation found.</comment>");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// show compiled list of messages
|
||||
if ($input->getOption('dump-messages') === true) {
|
||||
foreach ($operation->getDomains() as $domain) {
|
||||
|
@ -249,7 +249,7 @@ class Controller extends ContainerAware
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a form builder instance
|
||||
* Creates and returns a form builder instance.
|
||||
*
|
||||
* @param mixed $data The initial data for the form
|
||||
* @param array $options Options for the form
|
||||
@ -294,7 +294,7 @@ class Controller extends ContainerAware
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a user from the Security Context
|
||||
* Get a user from the Security Context.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Adds all services with the tags "form.type" and "form.type_guesser" as
|
||||
* arguments of the "form.extension" service
|
||||
* arguments of the "form.extension" service.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Adds tagged data_collector services to profiler service
|
||||
* Adds tagged data_collector services to profiler service.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Adds tagged routing.loader services to routing.resolver service
|
||||
* Adds tagged routing.loader services to routing.resolver service.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Adds tagged translation.formatter services to translation writer
|
||||
* Adds tagged translation.formatter services to translation writer.
|
||||
*/
|
||||
class TranslationDumperPass implements CompilerPassInterface
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Adds tagged translation.extractor services to translation extractor
|
||||
* Adds tagged translation.extractor services to translation extractor.
|
||||
*/
|
||||
class TranslationExtractorPass implements CompilerPassInterface
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ class RequestHelper extends Helper
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the locale
|
||||
* Returns the locale.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -44,7 +44,7 @@ class SessionHelper extends Helper
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an attribute
|
||||
* Returns an attribute.
|
||||
*
|
||||
* @param string $name The attribute name
|
||||
* @param mixed $default The default value
|
||||
|
@ -34,7 +34,7 @@ class TemplateReference extends BaseTemplateReference
|
||||
/**
|
||||
* Returns the path to the template
|
||||
* - as a path when the template is not part of a bundle
|
||||
* - as a resource when the template is part of a bundle
|
||||
* - as a resource when the template is part of a bundle.
|
||||
*
|
||||
* @return string A path to the template or a resource
|
||||
*/
|
||||
|
@ -26,8 +26,9 @@ class ProfilerPassTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Tests that collectors that specify a template but no "id" will throw
|
||||
* an exception (both are needed if the template is specified). Thus,
|
||||
* a fully-valid tag looks something like this:
|
||||
* an exception (both are needed if the template is specified).
|
||||
*
|
||||
* Thus, a fully-valid tag looks something like this:
|
||||
*
|
||||
* <tag name="data_collector" template="YourBundle:Collector:templatename" id="your_collector_name" />
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass;
|
||||
|
||||
/**
|
||||
* Tests for the SerializerPass class
|
||||
* Tests for the SerializerPass class.
|
||||
*
|
||||
* @author Javier Lopez <f12loalf@gmail.com>
|
||||
*/
|
||||
|
@ -18,8 +18,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplate
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
|
||||
use Symfony\Component\Templating\PhpEngine;
|
||||
use Symfony\Component\Templating\Loader\FilesystemLoader;
|
||||
|
||||
// should probably be moved to the Translation component
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper;
|
||||
|
||||
class FormHelperDivLayoutTest extends AbstractDivLayoutTest
|
||||
|
@ -18,8 +18,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplate
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
|
||||
use Symfony\Component\Templating\PhpEngine;
|
||||
use Symfony\Component\Templating\Loader\FilesystemLoader;
|
||||
|
||||
// should probably be moved to the Translation component
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper;
|
||||
|
||||
class FormHelperTableLayoutTest extends AbstractTableLayoutTest
|
||||
|
@ -103,7 +103,7 @@ class PhpExtractor implements ExtractorInterface
|
||||
|
||||
/**
|
||||
* Extracts the message from the iterator while the tokens
|
||||
* match allowed message tokens
|
||||
* match allowed message tokens.
|
||||
*/
|
||||
private function getMessage(\Iterator $tokenIterator)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ class PhpStringTokenParser
|
||||
if ('\'' === $str[$bLength]) {
|
||||
return str_replace(
|
||||
array('\\\\', '\\\''),
|
||||
array( '\\', '\''),
|
||||
array( '\\', '\''),
|
||||
substr($str, $bLength + 1, -1)
|
||||
);
|
||||
} else {
|
||||
|
@ -31,6 +31,7 @@ class TranslationLoader
|
||||
|
||||
/**
|
||||
* Adds a loader to the translation extractor.
|
||||
*
|
||||
* @param string $format The format of the loader
|
||||
* @param LoaderInterface $loader
|
||||
*/
|
||||
@ -47,6 +48,10 @@ class TranslationLoader
|
||||
*/
|
||||
public function loadMessages($directory, MessageCatalogue $catalogue)
|
||||
{
|
||||
if (!is_dir($directory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->loaders as $format => $loader) {
|
||||
// load any existing translation files
|
||||
$finder = new Finder();
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
||||
/**
|
||||
* Installs the tables required by the ACL system
|
||||
* Installs the tables required by the ACL system.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*/
|
||||
|
@ -11,11 +11,12 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\DataCollector;
|
||||
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
|
||||
use Symfony\Component\Security\Core\SecurityContextInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
||||
use Symfony\Component\Security\Core\Role\RoleInterface;
|
||||
|
||||
/**
|
||||
* SecurityDataCollector.
|
||||
@ -24,12 +25,18 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
||||
*/
|
||||
class SecurityDataCollector extends DataCollector
|
||||
{
|
||||
private $context;
|
||||
private $tokenStorage;
|
||||
private $roleHierarchy;
|
||||
|
||||
public function __construct(SecurityContextInterface $context = null, RoleHierarchyInterface $roleHierarchy = null)
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param TokenStorageInterface|null $tokenStorage
|
||||
* @param RoleHierarchyInterface|null $roleHierarchy
|
||||
*/
|
||||
public function __construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null)
|
||||
{
|
||||
$this->context = $context;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
$this->roleHierarchy = $roleHierarchy;
|
||||
}
|
||||
|
||||
@ -38,7 +45,7 @@ class SecurityDataCollector extends DataCollector
|
||||
*/
|
||||
public function collect(Request $request, Response $response, \Exception $exception = null)
|
||||
{
|
||||
if (null === $this->context) {
|
||||
if (null === $this->tokenStorage) {
|
||||
$this->data = array(
|
||||
'enabled' => false,
|
||||
'authenticated' => false,
|
||||
@ -48,7 +55,7 @@ class SecurityDataCollector extends DataCollector
|
||||
'inherited_roles' => array(),
|
||||
'supports_role_hierarchy' => null !== $this->roleHierarchy,
|
||||
);
|
||||
} elseif (null === $token = $this->context->getToken()) {
|
||||
} elseif (null === $token = $this->tokenStorage->getToken()) {
|
||||
$this->data = array(
|
||||
'enabled' => true,
|
||||
'authenticated' => false,
|
||||
@ -74,8 +81,8 @@ class SecurityDataCollector extends DataCollector
|
||||
'authenticated' => $token->isAuthenticated(),
|
||||
'token_class' => get_class($token),
|
||||
'user' => $token->getUsername(),
|
||||
'roles' => array_map(function ($role) { return $role->getRole();}, $assignedRoles),
|
||||
'inherited_roles' => array_map(function ($role) { return $role->getRole();}, $inheritedRoles),
|
||||
'roles' => array_map(function (RoleInterface $role) { return $role->getRole();}, $assignedRoles),
|
||||
'inherited_roles' => array_map(function (RoleInterface $role) { return $role->getRole(); }, $inheritedRoles),
|
||||
'supports_role_hierarchy' => null !== $this->roleHierarchy,
|
||||
);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Adds all configured security voters to the access decision manager
|
||||
* Adds all configured security voters to the access decision manager.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*/
|
||||
|
@ -18,7 +18,9 @@ use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
/**
|
||||
* This class contains the configuration information for the following tags:
|
||||
* This class contains the configuration information.
|
||||
*
|
||||
* This information is for the following tags:
|
||||
*
|
||||
* * security.config
|
||||
* * security.acl
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
/**
|
||||
* AbstractFactory is the base class for all classes inheriting from
|
||||
* AbstractAuthenticationListener
|
||||
* AbstractAuthenticationListener.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Lukas Kahwe Smith <smith@pooteeweet.org>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<services>
|
||||
<service id="data_collector.security" class="%data_collector.security.class%" public="false">
|
||||
<tag name="data_collector" template="@Security/Collector/security.html.twig" id="security" />
|
||||
<argument type="service" id="security.context" on-invalid="ignore" />
|
||||
<argument type="service" id="security.token_storage" on-invalid="ignore" />
|
||||
<argument type="service" id="security.role_hierarchy" />
|
||||
</service>
|
||||
</services>
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* This is a lazy-loading firewall map implementation
|
||||
* This is a lazy-loading firewall map implementation.
|
||||
*
|
||||
* Listeners will only be initialized if we really need them.
|
||||
*
|
||||
|
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\DataCollector;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Security\Core\Role\RoleHierarchy;
|
||||
|
||||
class SecurityDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testCollectWhenSecurityIsDisabled()
|
||||
{
|
||||
$collector = new SecurityDataCollector();
|
||||
$collector->collect($this->getRequest(), $this->getResponse());
|
||||
|
||||
$this->assertSame('security', $collector->getName());
|
||||
$this->assertFalse($collector->isEnabled());
|
||||
$this->assertFalse($collector->isAuthenticated());
|
||||
$this->assertNull($collector->getTokenClass());
|
||||
$this->assertFalse($collector->supportsRoleHierarchy());
|
||||
$this->assertCount(0, $collector->getRoles());
|
||||
$this->assertCount(0, $collector->getInheritedRoles());
|
||||
$this->assertEmpty($collector->getUser());
|
||||
}
|
||||
|
||||
/** @dataProvider provideTokenStorage */
|
||||
public function testCollectWhenAuthenticationTokenIsNull($tokenStorage)
|
||||
{
|
||||
$collector = new SecurityDataCollector($tokenStorage, $this->getRoleHierarchy());
|
||||
$collector->collect($this->getRequest(), $this->getResponse());
|
||||
|
||||
$this->assertTrue($collector->isEnabled());
|
||||
$this->assertFalse($collector->isAuthenticated());
|
||||
$this->assertNull($collector->getTokenClass());
|
||||
$this->assertTrue($collector->supportsRoleHierarchy());
|
||||
$this->assertCount(0, $collector->getRoles());
|
||||
$this->assertCount(0, $collector->getInheritedRoles());
|
||||
$this->assertEmpty($collector->getUser());
|
||||
}
|
||||
|
||||
public function provideTokenStorage()
|
||||
{
|
||||
return array(
|
||||
array(new TokenStorage()),
|
||||
array($this->getMock('Symfony\Component\Security\Core\SecurityContextInterface')),
|
||||
);
|
||||
}
|
||||
|
||||
/** @dataProvider provideRoles */
|
||||
public function testCollectAuthenticationTokenAndRoles(array $roles, array $normalizedRoles, array $inheritedRoles)
|
||||
{
|
||||
$tokenStorage = new TokenStorage();
|
||||
$tokenStorage->setToken(new UsernamePasswordToken('hhamon', 'P4$$w0rD', 'provider', $roles));
|
||||
|
||||
$collector = new SecurityDataCollector($tokenStorage, $this->getRoleHierarchy());
|
||||
$collector->collect($this->getRequest(), $this->getResponse());
|
||||
|
||||
$this->assertTrue($collector->isEnabled());
|
||||
$this->assertTrue($collector->isAuthenticated());
|
||||
$this->assertSame('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $collector->getTokenClass());
|
||||
$this->assertTrue($collector->supportsRoleHierarchy());
|
||||
$this->assertSame($normalizedRoles, $collector->getRoles());
|
||||
$this->assertSame($inheritedRoles, $collector->getInheritedRoles());
|
||||
$this->assertSame('hhamon', $collector->getUser());
|
||||
}
|
||||
|
||||
public function provideRoles()
|
||||
{
|
||||
return array(
|
||||
// Basic roles
|
||||
array(
|
||||
array('ROLE_USER'),
|
||||
array('ROLE_USER'),
|
||||
array(),
|
||||
),
|
||||
array(
|
||||
array(new Role('ROLE_USER')),
|
||||
array('ROLE_USER'),
|
||||
array(),
|
||||
),
|
||||
// Inherited roles
|
||||
array(
|
||||
array('ROLE_ADMIN'),
|
||||
array('ROLE_ADMIN'),
|
||||
array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'),
|
||||
),
|
||||
array(
|
||||
array(new Role('ROLE_ADMIN')),
|
||||
array('ROLE_ADMIN'),
|
||||
array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
private function getRoleHierarchy()
|
||||
{
|
||||
return new RoleHierarchy(array(
|
||||
'ROLE_ADMIN' => array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'),
|
||||
));
|
||||
}
|
||||
|
||||
private function getRequest()
|
||||
{
|
||||
return $this
|
||||
->getMockBuilder('Symfony\Component\HttpFoundation\Request')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
|
||||
private function getResponse()
|
||||
{
|
||||
return $this
|
||||
->getMockBuilder('Symfony\Component\HttpFoundation\Response')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
}
|
@ -10,7 +10,6 @@ class DummyProvider implements UserProviderFactoryInterface
|
||||
{
|
||||
public function create(ContainerBuilder $container, $id, $config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getKey()
|
||||
@ -20,6 +19,5 @@ class DummyProvider implements UserProviderFactoryInterface
|
||||
|
||||
public function addConfiguration(NodeDefinition $node)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Adds tagged twig.extension services to twig service
|
||||
* Adds tagged twig.extension services to twig service.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
|
||||
/**
|
||||
* Adds services tagged twig.loader as Twig loaders
|
||||
* Adds services tagged twig.loader as Twig loaders.
|
||||
*
|
||||
* @author Daniel Leech <daniel@dantleech.com>
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Twig extension for Symfony actions helper
|
||||
* Twig extension for Symfony actions helper.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
/**
|
||||
* Twig extension for Symfony assets helper
|
||||
* Twig extension for Symfony assets helper.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
/**
|
||||
* This class contains the configuration information for the bundle
|
||||
* This class contains the configuration information for the bundle.
|
||||
*
|
||||
* This information is solely responsible for how the different configuration
|
||||
* sections are normalized, and merged.
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\Profiler\Profiler;
|
||||
use Symfony\Component\HttpKernel\Profiler\Profile;
|
||||
|
||||
/**
|
||||
* Profiler Templates Manager
|
||||
* Profiler Templates Manager.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Artur Wielogórski <wodor@wodor.net>
|
||||
|
@ -70,12 +70,12 @@
|
||||
requestStack = [],
|
||||
|
||||
renderAjaxRequests = function() {
|
||||
var requestCounter = document.getElementsByClassName('sf-toolbar-ajax-requests');
|
||||
var requestCounter = document.querySelectorAll('.sf-toolbar-ajax-requests');
|
||||
if (!requestCounter.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var tbodies = document.getElementsByClassName('sf-toolbar-ajax-request-list');
|
||||
var tbodies = document.querySelectorAll('.sf-toolbar-ajax-request-list');
|
||||
var state = 'ok';
|
||||
if (tbodies.length) {
|
||||
var tbody = tbodies[0];
|
||||
@ -136,7 +136,7 @@
|
||||
row.className = 'sf-ajax-request sf-ajax-request-' + requestState;
|
||||
}
|
||||
|
||||
var infoSpan = document.getElementsByClassName("sf-toolbar-ajax-info")[0];
|
||||
var infoSpan = document.querySelectorAll(".sf-toolbar-ajax-info")[0];
|
||||
var children = Array.prototype.slice.call(tbody.children);
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
tbody.removeChild(children[i]);
|
||||
|
@ -24,7 +24,7 @@ class WebProfilerExtensionTest extends TestCase
|
||||
{
|
||||
private $kernel;
|
||||
/**
|
||||
* @var Symfony\Component\DependencyInjection\Container $container
|
||||
* @var Symfony\Component\DependencyInjection\Container
|
||||
*/
|
||||
private $container;
|
||||
|
||||
|
@ -66,7 +66,7 @@ class TemplateManagerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* if template exists in both profile and profiler then its name should be returned
|
||||
* if template exists in both profile and profiler then its name should be returned.
|
||||
*/
|
||||
public function testGetNameValidTemplate()
|
||||
{
|
||||
@ -85,7 +85,7 @@ class TemplateManagerTest extends TestCase
|
||||
|
||||
/**
|
||||
* template should be loaded for 'foo' because other collectors are
|
||||
* missing in profile or in profiler
|
||||
* missing in profile or in profiler.
|
||||
*/
|
||||
public function testGetTemplates()
|
||||
{
|
||||
|
@ -44,10 +44,9 @@ class ApcClassLoader
|
||||
private $prefix;
|
||||
|
||||
/**
|
||||
* The class loader object being decorated.
|
||||
* A class loader object that implements the findFile() method.
|
||||
*
|
||||
* @var object
|
||||
* A class loader object that implements the findFile() method.
|
||||
*/
|
||||
protected $decorated;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Component\ClassLoader;
|
||||
|
||||
/**
|
||||
* ClassLoader implements an PSR-0 class loader
|
||||
* ClassLoader implements an PSR-0 class loader.
|
||||
*
|
||||
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
|
||||
*
|
||||
@ -76,7 +76,7 @@ class ClassLoader
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of classes
|
||||
* Registers a set of classes.
|
||||
*
|
||||
* @param string $prefix The classes prefix
|
||||
* @param array|string $paths The location(s) of the classes
|
||||
|
@ -20,14 +20,14 @@ if (!defined('SYMFONY_TRAIT')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* ClassMapGenerator
|
||||
* ClassMapGenerator.
|
||||
*
|
||||
* @author Gyula Sallai <salla016@gmail.com>
|
||||
*/
|
||||
class ClassMapGenerator
|
||||
{
|
||||
/**
|
||||
* Generate a class map file
|
||||
* Generate a class map file.
|
||||
*
|
||||
* @param array|string $dirs Directories or a single path to search in
|
||||
* @param string $file The name of the class map file
|
||||
@ -45,7 +45,7 @@ class ClassMapGenerator
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate over all files in the given directory searching for classes
|
||||
* Iterate over all files in the given directory searching for classes.
|
||||
*
|
||||
* @param \Iterator|string $dir The directory to search in or an iterator
|
||||
*
|
||||
@ -81,7 +81,7 @@ class ClassMapGenerator
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the classes in the given file
|
||||
* Extract the classes in the given file.
|
||||
*
|
||||
* @param string $path The file to check
|
||||
*
|
||||
|
@ -82,7 +82,7 @@ class DebugClassLoader
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a file by class name
|
||||
* Finds a file by class name.
|
||||
*
|
||||
* @param string $class A class name to resolve to file
|
||||
*
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\ClassLoader\ClassMapGenerator;
|
||||
class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var string $workspace
|
||||
* @var string|null
|
||||
*/
|
||||
private $workspace = null;
|
||||
|
||||
|
@ -72,7 +72,7 @@ class UniversalClassLoader
|
||||
|
||||
/**
|
||||
* Turns on searching the include for class files. Allows easy loading
|
||||
* of installed PEAR packages
|
||||
* of installed PEAR packages.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*/
|
||||
@ -177,7 +177,7 @@ class UniversalClassLoader
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers an array of namespaces
|
||||
* Registers an array of namespaces.
|
||||
*
|
||||
* @param array $namespaces An array of namespaces (namespaces as keys and locations as values)
|
||||
*
|
||||
|
@ -43,10 +43,9 @@ class WinCacheClassLoader
|
||||
private $prefix;
|
||||
|
||||
/**
|
||||
* The class loader object being decorated.
|
||||
* A class loader object that implements the findFile() method.
|
||||
*
|
||||
* @var \Symfony\Component\ClassLoader\ClassLoader
|
||||
* A class loader object that implements the findFile() method.
|
||||
* @var object
|
||||
*/
|
||||
protected $decorated;
|
||||
|
||||
|
@ -45,7 +45,9 @@ class XcacheClassLoader
|
||||
private $prefix;
|
||||
|
||||
/**
|
||||
* @var object A class loader object that implements the findFile() method
|
||||
* A class loader object that implements the findFile() method.
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
private $decorated;
|
||||
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
||||
use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
|
||||
|
||||
/**
|
||||
* The base node class
|
||||
* The base node class.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*/
|
||||
@ -182,7 +182,7 @@ abstract class BaseNode implements NodeInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this node
|
||||
* Returns the name of this node.
|
||||
*
|
||||
* @return string The Node's name.
|
||||
*/
|
||||
|
@ -329,7 +329,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a node builder to be used to add children and prototype
|
||||
* Returns a node builder to be used to add children and prototype.
|
||||
*
|
||||
* @return NodeBuilder The node builder
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ class BooleanNodeDefinition extends ScalarNodeDefinition
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate a Node
|
||||
* Instantiate a Node.
|
||||
*
|
||||
* @return BooleanNode The node
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@ class EnumNodeDefinition extends ScalarNodeDefinition
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate a Node
|
||||
* Instantiate a Node.
|
||||
*
|
||||
* @return EnumNode The node
|
||||
*
|
||||
|
@ -26,7 +26,7 @@ class ExprBuilder
|
||||
public $thenPart;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
@ -196,7 +196,7 @@ class ExprBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the related node
|
||||
* Returns the related node.
|
||||
*
|
||||
* @return NodeDefinition
|
||||
*
|
||||
|
@ -23,7 +23,7 @@ class MergeBuilder
|
||||
public $allowOverwrite = true;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
|
@ -22,8 +22,7 @@ class NodeBuilder implements NodeParentInterface
|
||||
protected $nodeMapping;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ abstract class NodeDefinition implements NodeParentInterface
|
||||
protected $attributes = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name The name of the node
|
||||
* @param NodeParentInterface|null $parent The parent
|
||||
@ -333,7 +333,7 @@ abstract class NodeDefinition implements NodeParentInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate and configure the node according to this definition
|
||||
* Instantiate and configure the node according to this definition.
|
||||
*
|
||||
* @return NodeInterface $node The node instance
|
||||
*
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Component\Config\Definition\Builder;
|
||||
|
||||
/**
|
||||
* An interface that must be implemented by all node parents
|
||||
* An interface that must be implemented by all node parents.
|
||||
*
|
||||
* @author Victor Berchet <victor@suumit.com>
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ class NormalizationBuilder
|
||||
public $remappings = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Component\Config\Definition\Builder;
|
||||
|
||||
/**
|
||||
* An interface that must be implemented by nodes which can have children
|
||||
* An interface that must be implemented by nodes which can have children.
|
||||
*
|
||||
* @author Victor Berchet <victor@suumit.com>
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@ use Symfony\Component\Config\Definition\ScalarNode;
|
||||
class ScalarNodeDefinition extends VariableNodeDefinition
|
||||
{
|
||||
/**
|
||||
* Instantiate a Node
|
||||
* Instantiate a Node.
|
||||
*
|
||||
* @return ScalarNode The node
|
||||
*/
|
||||
|
@ -22,7 +22,7 @@ class ValidationBuilder
|
||||
public $rules = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*
|
||||
* @param NodeDefinition $node The related node
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@ use Symfony\Component\Config\Definition\VariableNode;
|
||||
class VariableNodeDefinition extends NodeDefinition
|
||||
{
|
||||
/**
|
||||
* Instantiate a Node
|
||||
* Instantiate a Node.
|
||||
*
|
||||
* @return VariableNode The node
|
||||
*/
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Component\Config\Definition;
|
||||
|
||||
/**
|
||||
* Configuration interface
|
||||
* Configuration interface.
|
||||
*
|
||||
* @author Victor Berchet <victor@suumit.com>
|
||||
*/
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Component\Config\Definition\Exception;
|
||||
|
||||
/**
|
||||
* Base exception for all configuration exceptions
|
||||
* Base exception for all configuration exceptions.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*/
|
||||
|
@ -52,7 +52,8 @@ interface NodeInterface
|
||||
/**
|
||||
* Returns the default value of the node.
|
||||
*
|
||||
* @return mixed The default value
|
||||
* @return mixed The default value
|
||||
*
|
||||
* @throws \RuntimeException if the node has no default value
|
||||
*/
|
||||
public function getDefaultValue();
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Component\Config\Definition;
|
||||
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
||||
|
||||
/**
|
||||
* This node represents a numeric value in the config tree
|
||||
* This node represents a numeric value in the config tree.
|
||||
*
|
||||
* @author David Jeanmonod <david.jeanmonod@gmail.com>
|
||||
*/
|
||||
|
@ -155,7 +155,7 @@ class PrototypedArrayNode extends ArrayNode
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the prototype
|
||||
* Retrieves the prototype.
|
||||
*
|
||||
* @return PrototypeNodeInterface The prototype
|
||||
*/
|
||||
|
@ -50,7 +50,7 @@ class DirectoryResource implements ResourceInterface, \Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pattern to restrict monitored files
|
||||
* Returns the pattern to restrict monitored files.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
|
@ -202,12 +202,11 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that the given test builder, will return the given value
|
||||
* Assert that the given test builder, will return the given value.
|
||||
*
|
||||
* @param mixed $value The value to test
|
||||
* @param TreeBuilder $treeBuilder The tree builder to finalize
|
||||
*
|
||||
* @param mixed $config The config values that new to be finalized
|
||||
* @param mixed $config The config values that new to be finalized
|
||||
*/
|
||||
protected function assertFinalizedValueIs($value, $treeBuilder, $config = null)
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ class PrototypedArrayNodeTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that when a key attribute is mapped, that key is removed from the array:
|
||||
* Tests that when a key attribute is mapped, that key is removed from the array.
|
||||
*
|
||||
* <things>
|
||||
* <option id="option1" value="foo">
|
||||
|
@ -22,7 +22,7 @@ namespace Symfony\Component\Config\Util;
|
||||
class XmlUtils
|
||||
{
|
||||
/**
|
||||
* This class should not be instantiated
|
||||
* This class should not be instantiated.
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ class Application
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an input definition set to be used with this application
|
||||
* Set an input definition set to be used with this application.
|
||||
*
|
||||
* @param InputDefinition $definition The input definition
|
||||
*
|
||||
@ -736,7 +736,7 @@ class Application
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to figure out the terminal width in which this application runs
|
||||
* Tries to figure out the terminal width in which this application runs.
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
@ -748,7 +748,7 @@ class Application
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to figure out the terminal height in which this application runs
|
||||
* Tries to figure out the terminal height in which this application runs.
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
@ -760,7 +760,7 @@ class Application
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to figure out the terminal dimensions based on the current environment
|
||||
* Tries to figure out the terminal dimensions based on the current environment.
|
||||
*
|
||||
* @return array Array containing width and height
|
||||
*/
|
||||
@ -960,7 +960,7 @@ class Application
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs and parses stty -a if it's available, suppressing any error output
|
||||
* Runs and parses stty -a if it's available, suppressing any error output.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -983,7 +983,7 @@ class Application
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs and parses mode CON if it's available, suppressing any error output
|
||||
* Runs and parses mode CON if it's available, suppressing any error output.
|
||||
*
|
||||
* @return string <width>x<height> or null if it could not be parsed
|
||||
*/
|
||||
@ -1039,7 +1039,7 @@ class Application
|
||||
|
||||
/**
|
||||
* Finds alternative of $name among $collection,
|
||||
* if nothing is found in $collection, try in $abbrevs
|
||||
* if nothing is found in $collection, try in $abbrevs.
|
||||
*
|
||||
* @param string $name The string
|
||||
* @param array|\Traversable $collection The collection
|
||||
|
@ -129,7 +129,7 @@ class Command
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the command is enabled or not in the current environment
|
||||
* Checks whether the command is enabled or not in the current environment.
|
||||
*
|
||||
* Override this to check for x or y and return false if the command can not
|
||||
* run properly under the current conditions.
|
||||
@ -162,6 +162,7 @@ class Command
|
||||
* @return null|int null or 0 if everything went fine, or an error code
|
||||
*
|
||||
* @throws \LogicException When this abstract method is not implemented
|
||||
*
|
||||
* @see setCode()
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
|
@ -58,7 +58,7 @@ EOF
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the command
|
||||
* Sets the command.
|
||||
*
|
||||
* @param Command $command The command to set
|
||||
*/
|
||||
|
@ -160,7 +160,6 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
||||
* @param string $option The option name
|
||||
*
|
||||
* @throws \InvalidArgumentException When the option name isn't defined
|
||||
*
|
||||
*/
|
||||
public function unsetOption($option)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user