symfony-cmf / cmf-sandbox

Base project for trying CMF components integration
http://cmf.symfony.com
Other
367 stars 140 forks source link

[WIP] Go into SF 4 #403

Open ElectricMaxxx opened 6 years ago

ElectricMaxxx commented 6 years ago

With this PR i'd like to use SF4 only together with dev-master of all our bundles and component. I also changed the directory structure.

Todo:

ElectricMaxxx commented 6 years ago

@dbu i think i need your help now. For some reasons the switcher from lunetics local seems to ask the wrong router and commes with an exeption:

[2018-03-08 06:13:51] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Warning: Illegal offset type in isset or empty")." at /home/maximilian/OpenSource/Cmf/cmf-sandbox/templates/base.html.twig line 58 {"exception":"[object] (Twig_Error_Runtime(code: 0): An exception has been thrown during the rendering of a template (\"Warning: Illegal offset type in isset or empty\"). at /home/maximilian/OpenSource/Cmf/cmf-sandbox/templates/base.html.twig:58, ErrorException(code: 0): Warning: Illegal offset type in isset or empty at /home/maximilian/OpenSource/Cmf/cmf-sandbox/var/cache/dev/srcDevDebugProjectContainerUrlGenerator.php:148)"} []

really hidden in dev.log. The console says:

127.0.0.1:60380 [500]: /en - Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Too few arguments to function FOS\RestBundle\Controller\ExceptionController::__construct(), 0 passed in /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/http-kernel/Controller/ControllerResolver.php on line 111 and exactly 3 expected in /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/friendsofsymfony/rest-bundle/Controller/ExceptionController.php:43
Stack trace:
#0 /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/http-kernel/Controller/ControllerResolver.php(111): FOS\RestBundle\Controller\ExceptionController->__construct()
#1 /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php(100): Symfony\Component\HttpKernel\Controller\ControllerResolver->instantiateController('FOS\\RestBundle\\...')
#2 /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/framework-bundle/Controller/ControllerResolver.php(57): Symfony\Component\HttpKernel\Controller\Containe in /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/friendsofsymfony/rest-bundle/Controller/ExceptionController.php on line 43

but this is an other issue. But debugging from /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/lunetics/locale-bundle/Lunetics/LocaleBundle/Twig/Extension/LocaleSwitcherExtension.php:73 into the geration of the routes, i saw that the exception comes from the static router wich tries to use our documents as key in an array. You know what is going on here?

ElectricMaxxx commented 6 years ago

https://github.com/lunetics/LocaleBundle/commit/aae31708c3f90bfca3ee10c6e1796f647260738c#diff-595ba6704d367c68cf4fed1720b8b725R36 it was me ....

ElectricMaxxx commented 6 years ago

Yes, got the first working sandbox now. had to do some changes in vendor/ folder (temporary and PRs are open now on third party), but it works locally now.

dbu commented 6 years ago

great! sorry i am not being more responsive.

what do you think about the state of the phpcr bundle? should i do an alpha release or are there any problems still open?

ElectricMaxxx commented 6 years ago

@dbu from my POV these packages are ready:

ElectricMaxxx commented 6 years ago

@dbu i think i can get almost all test issues here, but can you give me a hand with the local switcher thing? I commented out the complete switcher in template as they seem use the wrong router, a router which is not able to use an cmf document. To reproduce simply de-comment the line and see the error

dbu commented 6 years ago

do you get 2.6.2 or the latest master? you fixed something in the bundle about the router: https://github.com/lunetics/LocaleBundle/compare/2.6.2...master (or maybe broke, i don't know ;-) )

good idea if you squash the commits.

ElectricMaxxx commented 6 years ago

Ahh, you are right .. i did something there. It took quite while

dbu commented 6 years ago

can you please rebase on develop? i cleaned up the file header in styleci. and then apply the styleci fixes that remain on this branch?

ElectricMaxxx commented 6 years ago

you where right, the master of lunetics/locale-bundle works fine

ElectricMaxxx commented 6 years ago

@dbu you did the style changes on master? a rebase with so many file movement will be awesome now ...

ElectricMaxxx commented 6 years ago

oh, was easier then i thought.

ElectricMaxxx commented 6 years ago

@lunetics can you create a new release with the router change on master pls?

dbu commented 6 years ago

i now tagged 2.6.3 of the luneticsbundle with the latest changes.

ElectricMaxxx commented 5 years ago

@dbu i think i am very close to done here. i simply fixed everything to "cmf 2.1" (what ever that is g) and SF 4.1. Doing so we should be able to release sandbox in 2.1 now for the released cmf versions. And i would do same for 2.2 then, that with SF 4.2 and CMF 2.2 (the things i currently prepare). But i still have a problem to find the correct `liip/functional-test-bundl" version, can you give a hand here?