Archived post from my old blog (2007–2016), restored from the Wayback Machine. It is published as written at the time; tools and versions are likely out of date.
Errori random di Symfony2
Oggi ho aggiornato i vendors ed è apparso un altro di quegli errori random di Symfony2:
Catchable Fatal Error: Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Symfony\Bundle\DoctrineBundle\Registry given, called in .../app/cache/dev/appDevDebugProjectContainer.php on line 1336 and defined in ..../vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php line 31
500 Internal Server Error - ErrorException
Ho provato ovviamente a fare
bin/vendors install
bin/vendors update
rm -rf vendors/ && bin/vendors install
Alla fine ho optato per la soluzione drastica:
rm del progetto, git clone (di nuovo) ssh://progetto, bin/vendors install e passa la paura
Del perché ci fosse l’eccezione non è dato sapere.
=====
Edit:
Un barlume penso di averlo trovato:
Ho dovuto anche modificare il deps.lock, rimpiazzando 02d973b55a35b9578e1a20d4537213b24db687cf (la HEAD del 25/11 sul master) con 1c7e92f466d11f83130b0c1271f44d067a2c3b31 (
commit 1c7e92f466d11f83130b0c1271f44d067a2c3b31
Author: Fabien Potencier
Date: Tue Nov 22 16:45:42 2011 +0100
fixed tests config
)
Dal deps ho provato a togliere la specifica della versione lasciando il commit del 22/11 nel deps.lock e funziona se si fa un install dei vendors, invece se si fa un update serve anche la “version=origin/2.0” specificata.
Penso che una fase di RTFM riguardo deps e deps.lock sia auspicabile da parte mia, dato che non ci sto capendo moltodel perché e del percome 🙂
Edit2:
“There is also a php bin/vendors update command, but this has nothing to do with upgrading your project and you will normally not need to use it. This command is used to freeze the versions of all of your vendor libraries by updating them to the version specified in deps and recording it into the deps.lock file.”
Stavolta davvero bastava aprire gli occhi
← Archive