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

kint-php/kint dependency #63

Closed
finnan444 opened this issue Oct 12, 2018 · 5 comments
Closed

kint-php/kint dependency #63

finnan444 opened this issue Oct 12, 2018 · 5 comments

Comments

@finnan444
Copy link

Despite the fact you mentioned kint-php/kint: ^2.2 as "requires (dev)" dependency it causes fatal error, if kint-php/kint: version 1.1 or lower installed. The problem is in
vendor/amenadiel/jpgraph/src/config.inc.php:758

\Kint::$enabled_mode = DEBUGMODE;

This static property is undeclared in older versions of kint.

Plus, i think it is a bad practice to declare a Class that mocks Kint inside config.inc.php.
What is the pupose, all the code with kint is commented like:

//\Kint::dump($files[$i]);
@ffflabs
Copy link
Collaborator

ffflabs commented Oct 14, 2018

I see your point. Since it's a dev dependency Kint wouldn't be installed when you require jpgraph, but if your project already has kint it will try to use the static property and things will blow up.

I'm releasing a new version to address this problem

@ffflabs
Copy link
Collaborator

ffflabs commented Oct 14, 2018

@finnan444 I agree it's kind of an antipattern to mock the class, but when I get some spare time I try to repair broken components of this library, for which I use quite a few debug and dump statements. I wouldn't like to release a version which breaks because I forgot to comment out those statements.

@finnan444
Copy link
Author

@amenadiel Thanks for fast response, hope you release a new version to composer soon

@ffflabs
Copy link
Collaborator

ffflabs commented Oct 19, 2018

@finnan444 ouch, I just noticed I had this package under an old url in packagist.That's why it wasn't updating properly.

@finnan444
Copy link
Author

@amenadiel I've just installed 3.6.21 and it works fine. But while testing your class disabled Kint globally, so i have to manually enable it during debugging =)

\Kint::enabled(true);
ddd('Here');

Hope you fix all the bugs and remove the mockup class

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

2 participants