Skip to content

Commit 1c253d1

Browse files
authored
Merge pull request #424 from norkunas/drop-doctrine-annotations
Drop doctrine annotations
2 parents 5b6d13b + d7ae1de commit 1c253d1

17 files changed

+8
-233
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ composer.lock
44
/vendor/
55
/var/
66
phpstan.neon
7+
/config/reference.php
78

89
# Meilisearch
910
/data.ms/*

tests/Entity/Article.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
use Doctrine\ORM\Mapping as ORM;
88

9-
/**
10-
* @ORM\Entity
11-
*/
129
#[ORM\Entity]
1310
class Article extends ContentItem
1411
{

tests/Entity/Car.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
use Doctrine\ORM\Mapping as ORM;
88

9-
/**
10-
* @ORM\Entity
11-
*/
129
#[ORM\Entity]
1310
class Car
1411
{

tests/Entity/Comment.php

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,26 @@
66

77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
9-
use Symfony\Component\Serializer\Annotation\Groups;
9+
use Symfony\Component\Serializer\Attribute\Groups;
1010

11-
/**
12-
* @ORM\Entity
13-
*
14-
* @ORM\Table(name="comments")
15-
*/
1611
#[ORM\Entity]
1712
#[ORM\Table(name: 'comments')]
1813
class Comment
1914
{
20-
/**
21-
* @ORM\Id
22-
*
23-
* @ORM\GeneratedValue
24-
*
25-
* @ORM\Column(type="integer", nullable=true)
26-
*
27-
* @Groups({"searchable"})
28-
*/
2915
#[ORM\Id]
3016
#[ORM\GeneratedValue]
3117
#[ORM\Column(type: Types::INTEGER)]
3218
#[Groups('searchable')]
3319
private ?int $id = null;
3420

35-
/**
36-
* @ORM\ManyToOne(targetEntity="Post", inversedBy="comments")
37-
*
38-
* @ORM\JoinColumn(nullable=false)
39-
*/
4021
#[ORM\ManyToOne(inversedBy: 'comments')]
4122
#[ORM\JoinColumn(nullable: false)]
4223
private Post $post;
4324

44-
/**
45-
* @ORM\Column(type="text")
46-
*
47-
* @Groups({"searchable"})
48-
*/
4925
#[ORM\Column(type: Types::TEXT)]
5026
#[Groups('searchable')]
5127
private string $content;
5228

53-
/**
54-
* @ORM\Column(type="datetime_immutable")
55-
*
56-
* @Groups({"searchable"})
57-
*/
5829
#[ORM\Column(type: Types::DATETIME_IMMUTABLE)]
5930
#[Groups('searchable')]
6031
private \DateTimeImmutable $publishedAt;

tests/Entity/ContentAggregator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use Doctrine\ORM\Mapping as ORM;
88
use Meilisearch\Bundle\Entity\Aggregator;
99

10-
/**
11-
* @ORM\Entity
12-
*/
1310
#[ORM\Entity]
1411
class ContentAggregator extends Aggregator
1512
{

tests/Entity/ContentItem.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,17 @@
77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
99

10-
/**
11-
* @ORM\Entity
12-
*
13-
* @ORM\InheritanceType("JOINED")
14-
*
15-
* @ORM\DiscriminatorColumn(name="type", type="integer")
16-
*
17-
* @ORM\DiscriminatorMap({1 = Article::class, 2 = Podcast::class})
18-
*/
1910
#[ORM\Entity]
2011
#[ORM\InheritanceType('JOINED')]
2112
#[ORM\DiscriminatorColumn(name: 'type', type: 'integer')]
2213
#[ORM\DiscriminatorMap([1 => Article::class, 2 => Podcast::class])]
2314
abstract class ContentItem
2415
{
25-
/**
26-
* @ORM\Id
27-
*
28-
* @ORM\GeneratedValue
29-
*
30-
* @ORM\Column(type="integer")
31-
*/
3216
#[ORM\Id]
3317
#[ORM\GeneratedValue]
3418
#[ORM\Column(type: Types::INTEGER)]
3519
private ?int $id = null;
3620

37-
/**
38-
* @ORM\Column(type="string")
39-
*/
4021
#[ORM\Column(type: Types::STRING)]
4122
private string $title;
4223

tests/Entity/DummyCustomGroups.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,20 @@
66

77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
9-
use Symfony\Component\Serializer\Annotation\Groups;
9+
use Symfony\Component\Serializer\Attribute\Groups;
1010

11-
/**
12-
* @ORM\Entity
13-
*/
1411
#[ORM\Entity]
1512
class DummyCustomGroups
1613
{
17-
/**
18-
* @ORM\Id
19-
*
20-
* @ORM\Column(type="integer")
21-
*
22-
* @ORM\GeneratedValue("NONE")
23-
*
24-
* @Groups("public")
25-
*/
2614
#[ORM\Id]
2715
#[ORM\Column(type: Types::INTEGER)]
2816
#[Groups('public')]
2917
private int $id;
3018

31-
/**
32-
* @ORM\Column(type="string")
33-
*
34-
* @Groups("public")
35-
*/
3619
#[ORM\Column(type: Types::STRING)]
3720
#[Groups('public')]
3821
private string $name;
3922

40-
/**
41-
* @ORM\Column(type="datetime_immutable")
42-
*
43-
* @Groups("private")
44-
*/
4523
#[ORM\Column(type: Types::DATETIME_IMMUTABLE)]
4624
#[Groups('private')]
4725
private \DateTimeImmutable $createdAt;

tests/Entity/DynamicSettings.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,13 @@
77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
99

10-
/**
11-
* @ORM\Entity
12-
*/
1310
#[ORM\Entity]
1411
class DynamicSettings
1512
{
16-
/**
17-
* @ORM\Id
18-
*
19-
* @ORM\Column(type="integer")
20-
*
21-
* @ORM\GeneratedValue("NONE")
22-
*/
2313
#[ORM\Id]
2414
#[ORM\Column(type: Types::INTEGER)]
2515
private int $id;
2616

27-
/**
28-
* @ORM\Column(type="string")
29-
*/
3017
#[ORM\Column(type: Types::STRING)]
3118
private string $name;
3219

tests/Entity/EmptyAggregator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use Doctrine\ORM\Mapping as ORM;
88
use Meilisearch\Bundle\Entity\Aggregator;
99

10-
/**
11-
* @ORM\Entity
12-
*/
1310
#[ORM\Entity]
1411
class EmptyAggregator extends Aggregator
1512
{

tests/Entity/Image.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,14 @@
77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
99

10-
/**
11-
* @ORM\Entity
12-
*/
1310
#[ORM\Entity]
1411
class Image
1512
{
16-
/**
17-
* @ORM\Id
18-
*
19-
* @ORM\GeneratedValue
20-
*
21-
* @ORM\Column(type="integer")
22-
*/
2313
#[ORM\Id]
2414
#[ORM\GeneratedValue]
2515
#[ORM\Column(type: Types::INTEGER)]
2616
private ?int $id = null;
2717

28-
/**
29-
* @ORM\Column(type="string")
30-
*/
3118
#[ORM\Column(type: Types::STRING)]
3219
private string $url;
3320

0 commit comments

Comments
 (0)