diff --git a/composer.json b/composer.json index 7a373be..ab34cd3 100644 --- a/composer.json +++ b/composer.json @@ -5,8 +5,8 @@ "require": { "php": "^8.1", "doctrine/orm": "^2.0", - "symfony/form": "^5.0|^6.0", - "symfony/twig-bundle": "^5.0|^6.0" + "symfony/form": "^5.0|^6.0|^7.0", + "symfony/twig-bundle": "^5.0|^6.0|^7.0" }, "autoload": { "psr-4": { diff --git a/src/Controller/ParameterController.php b/src/Controller/ParameterController.php index c982627..9bcbfbd 100644 --- a/src/Controller/ParameterController.php +++ b/src/Controller/ParameterController.php @@ -7,7 +7,7 @@ namespace Ardent\ParameterBundle\Controller; use Ardent\ParameterBundle\Service\ParameterService; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class ParameterController extends BaseController { diff --git a/src/Entity/Parameter.php b/src/Entity/Parameter.php index 92d43b9..4191efa 100644 --- a/src/Entity/Parameter.php +++ b/src/Entity/Parameter.php @@ -2,32 +2,23 @@ namespace Ardent\ParameterBundle\Entity; -use Doctrine\DBAL\Types\TextType; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\NumberType; -/** - * @ORM\Entity - * @ORM\Table(name="parameter_bundle_parameters") - */ +#[ORM\Entity()] +#[ORM\Table(name: 'parameter_bundle_parameters')] class Parameter { - /** - * @ORM\Id - * @ORM\GeneratedValue(strategy="AUTO") - * @ORM\Column(type="integer") - */ - private ?int $id; + #[ORM\Id] + #[ORM\GeneratedValue] + #[ORM\Column] + private ?int $id = null; - /** - * @ORM\Column(type="string") - */ + #[ORM\Column] private ?string $name; - /** - * @ORM\Column(type="string") - */ + #[ORM\Column(type: 'string')] private mixed $value; public function getId(): int