Skip to content

Commit 5768dd5

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Yaml] Minor: Update Inline parse phpdoc [DependencyInjection] Fix dumping inlined withers [HttpClient] Move Http clients data collecting at a late level [FrameworkBundle] restore call to addGlobalIgnoredName Allow EmailValidator 4 Fix detecting mapping with one line annotations
2 parents a7d0eca + 359ba96 commit 5768dd5

File tree

4 files changed

+58
-2
lines changed

4 files changed

+58
-2
lines changed

DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ private function detectMappingType(string $directory, ContainerBuilder $containe
301301
break;
302302
}
303303
if (
304-
preg_match('/^ \* @.*'.$quotedMappingObjectName.'\b/m', $content) ||
305-
preg_match('/^ \* @.*Embeddable\b/m', $content)
304+
preg_match('/^(?: \*|\/\*\*) @.*'.$quotedMappingObjectName.'\b/m', $content) ||
305+
preg_match('/^(?: \*|\/\*\*) @.*Embeddable\b/m', $content)
306306
) {
307307
$type = 'annotation';
308308
break;

Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ public function testUnrecognizedCacheDriverException()
279279
public function providerBundles()
280280
{
281281
yield ['AnnotationsBundle', 'annotation', '/Entity'];
282+
yield ['AnnotationsOneLineBundle', 'annotation', '/Entity'];
282283
yield ['FullEmbeddableAnnotationsBundle', 'annotation', '/Entity'];
283284
yield ['AttributesBundle', 'attribute', '/Entity'];
284285
yield ['FullEmbeddableAttributesBundle', 'attribute', '/Entity'];
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
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 Fixtures\Bundles\AnnotationsOneLineBundle;
13+
14+
use Symfony\Component\HttpKernel\Bundle\Bundle;
15+
16+
class AnnotationsOneLineBundle extends Bundle
17+
{
18+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
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 Fixtures\Bundles\AnnotationsOneLineBundle\Entity;
13+
14+
use Doctrine\ORM\Mapping\Column;
15+
use Doctrine\ORM\Mapping\Entity;
16+
use Doctrine\ORM\Mapping\Id;
17+
18+
/** @Entity */
19+
class Person
20+
{
21+
/** @Id @Column(type="integer") */
22+
protected $id;
23+
24+
/** @Column(type="string") */
25+
public $name;
26+
27+
public function __construct($id, $name)
28+
{
29+
$this->id = $id;
30+
$this->name = $name;
31+
}
32+
33+
public function __toString(): string
34+
{
35+
return (string) $this->name;
36+
}
37+
}

0 commit comments

Comments
 (0)