More recently, I created an out of the box Mezzio sample project, used pretty much the same dependencies, copied the working entities into the new project, but get
‘[Semantical Error] The annotation “@Doctrine\ORM\Mapping\Entity” in class App\Entity\xxxx does not exist, or could not be auto-loaded’
I haven’t found any chat on StackExchange that seems to point to a solution that fits easily with my Lamnis project ----- is there some link that cleanly tells me how to deal with this issue? Is there some setup from the old zend expressive project I need to move to the new one?
So is the link a ‘hint’ of how to fix the issue by changing code, or a ‘hint’ to install psr-container-doctrine?
I see it requires PHP 7.3, (I’m at 7.2.24) but the update site is complaining about unsigned repositories which gives me pause:
Reading package lists… Done
W: GPG error: http://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 78BD65473CB3BD13
E: The repository ‘http://dl.google.com/linux/chrome/deb stable Release’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
So… did you change existing code, or fix the issue by installing psr-container-doctrine?
Okay - so you’ll need to sort what’s going on in your apt sources lists; it looks like you need to refresh the GPG key associated with the Chrome debian repositories so you can finish updating. If you need help with that, check Stack Overflow, as it’s outside the support we can offer here.
Once you’ve installed PHP 7.3, try running the composer require statement again.
Yes, thank you. I did upgrade to PHP 7.3, and installed the Roave package, but there was no change in the app behavior, as I still have problems with annotations not being auto-loaded. As far as I can tell, my code does pretty much everything as shown at that github site. That site includes a note under the example at https://github.com/Roave/psr-container-doctrine/blob/master/example/minimal-config.php that if using php, use the Annotation Driver and directs me to the full config — but the full config doesn’t have any obvious hints about using the Annotation Driver.
I’ve been tracing through the code, and I’ll post something once I get this figured out.
When I built this application, I based much of it on a zend-expressive example that included DoctrineORMModule and DoctrineModule. Including those packages with the out-of-the-box Laminas example was apparently a bad thing. All worked well once I removed them from my configuration (config.php) and cleaned up my composer.json…