Skip to content

Commit 0425e05

Browse files
GuilhemNfabpot
authored andcommitted
[FrameworkBundle] Execute the PhpDocExtractor earlier
1 parent 5bc83c4 commit 0425e05

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/property_info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<!-- Extractor -->
1616
<service id="property_info.reflection_extractor" class="Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor" public="false">
1717
<tag name="property_info.list_extractor" priority="-1000" />
18-
<tag name="property_info.type_extractor" priority="-1000" />
18+
<tag name="property_info.type_extractor" priority="-1002" />
1919
<tag name="property_info.access_extractor" priority="-1000" />
2020
</service>
2121
</services>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
13+
14+
use Symfony\Component\PropertyInfo\Type;
15+
16+
class PropertyInfoTest extends WebTestCase
17+
{
18+
public function testPhpDocPriority()
19+
{
20+
static::bootKernel(array('test_case' => 'Serializer'));
21+
$container = static::$kernel->getContainer();
22+
23+
$this->assertEquals(array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_INT))), $container->get('property_info')->getTypes(Dummy::class, 'codes'));
24+
}
25+
}
26+
27+
class Dummy
28+
{
29+
/**
30+
* @param int[] $codes
31+
*/
32+
public function setCodes(array $codes)
33+
{
34+
}
35+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy