generer en annotations au lieu d'attributs (Symfony 5.4 et PHP 8.2)

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : generer en annotations au lieu d'attributs (Symfony 5.4 et PHP 8.2)

Re: generer en annotations au lieu d'attributs (Symfony 5.4 et PHP 8.2)

par semsem » 25 avr. 2023, 16:05

Ohhhh super je croyais qu'il fallait que je remplace attributs par annotations, ça fonctionne !! Merci infiniment ;))

Re: generer en annotations au lieu d'attributs (Symfony 5.4 et PHP 8.2)

par Saian » 25 avr. 2023, 14:48

T'as pas bien regardé alors. Je vois bien orm / mappings / App dans ta capture. Y a juste à rajouter type: annotation.

D'ailleurs en symfony 5.4 c'est sensé être par défaut annotation.
https://symfony.com/doc/5.4/reference/c ... .html#type

Re: generer en annotations au lieu d'attributs (Symfony 5.4 et PHP 8.2)

par semsem » 25 avr. 2023, 14:23

Re: generer en annotations au lieu d'attributs (Symfony 5.4 et PHP 8.2)

par Saian » 25 avr. 2023, 12:09

Salut, dans un cas basique logiquement dans config/packages/doctrine.yaml :
doctrine:
    # ...
    orm:
        # ...
        mappings:
            # ...
            SomeEntityNamespace: # usually AppBundle or App
                type: annotation
https://symfony.com/doc/5.3/reference/c ... .html#type

generer en annotations au lieu d'attributs (Symfony 5.4 et PHP 8.2)

par semsem » 25 avr. 2023, 11:30

Bonjour y'a t-il la possibilité de changer les attributs qui génère automatiquement par symfony en annotations svp ?
Je change manuellement je perds du temps...

Auriez-vous une solution ou un tips merci :))

https://zupimages.net/up/23/17/2tpc.png