forked from wallabag/wallabag
Migrate to Gedmo attributes
This commit is contained in:
@ -62,6 +62,9 @@ $config
|
|||||||
'symfony/web-profiler-bundle',
|
'symfony/web-profiler-bundle',
|
||||||
'symfony/web-server-bundle',
|
'symfony/web-server-bundle',
|
||||||
], [ErrorType::DEV_DEPENDENCY_IN_PROD])
|
], [ErrorType::DEV_DEPENDENCY_IN_PROD])
|
||||||
|
->ignoreErrorsOnPackages([
|
||||||
|
'gedmo/doctrine-extensions',
|
||||||
|
], [ErrorType::SHADOW_DEPENDENCY])
|
||||||
;
|
;
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
|||||||
@ -15,7 +15,7 @@ return RectorConfig::configure()
|
|||||||
])
|
])
|
||||||
->withRootFiles()
|
->withRootFiles()
|
||||||
->withImportNames(importShortClasses: false)
|
->withImportNames(importShortClasses: false)
|
||||||
->withAttributesSets(symfony: true, doctrine: true)
|
->withAttributesSets(symfony: true, doctrine: true, gedmo: true)
|
||||||
->withConfiguredRule(ClassPropertyAssignToConstructorPromotionRector::class, [
|
->withConfiguredRule(ClassPropertyAssignToConstructorPromotionRector::class, [
|
||||||
'inline_public' => true,
|
'inline_public' => true,
|
||||||
])
|
])
|
||||||
|
|||||||
@ -41,9 +41,9 @@ class Tag implements \Stringable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Expose
|
* @Expose
|
||||||
* @Gedmo\Slug(fields={"label"}, prefix="t:")
|
|
||||||
*/
|
*/
|
||||||
#[ORM\Column(length: 128, unique: true)]
|
#[ORM\Column(length: 128, unique: true)]
|
||||||
|
#[Gedmo\Slug(fields: ['label'], prefix: 't:')]
|
||||||
private $slug;
|
private $slug;
|
||||||
|
|
||||||
#[ORM\ManyToMany(targetEntity: Entry::class, mappedBy: 'tags', cascade: ['persist'])]
|
#[ORM\ManyToMany(targetEntity: Entry::class, mappedBy: 'tags', cascade: ['persist'])]
|
||||||
|
|||||||
Reference in New Issue
Block a user