flint / flint

Enhancements to Silex with structure and conventions.
http://flint.rtfd.org
MIT License
123 stars 15 forks source link

Beware Symfony 3.x! #31

Closed gander closed 8 years ago

gander commented 8 years ago

composer require flint/flint:~1.0:

flint/flint              1.7.1   Enhanced Silex
flint/tacker             0.6.0   Easy configuration based on Symfony Config
pimple/pimple            v1.1.1  Pimple is a simple Dependency Injection Container for PHP 5.3
psr/log                  1.0.0   Common interface for logging libraries
silex/silex              v1.3.4  The PHP micro-framework based on the Symfony Components
symfony/config           v3.0.0  Symfony Config Component
symfony/debug            v3.0.0  Symfony Debug Component
symfony/event-dispatcher v3.0.0  Symfony EventDispatcher Component
symfony/filesystem       v3.0.0  Symfony Filesystem Component
symfony/http-foundation  v3.0.0  Symfony HttpFoundation Component
symfony/http-kernel      v3.0.0  Symfony HttpKernel Component
symfony/routing          v3.0.0  Symfony Routing Component
twig/twig                v1.23.1 Twig, the flexible, fast, and secure template language for PHP
Fatal error:  Uncaught exception 'Symfony\Component\Routing\Exception\ResourceNotFoundException' with message 'None of the routers in the chain matched url "/"' in vendor/flint/flint/src/Flint/Routing/ChainMatcher.php:85
Stack trace:
#0 vendor/flint/flint/src/Flint/Routing/ChainMatcher.php(56): Flint\Routing\ChainMatcher->doMatch('/')
#1 vendor/silex/silex/src/Silex/LazyUrlMatcher.php(51): Flint\Routing\ChainMatcher->match('/')
#2 vendor/symfony/http-kernel/EventListener/RouterListener.php(103): Silex\LazyUrlMatcher->match('/')
#3 [internal function]: Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#4 vendor/symfony/event-dispatcher/EventDispatcher.php(171): call_user_func(Array, Object(Symfony\Component\HttpKerne in vendor/symfony/http-kernel/Controller/ControllerResolver.php on line 122

Proper composer install: composer require flint/flint:~1.0 symfony/http-kernel:~2.3 symfony/config:~2.3

So far, only so much I noticed , but there may be more problems. I suggest you install all components of the write ~2.3 instead of >=2.3

henrikbjorn commented 8 years ago

@gander thanks for opening this ticket, do you have an example application or small code example where it doesn't work?

gander commented 8 years ago

Example: http://eternal-santana-3000.codio.io/

henrikbjorn commented 8 years ago

@gander So the issue is that the pretty exception page is gone?

henrikbjorn commented 8 years ago

Ahh i see. The conversion from exception to http exception aren't happening.

Edit: something in the ExceptionListener that Flint registers does this. Flint uses the one from the http-kernel component. So something have changed in it.

https://github.com/symfony/symfony/pull/15710 this was the culprit, we should probably fix this.

this is how they Fixed it in Silex https://github.com/silexphp/Silex/blob/217d29aa5059afef2907eb8a80e0b5d4c674400e/src/Silex/ExceptionHandler.php#L53

gander commented 8 years ago

Yes.

henrikbjorn commented 8 years ago

Fixed in master, could you please verify my own testing, before i tag a new release.

gander commented 8 years ago

Look http://eternal-santana.codio.io:3000/ it's working! Great!