Merge branch 'develop'

This commit is contained in:
Simon Vieille 2022-11-19 19:48:32 +01:00
commit 65b3583411
5 changed files with 23 additions and 49 deletions

View file

@ -12,13 +12,13 @@ doctrine:
mappings:
App\Core\Entity:
is_bundle: false
type: annotation
type: attribute
dir: '%kernel.project_dir%/vendor/murph/murph-core/src/core/Entity'
prefix: 'App\Core\Entity'
alias: App\Core\Entity
App\Entity:
is_bundle: false
type: annotation
type: attribute
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App\Entity

View file

@ -2,10 +2,10 @@
"license": "UNLICENSED",
"private": true,
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
"dev-server": "./node_modules/.bin/encore dev-server",
"dev": "./node_modules/.bin/encore dev",
"watch": "./node_modules/.bin/encore dev --watch",
"build": "./node_modules/.bin/encore production --progress"
},
"dependencies": {
"murph-project": "^1"

View file

@ -6,14 +6,10 @@ use App\Core\Controller\Dashboard\DashboardAdminController as Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("/admin")
*/
#[Route(path: '/admin')]
class DashboardAdminController extends Controller
{
/**
* @Route("/", name="admin_dashboard_index")
*/
#[Route(path: '/', name: 'admin_dashboard_index')]
public function index(): Response
{
return $this->render('admin/dashboard.html.twig');

View file

@ -11,9 +11,7 @@ use App\Core\Form\Site\Page\TextBlockType;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Form\FormBuilderInterface;
/**
* @ORM\Entity
*/
#[ORM\Entity]
class SimplePage extends Page
{
public function buildForm(FormBuilderInterface $builder, array $options)

View file

@ -10,64 +10,44 @@ use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ORM\Entity(repositoryClass=UserRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ORM\HasLifecycleCallbacks]
class User implements PasswordAuthenticatedUserInterface, UserInterface, TwoFactorInterface, EntityInterface
{
use Timestampable;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @ORM\Column(type="string", length=180, unique=true)
*/
#[ORM\Column(type: 'string', length: 180, unique: true)]
private $email;
/**
* @ORM\Column(type="json")
*/
#[ORM\Column(type: 'json')]
private $roles = [];
/**
* @var string The hashed password
* @ORM\Column(type="string")
*/
#[ORM\Column(type: 'string')]
private $password;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $displayName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $totpSecret;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
#[ORM\Column(type: 'datetime', nullable: true)]
private $passwordRequestedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $confirmationToken;
/**
* @ORM\Column(type="boolean", options={"default"=0})
*/
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
private $isAdmin;
/**
* @ORM\Column(type="boolean", options={"default"=0})
*/
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
private $isWriter;
public function __construct()