Skip to content

Instantly share code, notes, and snippets.

@akyoscommunication
Created September 1, 2022 08:52
Show Gist options
  • Select an option

  • Save akyoscommunication/1eed7b8cdffda6bb99243c579a9cda4f to your computer and use it in GitHub Desktop.

Select an option

Save akyoscommunication/1eed7b8cdffda6bb99243c579a9cda4f to your computer and use it in GitHub Desktop.
[Rector Symfony 6 + PHP 8] Modifier automatiquement les annotations en attributs + régler quelques bonnes pratiques Symfony #symfony
<?php
declare(strict_types=1);
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\SensiolabsSetList;
use Rector\Config\RectorConfig;
use RectorNette\Set\NetteSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
NetteSetList::ANNOTATIONS_TO_ATTRIBUTES,
SensiolabsSetList::FRAMEWORK_EXTRA_61,
]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment