php-scoper: PEAR-style non-namespaced PSR-0 class not available in autoloader

Bug report

Question Answer
Box version 3.6.0
PHP version 7.3
Platform with version MacOS 10.13.16
Github Repo - https://github.com/vimeo/psalm

Reproduction

Run

composer bin box install
vendor/bin/box --debug compile

Notice the autoload_classmap.php in .box_dump is missing an entry for JsonMapper (but has other entries).

This class isn’t used in Psalm-proper, but it is used in Psalm’s language server (which @greg0ire is working to enable in the phar via a --language-server flag)

Here’s the (hopefully temporary) hack I’m using to work around it: https://github.com/vimeo/psalm/compare/phar-compat#diff-feb180cea6e9d88bcfcbbbf7addc6efaR25

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 21 (8 by maintainers)

Commits related to this issue

Most upvoted comments

So it’s not easily fixable, but I believe at the very least a doc entry could be added in the list of PHP-Scoper’s shortcomings a few possible alternative solutions

(thanks for helping, by the way - this is above and beyond)