Skip to content

Commit 7398276

Browse files
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
2 parents 4ac7aa8 + b354d6c commit 7398276

File tree

202 files changed

+1555
-2323
lines changed

Some content is hidden

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

202 files changed

+1555
-2323
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
*/
2222
class DoctrineValidationPass implements CompilerPassInterface
2323
{
24-
/**
25-
* @var string
26-
*/
2724
private $managerType;
2825

26+
/**
27+
* @param string $managerType
28+
*/
2929
public function __construct($managerType)
3030
{
3131
$this->managerType = $managerType;

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
113113
* present to enable the mapping. Set to false
114114
* to not do any check, optional.
115115
* @param string $configurationPattern Pattern for the Configuration service name
116-
* @param string $registerAliasMethodName name of Configuration class method to
116+
* @param string $registerAliasMethodName Name of Configuration class method to
117117
* register alias
118118
* @param string[] $aliasMap Map of alias to namespace
119119
*/
@@ -178,7 +178,7 @@ protected function getChainDriverServiceName(ContainerBuilder $container)
178178
/**
179179
* Create the service definition for the metadata driver.
180180
*
181-
* @param ContainerBuilder $container passed on in case an extending class
181+
* @param ContainerBuilder $container Passed on in case an extending class
182182
* needs access to the container
183183
*
184184
* @return Definition|Reference the metadata driver to add to all chain drivers

src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
*/
2525
class DoctrineParserCache implements ParserCacheInterface
2626
{
27-
/**
28-
* @var Cache
29-
*/
3027
private $cache;
3128

3229
public function __construct(Cache $cache)

src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,9 @@
2424
*/
2525
class DoctrineChoiceLoader implements ChoiceLoaderInterface
2626
{
27-
/**
28-
* @var ObjectManager
29-
*/
3027
private $manager;
31-
32-
/**
33-
* @var string
34-
*/
3528
private $class;
36-
37-
/**
38-
* @var IdReader
39-
*/
4029
private $idReader;
41-
42-
/**
43-
* @var null|EntityLoaderInterface
44-
*/
4530
private $objectLoader;
4631

4732
/**
@@ -57,13 +42,10 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
5742
* mapper implementations.
5843
*
5944
* @param ObjectManager $manager The object manager
60-
* @param string $class The class name of the
61-
* loaded objects
62-
* @param IdReader $idReader the reader for the object
63-
* IDs
45+
* @param string $class The class name of the loaded objects
46+
* @param IdReader $idReader The reader for the object IDs
6447
* @param null|EntityLoaderInterface $objectLoader The objects loader
65-
* @param ChoiceListFactoryInterface $factory The factory for creating
66-
* the loaded choice list
48+
* @param ChoiceListFactoryInterface $factory The factory for creating the loaded choice list
6749
*/
6850
public function __construct($manager, $class, $idReader = null, $objectLoader = null, $factory = null)
6951
{

src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,10 @@
2424
*/
2525
class IdReader
2626
{
27-
/**
28-
* @var ObjectManager
29-
*/
3027
private $om;
31-
32-
/**
33-
* @var ClassMetadata
34-
*/
3528
private $classMetadata;
36-
37-
/**
38-
* @var bool
39-
*/
4029
private $singleId;
41-
42-
/**
43-
* @var bool
44-
*/
4530
private $intId;
46-
47-
/**
48-
* @var string
49-
*/
5031
private $idField;
5132

5233
/**

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
*/
2828
class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface
2929
{
30-
/**
31-
* @var ClassMetadataFactory
32-
*/
3330
private $classMetadataFactory;
3431

3532
public function __construct(ClassMetadataFactory $classMetadataFactory)

src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
*/
2727
class UniqueEntityValidator extends ConstraintValidator
2828
{
29-
/**
30-
* @var ManagerRegistry
31-
*/
3229
private $registry;
3330

3431
public function __construct(ManagerRegistry $registry)

src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,8 @@
2626
*/
2727
class ProxyDumper implements DumperInterface
2828
{
29-
/**
30-
* @var string
31-
*/
3229
private $salt;
33-
34-
/**
35-
* @var LazyLoadingValueHolderGenerator
36-
*/
3730
private $proxyGenerator;
38-
39-
/**
40-
* @var BaseGeneratorStrategy
41-
*/
4231
private $classGenerator;
4332

4433
/**

src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
class StopwatchExtension extends AbstractExtension
2424
{
2525
private $stopwatch;
26-
27-
/**
28-
* @var bool
29-
*/
3026
private $enabled;
3127

3228
public function __construct(Stopwatch $stopwatch = null, $enabled = true)

src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
*/
3131
class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
3232
{
33-
/**
34-
* @var Scope
35-
*/
3633
private $scope;
3734

3835
public function __construct()

src/Symfony/Bridge/Twig/Translation/TwigExtractor.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface
4242
*/
4343
private $prefix = '';
4444

45-
/**
46-
* The twig environment.
47-
*
48-
* @var Environment
49-
*/
5045
private $twig;
5146

5247
public function __construct(Environment $twig)

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Controller;
1313

14+
use Doctrine\Common\Persistence\ManagerRegistry;
1415
use Psr\Container\ContainerInterface;
1516
use Symfony\Component\HttpFoundation\BinaryFileResponse;
1617
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -23,10 +24,9 @@
2324
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
2425
use Symfony\Component\Security\Csrf\CsrfToken;
2526
use Symfony\Component\Form\Extension\Core\Type\FormType;
26-
use Symfony\Component\Form\Form;
27-
use Symfony\Component\Form\FormBuilder;
27+
use Symfony\Component\Form\FormInterface;
28+
use Symfony\Component\Form\FormBuilderInterface;
2829
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
29-
use Doctrine\Bundle\DoctrineBundle\Registry;
3030

3131
/**
3232
* Common features needed in controllers.
@@ -71,7 +71,7 @@ protected function get($id)
7171
* Generates a URL from the given parameters.
7272
*
7373
* @param string $route The name of the route
74-
* @param mixed $parameters An array of parameters
74+
* @param array $parameters An array of parameters
7575
* @param int $referenceType The type of reference (one of the constants in UrlGeneratorInterface)
7676
*
7777
* @return string The generated URL
@@ -380,7 +380,7 @@ protected function createAccessDeniedException($message = 'Access Denied.', \Exc
380380
* @param mixed $data The initial data for the form
381381
* @param array $options Options for the form
382382
*
383-
* @return Form
383+
* @return FormInterface
384384
*
385385
* @final since version 3.4
386386
*/
@@ -395,7 +395,7 @@ protected function createForm($type, $data = null, array $options = array())
395395
* @param mixed $data The initial data for the form
396396
* @param array $options Options for the form
397397
*
398-
* @return FormBuilder
398+
* @return FormBuilderInterface
399399
*
400400
* @final since version 3.4
401401
*/
@@ -407,7 +407,7 @@ protected function createFormBuilder($data = null, array $options = array())
407407
/**
408408
* Shortcut to return the Doctrine Registry service.
409409
*
410-
* @return Registry
410+
* @return ManagerRegistry
411411
*
412412
* @throws \LogicException If DoctrineBundle is not available
413413
*

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php

Lines changed: 21 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
1313

1414
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
15+
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
1516
use Symfony\Component\DependencyInjection\Container;
1617
use Symfony\Component\HttpFoundation\BinaryFileResponse;
1718
use Symfony\Component\HttpFoundation\File\File;
@@ -21,8 +22,6 @@
2122
use Symfony\Component\HttpFoundation\Response;
2223
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
2324
use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
24-
use Symfony\Component\HttpFoundation\StreamedResponse;
25-
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2625
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
2726
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
2827
use Symfony\Component\Security\Core\User\User;
@@ -533,98 +532,25 @@ public function testGetDoctrine()
533532

534533
trait TestControllerTrait
535534
{
536-
public function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
537-
{
538-
return parent::generateUrl($route, $parameters, $referenceType);
539-
}
540-
541-
public function redirect($url, $status = 302)
542-
{
543-
return parent::redirect($url, $status);
544-
}
545-
546-
public function forward($controller, array $path = array(), array $query = array())
547-
{
548-
return parent::forward($controller, $path, $query);
549-
}
550-
551-
public function getUser()
552-
{
553-
return parent::getUser();
554-
}
555-
556-
public function json($data, $status = 200, $headers = array(), $context = array())
557-
{
558-
return parent::json($data, $status, $headers, $context);
559-
}
560-
561-
public function file($file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT)
562-
{
563-
return parent::file($file, $fileName, $disposition);
564-
}
565-
566-
public function isGranted($attributes, $object = null)
567-
{
568-
return parent::isGranted($attributes, $object);
569-
}
570-
571-
public function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.')
572-
{
573-
parent::denyAccessUnlessGranted($attributes, $object, $message);
574-
}
575-
576-
public function redirectToRoute($route, array $parameters = array(), $status = 302)
577-
{
578-
return parent::redirectToRoute($route, $parameters, $status);
579-
}
580-
581-
public function addFlash($type, $message)
582-
{
583-
parent::addFlash($type, $message);
584-
}
585-
586-
public function isCsrfTokenValid($id, $token)
587-
{
588-
return parent::isCsrfTokenValid($id, $token);
589-
}
590-
591-
public function renderView($view, array $parameters = array())
592-
{
593-
return parent::renderView($view, $parameters);
594-
}
595-
596-
public function render($view, array $parameters = array(), Response $response = null)
597-
{
598-
return parent::render($view, $parameters, $response);
599-
}
600-
601-
public function stream($view, array $parameters = array(), StreamedResponse $response = null)
602-
{
603-
return parent::stream($view, $parameters, $response);
604-
}
605-
606-
public function createNotFoundException($message = 'Not Found', \Exception $previous = null)
607-
{
608-
return parent::createNotFoundException($message, $previous);
609-
}
610-
611-
public function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null)
612-
{
613-
return parent::createAccessDeniedException($message, $previous);
614-
}
615-
616-
public function createForm($type, $data = null, array $options = array())
617-
{
618-
return parent::createForm($type, $data, $options);
619-
}
620-
621-
public function createFormBuilder($data = null, array $options = array())
622-
{
623-
return parent::createFormBuilder($data, $options);
624-
}
625-
626-
public function getDoctrine()
627-
{
628-
return parent::getDoctrine();
535+
use ControllerTrait {
536+
generateUrl as public;
537+
redirect as public;
538+
forward as public;
539+
getUser as public;
540+
json as public;
541+
file as public;
542+
isGranted as public;
543+
denyAccessUnlessGranted as public;
544+
redirectToRoute as public;
545+
addFlash as public;
546+
isCsrfTokenValid as public;
547+
renderView as public;
548+
render as public;
549+
stream as public;
550+
createNotFoundException as public;
551+
createAccessDeniedException as public;
552+
createForm as public;
553+
createFormBuilder as public;
554+
getDoctrine as public;
629555
}
630556
}

src/Symfony/Bundle/FrameworkBundle/Translation/TranslationLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class TranslationLoader extends TranslationReader
2424
/**
2525
* Loads translation messages from a directory to the catalogue.
2626
*
27-
* @param string $directory the directory to look into
28-
* @param MessageCatalogue $catalogue the catalogue
27+
* @param string $directory The directory to look into
28+
* @param MessageCatalogue $catalogue The catalogue
2929
*/
3030
public function loadMessages($directory, MessageCatalogue $catalogue)
3131
{

0 commit comments

Comments
 (0)