Skip to content

Commit 319f600

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: [Serializer] Added check of constuctor modifiers to AbstractNormalizer [Intl] Simplify the compile binary [Routing] Fix routes annotation loading with glob pattern Fix hardcoded hotPathTagName [Validator] Improve constraint default option check [Validator] Fix annotation default for @count and @Length Update composer.json Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes" Add missing "vi" translations add missing German translations [Intl] Fix test added missing translation use behavior instead of behaviour [Validator] Translate JSON message to Hungarian [Validator] fix sr_Latn translations [FrameworkBundle][HttpFoundation] make session service resettable
2 parents bbbbc6f + ff11aac commit 319f600

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ CHANGELOG
6868

6969
* [DEPRECATION] The `ApacheMatcherDumper` and `ApacheUrlMatcher` were deprecated and
7070
will be removed in Symfony 3.0, since the performance gains were minimal and
71-
it's hard to replicate the behaviour of PHP implementation.
71+
it's hard to replicate the behavior of PHP implementation.
7272

7373
2.3.0
7474
-----

Loader/AnnotationFileLoader.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ public function load($file, $type = null)
5656

5757
$collection = new RouteCollection();
5858
if ($class = $this->findClass($path)) {
59+
$refl = new \ReflectionClass($class);
60+
if ($refl->isAbstract()) {
61+
return;
62+
}
63+
5964
$collection->addResource(new FileResource($path));
6065
$collection->addCollection($this->loader->load($class, $type));
6166
}

Tests/Fixtures/AnnotatedClasses/AbstractClass.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@
1313

1414
abstract class AbstractClass
1515
{
16+
abstract public function abstractRouteAction();
17+
18+
public function routeAction($arg1, $arg2 = 'defaultValue2', $arg3 = 'defaultValue3')
19+
{
20+
}
1621
}

Tests/Loader/AnnotationFileLoaderTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ public function testLoadAnonymousClass()
7272
$this->loader->load(__DIR__.'/../Fixtures/OtherAnnotatedClasses/AnonymousClassInTrait.php');
7373
}
7474

75+
public function testLoadAbstractClass()
76+
{
77+
$this->reader->expects($this->never())->method('getClassAnnotation');
78+
$this->reader->expects($this->never())->method('getMethodAnnotations');
79+
80+
$this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/AbstractClass.php');
81+
}
82+
7583
public function testSupports()
7684
{
7785
$fixture = __DIR__.'/../Fixtures/annotated.php';

0 commit comments

Comments
 (0)