Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpstan Shim Laravel Package

phpstan/phpstan-shim

Deprecated shim for PHPStan. Since PHPStan 0.12, the main phpstan/phpstan package ships as a PHAR, making phpstan/phpstan-shim unnecessary. Upgrade by switching composer dependency to phpstan/phpstan ^0.12 and reinstalling.

View on GitHub
Deep Wiki
Context7
0.12.0

Thank you for using PHPStan!

Read more about the latest release here!

With the release of PHPStan 0.12, the primary Composer package used by most users, phpstan/phpstan, has switched to a PHAR file. It works the same way as phpstan-shim. The need for a separate PHAR distribution has ceased. Package phpstan/phpstan-shim is no longer needed.

You should upgrade to phpstan/phpstan 0.12 with the following steps:

  1. In your composer.json, rewrite line with "phpstan/phpstan-shim" to "phpstan/phpstan": "^0.12".
  2. Delete your composer.lock.
  3. Delete vendor/phpstan directory.
  4. Delete vendor/bin/phpstan and vendor/bin/phpstan.phar.
  5. Run composer install.

If you have any problem upgrading, don't hesitate to describe your issue at: https://github.com/phpstan/phpstan/issues/new/choose

0.11.6

PHPStan release notes are over at phpstan/phpstan.

Shim-specific fixes

  • Fix Composer autoloading in global Composer installation
  • Fixed %rootDir% to be consistent with phpstan/phpstan
0.10.5

Fixed two PHAR-related autoloading issues that originated in 0.10.4:

  • When running phpstan executable from phpstan-shim instead of phpstan.phar, the message "Fatal error: Cannot redeclare composerRequired3df62903055312660ab99fff5d55b82()" appeared. That's because PHP construct require_once didn't recognize the same file was already loaded. Fixed by checking defined constant about PHPStan runtime: https://github.com/phpstan/phpstan/commit/4dfaaac59d6d1af13fddf6d3e961d69744075be6
  • When running PHPStan's PHAR in a project where PHPStan is already installed locally, the message "PHP Fatal error: Uncaught TypeError: Argument 1 passed to _HumbugBox52624676281c\Symfony\Component\Console\Application::add() must be an instance of _HumbugBox52624676281c\Symfony\Component\Console\Command\Command, instance of PHPStan\Command\AnalyseCommand given" appeared. That's because the project autoloader had priority. Fixed by switching the order of autoloaders (they are prepended): https://github.com/phpstan/phpstan/commit/c6a8cd1fe08a23b9d101a55ffa9ff6b91d71ef5d
0.10.2

PHPStan release notes are over at phpstan/phpstan.

Additionally, libraries from inside the PHAR (like nikic/php-parser) are now propagated to Composer autoloader. So if you install phpstan/phpstan-shim and some other package that relies on nikic/php-parser, this will no longer be a problem. (#16, #19)

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui