0

I'm working with Bolt CMS on a project. It seems great so far, but it looks like the Bolt team has been a bit cautious about switching from annotation mappings to attribute mappings, as when I use make:entity, I get this message:

[ERROR] Only attribute mapping is supported by make:entity, but the App\Entity\CommunityMember class uses a different format. If you would like this command to generate the properties & getter/setter methods, add your mapping configuration, and then re-run this command with the --regenerate flag.

Since Bolt's annotations are all in vendor files, I can't simply change them to attributes. I could have sworn that I had at one point run into a composer package that explicitly re-allows the maker bundle to work with annotation mappings as a stopgap, but now I can't seem to find it.

Can someone give me the name of that composer package, assuming it exists?

(Bonus points if you can show me a way to change doctrine.yaml such that it will support both types of mappings. Then I could write my new classes using attributes while not breaking backward compatibility.)

  • I tangentially [answered this](https://stackoverflow.com/q/73265477#73532203). Annotation support depends on maker-bundle, doctrine and php versions. The required ones might be compatible with your environment or not. – msg Sep 28 '22 at 14:45
  • Thanks, @msg. You did indeed. I think I might have been getting my composer packages mixed up. There might have been a package that allowed something else -- yaml configuration, for example -- that I got mixed up with my desired functionality this time around. Anyhow, thanks for the link. I think it solved my problem. – Mayor of the Plattenbaus Sep 28 '22 at 15:10

0 Answers0