You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ phpstan analyse
Note: Using configuration file /Users/brianhenry/Sites/bh-wp-bitcoin-gateway/phpstan.neon.
Fatal error: Cannot declare class WpOrg\Requests\Autoload, because the name is already in use in /Users/brianhenry/Sites/bh-wp-bitcoin-gateway/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php on line 18703
Script phpstan analyse --memory-limit 1G handling the cs event returned with error code 255
I think there are two ways to address it.
Add documentation to the README:
# Add a `provide` entry to tell Composer not to install Requests.# brew install jq sponge
cat composer.json | jq ".provide += { \"rmccue/requests\": \"*\" }"| sponge composer.json
If one is using the library in a WordPress context but uses composer for installation, I recommend to use replace in composer.json to not install rmccue/requests two times. The composer.json could look like this:
I've been getting errors using PhpStan WordPress:
I think there are two ways to address it.
Add documentation to the README:
main...BrianHenryIE:WP-Requests-PSR18-Adapter:patch-1
Or move
"rmccue/requests": "^1.8 || ^2.0"
fromrequire
torequire-dev
and addsuggest
:main...BrianHenryIE:WP-Requests-PSR18-Adapter:patch-2
I think the latter should work. It's more drastic than the first but more straightforward for consumers of this package.
The text was updated successfully, but these errors were encountered: