Skip to content

Commit

Permalink
Port from annotations to attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Apr 22, 2024
1 parent de735e7 commit 5781c9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@

namespace Dbp\Relay\FrontendBundle\Entity;

use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\Groups;

class User
{
private $identifier;

/**
* @Groups({"FrontendUser:output"})
*
* @var string[]
*/
#[Groups(['FrontendUser:output'])]
private $roles;

public function getRoles(): array
Expand Down
1 change: 1 addition & 0 deletions tests/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function configureContainer(ContainerConfigurator $container, LoaderIn
$container->extension('framework', [
'test' => true,
'secret' => '',
'annotations' => false,
]);
}
}

0 comments on commit 5781c9d

Please sign in to comment.