Skip to content
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

Fatal error: Class 'Symfony\Component\VarDumper\Cloner\VarCloner' not found #406

Closed
kinglozzer opened this issue Apr 6, 2016 · 13 comments
Closed

Comments

@kinglozzer
Copy link

Fatal error: Class 'Symfony\Component\VarDumper\Cloner\VarCloner' not found in /***/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php on line 122

Appears to have been caused by #404, as 2.1.0 works fine. symfony/var-dumper is only in require-dev - so it isn’t installed for packages that require filp/whoops.

@GrahamCampbell
Copy link
Contributor

Doesn't look like a bug. It's in the suggests list: https://github.com/filp/whoops/blob/master/composer.json#L23.

@GrahamCampbell
Copy link
Contributor

That means if you want to use that feature, you need to add that dependency yourself. That's why composer dumps out a list of suggested packages when you run install.

@kinglozzer
Copy link
Author

So symfony/var-dumper is a requirement if you want to use PrettyPageHandler? That should be documented somewhere if that’s the case...

@GrahamCampbell
Copy link
Contributor

So symfony/var-dumper is a requirement if you want to use PrettyPageHandler? That should be documented somewhere if that’s the case...

It is documented?

@denis-sokolov
Copy link
Collaborator

This does, indeed, look like a bug. Anyone up to fix it? @jonasdt?

@GrahamCampbell
Copy link
Contributor

This does, indeed, look like a bug.

How is this a bug? We clearly have included this in the suggested dependencies, and we should not be forcing people to install this. Composer will clearly print to the screen that it's suggested, and it'll even tell you why too.

@kinglozzer
Copy link
Author

PrettyPageHandler, prior to 2.1.1, has never required that package to be installed. So it’s either a bug, or a pretty significant backward compatibility break

@GrahamCampbell
Copy link
Contributor

I'd say that much is a bug then. ;)

@jonasdt
Copy link
Contributor

jonasdt commented Apr 6, 2016

symfony/var-dumper is indeed a requirement if you want to use PrettyPageHandler, this was not the case before #404, this is the culprit

@jonasdt
Copy link
Contributor

jonasdt commented Apr 6, 2016

Any reason why this isn't a dependency?

@denis-sokolov
Copy link
Collaborator

We don’t want the users to require the var-dumper, it’s supposed to be optional. @jonasdt, can you adjust your code to be conditional on the VarDumper existing?

@kinglozzer
Copy link
Author

Any reason why this isn't a dependency?

Well it was originally added as a suggested package, with usage of it wrapped in class_exists(): 6a1c86b

Since then it has been added to require-dev, and that particular class_exists() check has been removed - #387 & #404

Edit: I was reading the diff wrong, the class_exists() check in TemplateHelper is still there :)

@jonasdt
Copy link
Contributor

jonasdt commented Apr 6, 2016

I'll push a fix today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants