-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collector not compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface #385
Comments
Which version of the bundle do you use? 1.1.6.0 is the latest version supporting PHP 7.1 and the code looks different there. |
I double this: I get incompatibility fatal error.
Symfony 3.4.43 with httplug 2.2.0 and httplug-bundle 1.18 installed. Works fine on 1.17.0 |
Which PHP version do you use when you run into this issue? |
I have some problem. |
in #387 i make the lowest version test with php 7.2. the test is green with 7.2, so either we are missing a test on that collector or something weird is going on. we do test the collector: https://github.com/php-http/HttplugBundle/blob/master/tests/Unit/Collector/CollectorTest.php why does this not fail during the tests? |
@lies Are you sure that this is happening on PHP 7.2? Please note that the PHP version used on the command-line may be different from the one used when serving your application over HTTP. |
Problem confirmed here. PHP 7.1.33, but composer config.platform.php is PHP 7.2.5. I can confirm also that the bug appeared in 1.18.0. |
Well, If you are running your application on PHP 7.1, you must not set the platform PHP version to 7.2 as you will get non-compatible dependencies then. |
if you hack around with the platform configuration, i recommend you set your requirements, as well as indirect requirements, to exact version numbers that you know work together. (e.g. find in the httplug bundle changelog where we drop support for php 7.1 and pin your requirement to php-http/httplug-bundle to the version that came right before that). |
PHP version: 7.1.33
Description
During composer install then clearing cache in symfony application i got fatal error
How to reproduce
Possible Solution
public function collect(Request $request, Response $response, \Exception $exception = null)
instead
public function collect(Request $request, Response $response, $exception = null)
PHP Fatal error: Declaration of Http\HttplugBundle\Collector\Collector::collect(Symfony\Component\HttpFoundation\R
equest $request, Symfony\Component\HttpFoundation\Response $response, $exception = NULL) must be compatible with Sy
mfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $
request, Symfony\Component\HttpFoundation\Response $response, ?Exception $exception = NULL) in /vendor/php-http/httplug-bundle/src/Collector/Collector.php on line 191
The text was updated successfully, but these errors were encountered: