-
-
Notifications
You must be signed in to change notification settings - Fork 437
Closed
Labels
FeatureNew FeatureNew Feature
Description
Hi devs,
Context
Here is an exemple of an Entity created with a "isFooProp" boolean field :
> symfony console make:entity Test
created: src/Entity/Test.php
created: src/Repository/TestRepository.php
Entity generated! Now let's add some fields!
You can always add more fields later manually or by re-running this command.
New property name (press <return> to stop adding fields):
> isFooProp
Field type (enter ? to see all types) [boolean]:
>
Can this field be null in the database (nullable) (yes/no) [no]:
>
updated: src/Entity/Test.phpCurrent behavior
This is the resulting entity :
#[ORM\Entity(repositoryClass: TestRepository::class)]
class Test
{
...
#[ORM\Column]
private ?bool $isFooProp = null;
...
public function isIsFooProp(): ?bool
{
return $this->isFooProp;
}
public function setIsFooProp(bool $isFooProp): static
...
}Proposed behavior
#[ORM\Entity(repositoryClass: TestRepository::class)]
class Test
{
...
#[ORM\Column]
private ?bool $isFooProp = null;
...
public function isFooProp(): ?bool
{
return $this->isFooProp;
}
public function setIsFooProp(bool $isFooProp): static
...
}I already worked on this modification and should be able to propose a PR, I just wanted to have your feedback on this topic before. All comments are welcome :)
mbacquet
Metadata
Metadata
Assignees
Labels
FeatureNew FeatureNew Feature