skip to Main Content

Php versions – Error with Doctrine and Laminas: driverClass has to implement the DoctrineDBALDriver interface

I recently upgraded a Laminas project from doctrine-migrations 1.4 to 3.6 and doctrine-orm-module from 1 to 5.3. On my deployment server, when running ./vendor/bin/doctrine-module sync-metadata-storage, I receive the following error: Fatal error: Uncaught DoctrineDBALException: The given 'driverClass' DoctrineDBALDriverPDOMySqlDriver has to…

VIEW QUESTION

Php – Doctrine detach

I don't understand how detach() works.. This is a use case: /** * @ORMEntity(repositoryClass="UsersRepository") * @ORMTable(name="users") */ class Users { // .... /** * @ORMManyToOne(targetEntity="AppEntityParentType") * @ORMJoinColumn(name="ID_PARENT_TYPE", referencedColumnName="ID_PARENT_TYPE") * private ParentType $parentType; } /** * @ORMEntity(repositoryClass="CustomInfoRepository") * @ORMTable(name="custom_info") */ class…

VIEW QUESTION

Php – Syntax Error line 0, col 245: Error: Unexpected ')'

This SQL request works perfectly: SELECT f.idFile, f.FileName, f.date_file, COUNT(DISTINCT (ligne.numLigne)) AS nbCmde, COUNT(DISTINCT CASE WHEN bl.date_production != "0000-00-00 00:00:00" THEN ligne.numLigne END) AS cmdProd, COUNT(DISTINCT CASE WHEN bl.date_production = "0000-00-00 00:00:00" THEN ligne.numLigne END) AS cmdNonProd, COUNT(DISTINCT CASE WHEN…

VIEW QUESTION

“Can PHP filter entities by today’s date?”

This is what I tried: $time = date('Y/m/d'); $alerts = $repository->findBy(['datum' => $time]); and $time = date('Y/m/d'); $lessons = $repository->createQueryBuilder('q') ->where('q.datum LIKE currentDate') ->setParameter('currentDate', $time); For some reason those don't work and I have no idea why. It should be…

VIEW QUESTION
Back To Top
Search