Skip to content

Commit

Permalink
Assert JoinColumns in CPP should be converted
Browse files Browse the repository at this point in the history
Found while working on doctrine/orm#10113
The fix should eliminate the need for doctrine/orm@37e34e9
  • Loading branch information
greg0ire authored and TomasVotruba committed Oct 15, 2022
1 parent f4f758c commit 90e6adf
Showing 1 changed file with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace Rector\Tests\Php80\Rector\Property\NestedAnnotationToAttributeRector\Fixture;

use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\JoinColumns;

final class DoctrineNestedJoinColumns
{
public function __construct(
/**
* @JoinColumns({
* @JoinColumn(name="entity_id", referencedColumnName="id"),
* @JoinColumn(name="entity_type", referencedColumnName="entity_type"),
* })
*/
protected $page,
) {
}
}

?>
-----
<?php

namespace Rector\Tests\Php80\Rector\Property\NestedAnnotationToAttributeRector\Fixture;

use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\JoinColumns;


final class DoctrineNestedJoinColumns
{
public function __construct(
#[JoinColumn(name: "entity_id", referencedColumnName: "id")]
#[JoinColumn(name: "entity_type", referencedColumnName: "entity_type")]
protected $page,
) {
}
}

?>

0 comments on commit 90e6adf

Please sign in to comment.