Skip to content

Commit

Permalink
Switch to attributes in docs (#1392)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jan 21, 2024
1 parent c269dc9 commit 4f507d7
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/en/reference/generating-migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,22 @@ the ORM. To test this functionality, create a new ``User`` entity located at ``l
namespace MyProject\Entities;
/**
* @Entity
* @Table(name="users")
*/
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Table;
#[Entity]
#[Table(name: 'users')]
class User
{
/** @Id @Column(type="integer") @GeneratedValue */
#[Id]
#[Column(type: 'integer')]
#[GeneratedValue]
private $id;
/** @Column(type="string", nullable=true) */
#[Column(type: 'string', nullable: true)]
private $username;
public function setId(int $id)
Expand Down

0 comments on commit 4f507d7

Please sign in to comment.