Closed jlherren closed 11 months ago
Hi @jlherren. Thanks for the report. Will take a look 🙂
@jlherren can you paste the vendor/installed.json
and vendor/installed.php
when you require that package.
Also I probably need the source of the package to debug the what the problem with that package might be.
Here are the two requested files (updated to icanhazstring/composer-unused
0.8.10 now). I can't share setasign/fpdi_pdf-parser
publicly, but if you provide a private means of contact, I can send you a ZIP file with the entire reproduction repo (minus the credentials, but including the installed vendor/
).
This is all on PHP 8.1.
I investigated this again and it looks like it's not composer-unused's fault. That Setasign package is just weird. The manifest file calls the package setasign/fpdi_pdf-parser
, but its composer.json calls it setasign/fpdi-pdf-parser
. It's no surprise that inconsistent names will lead to problems.
Perhaps they will react to my tweet.
As far as I'm concerned, this issue can be closed. Feel free to reopen it if you really want to support weird packages :)
EDIT: They fixed it in version 2.1.2
Bug description
I am ignoring a package
setasign/fpdi_pdf-parser
, which works fine when using the default output formatter. But when using the GitHub or GitLab formatter, there's an uncaught exception. The situation is a bit special, because this package is in a private repository and needs credentials to download, but hopefully I can provide enough information to hunt down the issue. Also note that the package name contains an underscore. I don't know if this is relevant, but it seems that composer-unused normalizes these into hyphens.This affects version
0.8.9
. I can't test0.8.8
because of #515. Version0.8.6
worked fine for the GitLab formatter, but is also broken for the GitHub formatter.Output of
php vendor/bin/composer-unused --configuration=composer-unused.php
:Output of
php vendor/bin/composer-unused --configuration=composer-unused.php --output-format=gitlab
:The output is similar when using the GitHub formatter
Additional information
composer.json (with my download credentials omitted):
composer-unused.php:
The bug is reproducible for me with just these two files.