File tree Expand file tree Collapse file tree 8 files changed +36
-82
lines changed
src/LiveComponent/tests/Fixtures Expand file tree Collapse file tree 8 files changed +36
-82
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use Doctrine \ORM \Mapping as ORM ;
15
15
16
- /**
17
- * @ORM\Entity
18
- */
16
+ #[ORM \Entity]
19
17
class CategoryFixtureEntity
20
18
{
21
- /**
22
- * @ORM\Id
23
- * @ORM\GeneratedValue
24
- * @ORM\Column(type="integer")
25
- */
19
+ #[ORM \Id]
20
+ #[ORM \GeneratedValue]
21
+ #[ORM \Column(type: 'integer ' )]
26
22
private ?int $ id = null ;
27
23
28
- /**
29
- * @ORM\Column(type="string")
30
- */
24
+ #[ORM \Column(type: 'string ' )]
31
25
private ?string $ name = null ;
32
26
33
27
public function getId (): ?int
Original file line number Diff line number Diff line change 13
13
14
14
use Doctrine \ORM \Mapping as ORM ;
15
15
16
- /**
17
- * @ORM\Embeddable
18
- */
16
+ #[ORM \Embeddable]
19
17
final class Embeddable1
20
18
{
21
- /**
22
- * @ORM\Column
23
- */
19
+ #[ORM \Column]
24
20
public string $ name ;
25
21
26
22
public function __construct (string $ name )
Original file line number Diff line number Diff line change 13
13
14
14
use Doctrine \ORM \Mapping as ORM ;
15
15
16
- /**
17
- * @ORM\Entity
18
- */
16
+ #[ORM \Entity]
19
17
class Entity1
20
18
{
21
- /**
22
- * @ORM\Id
23
- * @ORM\GeneratedValue
24
- * @ORM\Column(type="integer")
25
- */
19
+ #[ORM \Id]
20
+ #[ORM \GeneratedValue]
21
+ #[ORM \Column(type: 'integer ' )]
26
22
public $ id ;
27
23
}
Original file line number Diff line number Diff line change 14
14
use Doctrine \ORM \Mapping as ORM ;
15
15
use Symfony \UX \LiveComponent \Tests \Fixtures \Dto \Embeddable2 ;
16
16
17
- /**
18
- * @ORM\Entity
19
- */
17
+ #[ORM \Entity]
20
18
class Entity2
21
19
{
22
- /**
23
- * @ORM\Id
24
- * @ORM\GeneratedValue
25
- * @ORM\Column(type="integer")
26
- */
20
+ #[ORM \Id]
21
+ #[ORM \GeneratedValue]
22
+ #[ORM \Column(type: 'integer ' )]
27
23
public $ id ;
28
24
29
- /**
30
- * @ORM\Embedded(Embeddable1::class)
31
- */
25
+ #[ORM \Embedded(Embeddable1::class)]
32
26
public Embeddable1 $ embedded1 ;
33
27
34
- /**
35
- * @ORM\Embedded(Embeddable2::class)
36
- */
28
+ #[ORM \Embedded(Embeddable2::class)]
37
29
public Embeddable2 $ embedded2 ;
38
30
}
Original file line number Diff line number Diff line change 13
13
14
14
use Doctrine \ORM \Mapping as ORM ;
15
15
16
- /**
17
- * @ORM\Entity
18
- */
16
+ #[ORM \Entity]
19
17
class ProductFixtureEntity
20
18
{
21
- /**
22
- * @ORM\Id
23
- * @ORM\GeneratedValue
24
- * @ORM\Column(type="integer")
25
- */
19
+ #[ORM \Id]
20
+ #[ORM \GeneratedValue]
21
+ #[ORM \Column(type: 'integer ' )]
26
22
public ?int $ id = null ;
27
23
28
- /**
29
- * @ORM\Column(type="string")
30
- */
24
+ #[ORM \Column(type: 'string ' )]
31
25
public string $ name = '' ;
32
26
33
- /**
34
- * @ORM\Column(type="integer")
35
- */
27
+ #[ORM \Column(type: 'integer ' )]
36
28
public int $ price = 0 ;
37
29
}
Original file line number Diff line number Diff line change 15
15
use Doctrine \Common \Collections \Collection ;
16
16
use Doctrine \ORM \Mapping as ORM ;
17
17
18
- /**
19
- * @ORM\Entity
20
- */
18
+ #[ORM \Entity]
21
19
class TodoItemFixtureEntity
22
20
{
23
- /**
24
- * @ORM\Id
25
- * @ORM\GeneratedValue
26
- * @ORM\Column(type="integer")
27
- */
21
+ #[ORM \Id]
22
+ #[ORM \GeneratedValue]
23
+ #[ORM \Column(type: 'integer ' )]
28
24
public $ id ;
29
25
30
- /**
31
- * @ORM\Column(type="string")
32
- */
26
+ #[ORM \Column(type: 'string ' )]
33
27
private ?string $ name = null ;
34
28
35
- /**
36
- * @ORM\ManyToOne(targetEntity=TodoListFixtureEntity::class, inversedBy="todoItems")
37
- */
29
+ #[ORM \ManyToOne(targetEntity: TodoListFixtureEntity::class, inversedBy: 'todoItems ' )]
38
30
private TodoListFixtureEntity $ todoList ;
39
31
40
32
/**
Original file line number Diff line number Diff line change 15
15
use Doctrine \Common \Collections \Collection ;
16
16
use Doctrine \ORM \Mapping as ORM ;
17
17
18
- /**
19
- * @ORM\Entity
20
- */
18
+ #[ORM \Entity]
21
19
class TodoListFixtureEntity
22
20
{
23
- /**
24
- * @ORM\Id
25
- * @ORM\GeneratedValue
26
- * @ORM\Column(type="integer")
27
- */
21
+ #[ORM \Id]
22
+ #[ORM \GeneratedValue]
23
+ #[ORM \Column(type: 'integer ' )]
28
24
public $ id ;
29
25
30
- /**
31
- * @ORM\Column(type="string")
32
- */
26
+ #[ORM \Column(type: 'string ' )]
33
27
public string $ listTitle = '' ;
34
28
35
- /**
36
- * @ORM\OneToMany(targetEntity=TodoItemFixtureEntity::class, mappedBy="todoList")
37
- */
29
+ #[ORM \OneToMany(targetEntity: TodoItemFixtureEntity::class, mappedBy: 'todoList ' )]
38
30
private Collection $ todoItems ;
39
31
40
32
public function __construct (string $ listTitle = '' )
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ protected function configureContainer(ContainerConfigurator $c): void
84
84
'mappings ' => [
85
85
'Default ' => [
86
86
'is_bundle ' => false ,
87
- 'type ' => 'annotation ' ,
87
+ 'type ' => 'attribute ' ,
88
88
'dir ' => '%kernel.project_dir%/tests/Fixtures/Entity ' ,
89
89
'prefix ' => 'Symfony\UX\LiveComponent\Tests\Fixtures\Entity ' ,
90
90
'alias ' => 'Default ' ,
You can’t perform that action at this time.
0 commit comments