-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mapping] Fix inherited classes metadata collection (#2651)
* fix: use isTransient to assert that class should have been loaded * Update changelog * Move changelog statement around * Fix coding standard issue * Update tests/Gedmo/Mapping/MappingEventSubscriberTest.php * Update tests/Gedmo/Mapping/MappingEventSubscriberTest.php --------- Co-authored-by: Gaël Reyrol <me@gaelreyrol.dev> Co-authored-by: Fran Moreno <franmomu@gmail.com>
- Loading branch information
1 parent
4fd6a62
commit 351caed
Showing
5 changed files
with
148 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Doctrine Behavioral Extensions package. | ||
* (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Gedmo\Tests\Mapping\Fixture; | ||
|
||
use Doctrine\DBAL\Types\Types; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Gedmo\Tests\Mapping\Mock\Extension\Encoder\Mapping as Ext; | ||
|
||
/** | ||
* @ORM\MappedSuperclass | ||
*/ | ||
#[ORM\MappedSuperclass] | ||
class MappedSuperClass | ||
{ | ||
/** | ||
* @var int|null | ||
* | ||
* @ORM\Id | ||
* @ORM\GeneratedValue | ||
* @ORM\Column(type="integer") | ||
*/ | ||
#[ORM\Id] | ||
#[ORM\GeneratedValue] | ||
#[ORM\Column(type: Types::INTEGER)] | ||
private $id; | ||
|
||
/** | ||
* @var string|null | ||
* | ||
* @ORM\Column(length=32) | ||
* @Ext\Encode(type="md5") | ||
*/ | ||
#[ORM\Column(length: 32)] | ||
private $content; | ||
|
||
public function setContent(?string $content): void | ||
{ | ||
$this->content = $content; | ||
} | ||
|
||
public function getContent(): ?string | ||
{ | ||
return $this->content; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Doctrine Behavioral Extensions package. | ||
* (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Gedmo\Tests\Mapping\Fixture; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @ORM\Entity | ||
*/ | ||
#[ORM\Entity] | ||
class SuperClassExtension extends MappedSuperClass | ||
{ | ||
/** | ||
* @var string|null | ||
* | ||
* @ORM\Column(length=128) | ||
*/ | ||
#[ORM\Column(length: 128)] | ||
private $title; | ||
|
||
public function setTitle(?string $title): void | ||
{ | ||
$this->title = $title; | ||
} | ||
|
||
public function getTitle(): ?string | ||
{ | ||
return $this->title; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters