Closed hultberg closed 6 years ago
This change does not make much sense, there’s a reason why we do it that way. PHPStan extensions also require the php-parser and this “replace” key tells Composer not to install the parser again, because it’s already in the PHAR.
On Tue, 10 Jul 2018 at 15:27, Edvin Hultberg notifications@github.com wrote:
... and remove changes introduced in 5e9b61d https://github.com/phpstan/phpstan-shim/commit/5e9b61d366911012d4c8ddc5b9d97f51f20545af
Changes from 5e9b61d https://github.com/phpstan/phpstan-shim/commit/5e9b61d366911012d4c8ddc5b9d97f51f20545af is redundant with this commit as there is no need to load dependencies from the PHAR itself.
You can view, comment on, or merge this pull request online at:
https://github.com/phpstan/phpstan-shim/pull/20 Commit Summary
- Allow to install nikic/php-parser and remove changes introduced in 5e9b61d366911012d4c8ddc5b9d97f51f20545af
File Changes
- M README.md https://github.com/phpstan/phpstan-shim/pull/20/files#diff-0 (2)
- D bootstrap.php https://github.com/phpstan/phpstan-shim/pull/20/files#diff-1 (5)
- M composer.json https://github.com/phpstan/phpstan-shim/pull/20/files#diff-2 (6)
Patch Links:
- https://github.com/phpstan/phpstan-shim/pull/20.patch
- https://github.com/phpstan/phpstan-shim/pull/20.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phpstan/phpstan-shim/pull/20, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGZuP2BGe88tm17cWXNx0RL5S-0IE_dks5uFKuzgaJpZM4VJZ1Y .
--
Ondřej Mirtes
@ondrejmirtes What exactly was/is the issue with having nikic/php-parser installed in a composer project that also depends on this shim package? PHAR files are pre-built and should be self-contained as I have stressed multiple times.
You can install PHPStan extensions like phpstan-phpunit alongside both phpstan and phpstan-shim. We didn’t want the phpstan-phpunit installation to install nikic/php-parser again because it’s already available in the PHAR.
Extensions require nikic/php-parser because classes from it are part of their public interface and thus should be required explicitly in composer.json. We use composer-requirements-checker for that.
I don’t know what’s the current problem - seems to be solved in current dev-master of phpstan-shim and we’ll be tagged alongside PHPStan 0.10.2.
On Tue, 10 Jul 2018 at 15:57, Edvin Hultberg notifications@github.com wrote:
@ondrejmirtes https://github.com/ondrejmirtes What exactly was/is the issue with having nikic/php-parser installed in a composer project that also depends on this shim package? PHAR files are pre-built and should be self-contained as I have stressed multiple times.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/phpstan/phpstan-shim/pull/20#issuecomment-403831655, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGZuI7OIab24e6-UjG7SXHSaNmV8QKsks5uFLLBgaJpZM4VJZ1Y .
--
Ondřej Mirtes
Fixed by 0.10.2.
... and remove changes introduced in 5e9b61d366911012d4c8ddc5b9d97f51f20545af
Changes from 5e9b61d366911012d4c8ddc5b9d97f51f20545af is redundant with this commit as there is no need to load dependencies from the PHAR itself.
NOTE: Adding a note that I do not know what the reasoning behind adding a replace in the first place, only that I can't see the need for it now.