Closed scruffycoderofficial closed 2 years ago
If I understand you correctly...
config/config.php
for defined \Skar\LaminasDoctrineORM\ConfigProvider::class,
in config providers listREADME.md
file (and don't forgot change host, you should use the database container hostname)docker exec my-image-name vendor/bin/laminas
)$container->get(\Doctrine\ORM\EntityManager::class);
@skar thank you for your help. The problem was that the module installer did not add the ConfigProvider
within the coonfig.php
file. Maybe we can add a note in the README to highlight this otherwise great work and thank you for your support. A very elegant and easy-to-use library.
I am not that well experienced with Zend Framework but I guess we could also, in the future, provide means for users to either choose to use Doctrine Cache or Symfony implementation or any other.
I think this would go a long way really. Thanks again.
^ Doctrine\ORM\EntityManager {[#114 ▼](http://0.0.0.0:8080/api/ping#sf-dump-162183931-ref2114)
-config: Doctrine\ORM\Configuration {[#116 ▶](http://0.0.0.0:8080/api/ping#sf-dump-162183931-ref2116)}
-conn: Doctrine\DBAL\Connection {[#132 ▶](http://0.0.0.0:8080/api/ping#sf-dump-162183931-ref2132)}
-metadataFactory: Doctrine\ORM\Mapping\ClassMetadataFactory {[#136 ▶](http://0.0.0.0:8080/api/ping#sf-dump-162183931-ref2136)}
-unitOfWork: Doctrine\ORM\UnitOfWork {[#138 ▶](http://0.0.0.0:8080/api/ping#sf-dump-162183931-ref2138)}
-eventManager: Doctrine\Common\EventManager {[#115 ▶](http://0.0.0.0:8080/api/ping#sf-dump-162183931-ref2115)}
-proxyFactory: Doctrine\ORM\Proxy\ProxyFactory {[#145 ▶]()}
-repositoryFactory: Doctrine\ORM\Repository\DefaultRepositoryFactory {[#137 ▶]()}
-expressionBuilder: null
-closed: false
-filterCollection: null
-cache: null
}
They was removed Cache from the Doctrine library to force using a PSR compatible cache libraries. You can use any other compatible library.
I've use the Skar\Cache
as fast replace and working out of the box.
Later I will update scripts to use installer.
Thank you for using my library. Feel free to contact me.
Hi,
I am running the following versions:
PHP
8.0
Mezzio
3.5.0
I have a MySQL service running behind docker that connects to my PHP container. These containers can talk to one another. The issue I am having, with the instructions given is that I am not able to get hold of the
EntityManager
within myActionHandler
classes. Also runningvendor/bin/mezzio
norvendor/bin/laminas
is yielding to any desired output.Ideally, I would like to be able to have some of the commands from DoctrineORM at my disposal.
Steps (post package install)
local.php
with the minimal settings as suggestedOnce this is done, supposedly, I am able to view DoctrineORM commands on either
Mezzio
command-line and/orlaminas-cli
.Classes involved #5
Action class
And lastly, below is my
ConfigProvider
class which contains the rest of the configurations.Bonus
A partial version of
composer.json
file.I am trying to figure out what it is that I am perhaps not doing right.
Could you please assist?