Skip to content

Commit 353aea6

Browse files
jrushlowweaverryan
authored andcommitted
fix entity regen tests
1 parent 675cc79 commit 353aea6

File tree

21 files changed

+47
-26
lines changed

21 files changed

+47
-26
lines changed

tests/Doctrine/fixtures/expected_no_overwrite/src/Entity/Client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Doctrine\Common\Collections\ArrayCollection;
66
use Doctrine\Common\Collections\Collection;
7+
use Doctrine\DBAL\Types\Types;
78
use Doctrine\ORM\Mapping as ORM;
89

910
#[ORM\Entity]
@@ -14,7 +15,7 @@ class Client extends BaseClient
1415
/**
1516
* @var string
1617
*/
17-
#[ORM\Column(type: 'string')]
18+
#[ORM\Column(type: Types::STRING)]
1819
private $apiKey;
1920

2021
#[ORM\ManyToMany(targetEntity: Tag::class)]

tests/Doctrine/fixtures/expected_no_overwrite/src/Entity/Embed.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Embeddable]
89
class Embed
910
{
10-
#[ORM\Column(type: 'integer')]
11+
#[ORM\Column(type: Types::INTEGER)]
1112
private $val;
1213

1314
public function getVal(): ?int

tests/Doctrine/fixtures/expected_no_overwrite/src/Entity/Tag.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class Tag
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
public function getId(): ?int

tests/Doctrine/fixtures/expected_no_overwrite/src/Entity/User.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
use Doctrine\Common\Collections\ArrayCollection;
66
use Doctrine\Common\Collections\Collection;
7+
use Doctrine\DBAL\Types\Types;
78
use Doctrine\ORM\Mapping as ORM;
89

910
#[ORM\Entity]
1011
class User
1112
{
1213
#[ORM\Id]
1314
#[ORM\GeneratedValue]
14-
#[ORM\Column(type: 'integer')]
15+
#[ORM\Column(type: Types::INTEGER)]
1516
private $id;
1617

1718
#[ORM\OneToMany(targetEntity: UserAvatar::class, mappedBy: 'user')]

tests/Doctrine/fixtures/expected_no_overwrite/src/Entity/UserAvatar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class UserAvatar
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'avatars', cascade: ['persist', 'remove'])]

tests/Doctrine/fixtures/expected_no_overwrite/src/Entity/UserProfile.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class UserProfile
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
#[ORM\OneToOne(targetEntity: User::class, inversedBy: 'userProfile', cascade: ['persist', 'remove'])]

tests/Doctrine/fixtures/expected_overwrite/src/Entity/BaseClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\MappedSuperclass]
@@ -11,16 +12,16 @@ class BaseClient
1112

1213
#[ORM\Id]
1314
#[ORM\GeneratedValue]
14-
#[ORM\Column(type: 'integer')]
15+
#[ORM\Column(type: Types::INTEGER)]
1516
private $id;
1617

17-
#[ORM\Column(type: 'string')]
18+
#[ORM\Column(type: Types::STRING)]
1819
private $name;
1920

2021
#[ORM\ManyToOne(targetEntity: User::class)]
2122
private $creator;
2223

23-
#[ORM\Column(type: 'integer')]
24+
#[ORM\Column(type: Types::INTEGER)]
2425
private $magic;
2526

2627
public function __construct()

tests/Doctrine/fixtures/expected_overwrite/src/Entity/Client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Doctrine\Common\Collections\ArrayCollection;
66
use Doctrine\Common\Collections\Collection;
7+
use Doctrine\DBAL\Types\Types;
78
use Doctrine\ORM\Mapping as ORM;
89

910
#[ORM\Entity]
@@ -14,7 +15,7 @@ class Client extends BaseClient
1415
/**
1516
* @var string
1617
*/
17-
#[ORM\Column(type: 'string')]
18+
#[ORM\Column(type: Types::STRING)]
1819
private $apiKey;
1920

2021
#[ORM\ManyToMany(targetEntity: Tag::class)]

tests/Doctrine/fixtures/expected_overwrite/src/Entity/Embed.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Embeddable]
89
class Embed
910
{
10-
#[ORM\Column(type: 'integer')]
11+
#[ORM\Column(type: Types::INTEGER)]
1112
private $val;
1213

1314
public function getVal(): ?int

tests/Doctrine/fixtures/expected_overwrite/src/Entity/Tag.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class Tag
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
public function getId(): ?int

tests/Doctrine/fixtures/expected_overwrite/src/Entity/User.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
use Doctrine\Common\Collections\ArrayCollection;
66
use Doctrine\Common\Collections\Collection;
7+
use Doctrine\DBAL\Types\Types;
78
use Doctrine\ORM\Mapping as ORM;
89

910
#[ORM\Entity]
1011
class User
1112
{
1213
#[ORM\Id]
1314
#[ORM\GeneratedValue]
14-
#[ORM\Column(type: 'integer')]
15+
#[ORM\Column(type: Types::INTEGER)]
1516
private $id;
1617

1718
#[ORM\OneToMany(targetEntity: UserAvatar::class, mappedBy: 'user')]

tests/Doctrine/fixtures/expected_overwrite/src/Entity/UserAvatar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class UserAvatar
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'avatars', cascade: ['persist', 'remove'])]

tests/Doctrine/fixtures/expected_overwrite/src/Entity/UserProfile.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class UserProfile
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
#[ORM\OneToOne(targetEntity: User::class, inversedBy: 'userProfile', cascade: ['persist', 'remove'])]

tests/Doctrine/fixtures/source_project/src/Entity/BaseClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\MappedSuperclass]
@@ -11,16 +12,16 @@ class BaseClient
1112

1213
#[ORM\Id]
1314
#[ORM\GeneratedValue]
14-
#[ORM\Column(type: 'integer')]
15+
#[ORM\Column(type: Types::INTEGER)]
1516
private $id;
1617

17-
#[ORM\Column(type: 'string')]
18+
#[ORM\Column(type: Types::STRING)]
1819
private $name;
1920

2021
#[ORM\ManyToOne(targetEntity: User::class)]
2122
private $creator;
2223

23-
#[ORM\Column(type: 'integer')]
24+
#[ORM\Column(type: Types::INTEGER)]
2425
private $magic;
2526

2627
public function __construct()

tests/Doctrine/fixtures/source_project/src/Entity/Client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
@@ -12,7 +13,7 @@ class Client extends BaseClient
1213
/**
1314
* @var string
1415
*/
15-
#[ORM\Column(type: 'string')]
16+
#[ORM\Column(type: Types::STRING)]
1617
private $apiKey;
1718

1819
#[ORM\ManyToMany(targetEntity: Tag::class)]

tests/Doctrine/fixtures/source_project/src/Entity/Embed.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Embeddable]
89
class Embed
910
{
10-
#[ORM\Column(type: 'integer')]
11+
#[ORM\Column(type: Types::INTEGER)]
1112
private $val;
1213
}

tests/Doctrine/fixtures/source_project/src/Entity/Tag.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class Tag
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
public function getId(): ?int

tests/Doctrine/fixtures/source_project/src/Entity/TimestampableTrait.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
trait TimestampableTrait
89
{
9-
#[ORM\Column(type: 'datetime')]
10+
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
1011
private $createdAt;
1112

12-
#[ORM\Column(type: 'datetime')]
13+
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
1314
private $updatedAt;
1415

1516
/**

tests/Doctrine/fixtures/source_project/src/Entity/User.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

55
use Doctrine\Common\Collections\ArrayCollection;
6+
use Doctrine\DBAL\Types\Types;
67
use Doctrine\ORM\Mapping as ORM;
78

89
#[ORM\Entity]
910
class User
1011
{
1112
#[ORM\Id]
1213
#[ORM\GeneratedValue]
13-
#[ORM\Column(type: 'integer')]
14+
#[ORM\Column(type: Types::INTEGER)]
1415
private $id;
1516

1617
#[ORM\OneToMany(targetEntity: UserAvatar::class, mappedBy: 'user')]

tests/Doctrine/fixtures/source_project/src/Entity/UserAvatar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class UserAvatar
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'avatars', cascade: ['persist', 'remove'])]

tests/Doctrine/fixtures/source_project/src/Entity/UserProfile.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace Symfony\Bundle\MakerBundle\Tests\tmp\current_project\src\Entity;
44

5+
use Doctrine\DBAL\Types\Types;
56
use Doctrine\ORM\Mapping as ORM;
67

78
#[ORM\Entity]
89
class UserProfile
910
{
1011
#[ORM\Id]
1112
#[ORM\GeneratedValue]
12-
#[ORM\Column(type: 'integer')]
13+
#[ORM\Column(type: Types::INTEGER)]
1314
private $id;
1415

1516
#[ORM\OneToOne(targetEntity: User::class, inversedBy: 'userProfile', cascade: ['persist', 'remove'])]

0 commit comments

Comments
 (0)