pimcore / demo

The Official Pimcore Demo Package - You're new to Pimcore? That's your entry point! 🤓
Other
97 stars 106 forks source link

[Bug]: Error with composer create-project #591

Open blankse opened 2 weeks ago

blankse commented 2 weeks ago

Expected behavior

No error

Actual behavior

Error: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory

Steps to reproduce

Execute as described in the README: COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo my-project

blankse commented 2 weeks ago

After debugging, it seems that the GenericExecutionEngineBundle needs a DB connection. However, the connection will be configured in the step ./vendor/bin/pimcore-install.

In this step an error occurs because the MkdirCacheWarmer was not executed. The temp directory is not created, and the requirement check is failing: php: ../../magick/exception.c:1121: ThrowMagickExceptionList: Assertion `exception != (ExceptionInfo *) NULL' failed.

So the error should be since this PR https://github.com/pimcore/demo/pull/583

@mcop1 Can you look into this?

fashxp commented 2 weeks ago

Hmm ... as far as we understand this, do we have following situation: Doctrine ORM needs a DB connection during cache:clear when server_version is not known to it - at least sometimes. Right now, composer create project runs the scripts defined in composer.json, which contains cache:clear the command.

For the tests we solved it like here: https://github.com/pimcore/demo/pull/583/files#diff-d7b672fd527bb6f82ceb3c23b6f417911c595d020f4a14aac07cad73936dbf0cR66-R101

Any better solutions are highly appreciated.

blankse commented 2 days ago

@fashxp Can we set a server_version? So that composer create-project is possible again. I think the installer should then set the correct server_version anyway.

fashxp commented 2 days ago

If this is working, I have no idea to be honest...