Przeglądaj źródła

MAJ Gedmo avec attribut php8

feature/symfony6.1
Fabien Normand 3 miesięcy temu
rodzic
commit
d1f2a4f242
5 zmienionych plików z 12 dodań i 24 usunięć
  1. +2
    -6
      Doctrine/Extension/BlameableTrait.php
  2. +2
    -3
      Doctrine/Extension/SluggableTrait.php
  3. +4
    -7
      Doctrine/Extension/TimestampableTrait.php
  4. +2
    -6
      Doctrine/Extension/TranslatableTrait.php
  5. +2
    -2
      composer.json

+ 2
- 6
Doctrine/Extension/BlameableTrait.php Wyświetl plik

@@ -9,16 +9,12 @@ use Lc\SovBundle\Model\User\UserInterface;
trait BlameableTrait
{

/**
* @Gedmo\Blameable(on="create")
*/
#[Gedmo\Blameable(on: 'create')]
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\User\UserInterface')]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
protected $createdBy;

/**
* @Gedmo\Blameable(on="update")
*/
#[Gedmo\Blameable(on: 'update')]
#[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\User\UserInterface')]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
protected $updatedBy;

+ 2
- 3
Doctrine/Extension/SluggableTrait.php Wyświetl plik

@@ -7,9 +7,8 @@ use Gedmo\Mapping\Annotation as Gedmo;

trait SluggableTrait
{
/**
* @Gedmo\Slug(fields={"title"}, unique=true)
*/

#[Gedmo\Slug(fields: ['title'], unique: true)]
#[ORM\Column(type: 'string', length: 255)]
protected $slug;


+ 4
- 7
Doctrine/Extension/TimestampableTrait.php Wyświetl plik

@@ -7,15 +7,12 @@ use Gedmo\Mapping\Annotation as Gedmo;

trait TimestampableTrait
{
/**
* @Gedmo\Timestampable(on="create")
*/

#[Gedmo\Timestampable(on: 'create')]
#[ORM\Column(type: 'datetime')]
protected $createdAt;

/**
* @Gedmo\Timestampable(on="update")
*/
#[Gedmo\Timestampable(on: 'update')]
#[ORM\Column(type: 'datetime')]
protected $updatedAt;

@@ -43,4 +40,4 @@ trait TimestampableTrait
return $this;
}

}
}

+ 2
- 6
Doctrine/Extension/TranslatableTrait.php Wyświetl plik

@@ -7,11 +7,7 @@ use Gedmo\Mapping\Annotation as Gedmo;

trait TranslatableTrait
{
/**
* Post locale
* Used locale to override Translation listener's locale
* @Gedmo\Locale
*/
#[Gedmo\Locale]
protected $locale;

#[ORM\Column(type: 'array', nullable: true)]
@@ -42,4 +38,4 @@ trait TranslatableTrait

return $this;
}
}
}

+ 2
- 2
composer.json Wyświetl plik

@@ -12,9 +12,9 @@
}
],
"require": {
"php": ">=7.2.5",
"php": ">=8.1",
"artgris/filemanager-bundle": "^2.2",
"easycorp/easyadmin-bundle": "^3.0",
"easycorp/easyadmin-bundle": "^4.0",
"friendsofsymfony/ckeditor-bundle": "^2.2",
"stof/doctrine-extensions-bundle": "^1.5"
},

Ładowanie…
Anuluj
Zapisz