[pkg-php-pear] Bug#911278: [Fwd: php7cc: PHP Fatal error: Uncaught Error: Cannot instantiate interface PhpParser\Parser]

Dmitry Smirnov onlyjob at debian.org
Fri Nov 16 08:01:13 GMT 2018

> Ok, I can work on it, however there is an information in README.md in
> php7cc repository (https://github.com/sstalle/php7cc) that:
> The project is no longer supported...
> - do you know about this?

I did not know about that. Thanks.

Then perhaps we should request removal of this package?
Or would it be better to at least keep it out of "Buster"?

> So the question is if this package is still really needed (i couldn't find
> any package which depends on it)?

I think this package is still valuable on its own. It is helpful to detect 
outdated code that needs update for compatibility with PHP-7. I've used 
"php7cc" to report compatibility problems to some projects.

> I have already forked the php7cc repository and did some amendments to
> force it working with php-parser 3 - please check 
> https://github.com/lbacik/php7cc/tree/php-parser-3 - but even if the
> script works properly in case of simple task, unit tests fail. So it is
> worth nothing. And IMO such approach - with patching actual code - can't
> success without active project developing.

I'm not qualified to produce a patch for this problem.

If you can contribute the patch (upstream and to debian package) then only 
you can judge whether it is worth the effort.

> So what left - from my point of view (if this package is really
> needed):
> (1) to add php-parser in version 1.4.1 as a separate package (php-
> parser-1.4.1) to fulfill dependency of php7cc. Is it possible? Than you
> have to only change the autoload configuration to point to that older
> version of php-parser.

It is undesirable to introduce an outdated package just to fulfill the 
dependency. Better to patch "php7cc" for compatibility with up-to-date "php-
parser" or remove the former.

> (2) "linking php-parser statically" :) with php7cc source - I mean by
> this to just add the php-parser code to the php7cc source and remove
> the dependency to php-parser package. Once again the autoload file will
> have to be edited to load the php-parser from the directory within
> php7cc package but it should work.

Private code copies are against the policy. In exceptional circumstances it 
may be justifiable but IMHO not in this case.

> Let me know what you think - if you still want to fix this issue i will
> also try to catch the author of php7cc to ask him about his opinion in
> this matter.

It would be great if you could as upstream please. Thank you.

 Dmitry Smirnov.


The surest way to corrupt a youth is to instruct him to hold in higher
esteem those who think alike than those who think differently.
        -- Friedrich Nietzsche
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-php-pear/attachments/20181116/0452fefe/attachment.sig>

More information about the pkg-php-pear mailing list