silexphp / Silex-WebProfiler

MIT License
210 stars 61 forks source link

Error on loading any page after installing. #128

Closed duncan-qabana closed 6 years ago

duncan-qabana commented 6 years ago

I wanted to try out the profiler, but can not get it to work. My error seems similar to #94 .

Neither the property "redirect" nor one of the methods "redirect()", "getredirect()"/"isredirect()" or "__call()" exist and have public access in class "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector".

The composer.lock does not show any packages downloaded at v3, except assests, which I need for another package.

If I try to update the http-kernel to ~3.0 as suggested, or trying to install symfony/monolog-bridge, I get massives errors with last 2 messages :

Your requirements could not be resolved to an installable set of packages. Installation failed, reverting ./composer.json to its original content.

To test, I removed my own registers and added the default like the docs. Nothing changed.

I tried to mess around in the code. If you disable the if block, it doesn't throw the error, but then an error popup opens to open the profiler, which shows no errors.

The relevant part of my composer.json:

{
    "require": {
        "monolog/monolog": "^1.23",
        "twig/twig": "^1.0",
        "silex/silex": "^2.0",
        "symfony/validator": "*",
        "symfony/config": "*",
        "symfony/translation": "~2.8",
        "symfony/security-csrf": "~2.8",
        "symfony/twig-bridge": "~2.8",
        "symfony/locale": "~2.8",
        "symfony/form": "~2.8",
        "symfony/yaml": "~2.8",
        "symfony/doctrine-bridge": "~2.8",
        "doctrine/doctrine-bundle": "^1.6",
        "symfony/asset": "~2.8",
        "symfony/security": "~2.8",
        "symfony/intl": "~2.8",
        "silex/web-profiler": "^2.0"
    }
}
jojovem commented 6 years ago

i fixed my problem fixing these versions:

"symfony/web-profiler-bundle": "3.2.", "symfony/http-kernel": "3.2.",

duncan-qabana commented 6 years ago

I tried your solution. It now opens the bar on the bottom of the page, but then it still says:

An error occurred while loading the web debug toolbar. Open the web profiler. Neither the property "responsecookies" nor one of the methods "responsecookies()", "getresponsecookies()"/"isresponsecookies()" or "__call()" exist and have public access in class "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector".

I am using an external debugger now. Thanks for your help, though. Glad it worked for you !