Update PHP-Scoper to v0.16.2
See original GitHub issueTask Description
The current version of PHP-Scoper is 0.16.2.
In version 0.16.0, there were lots of improvements to the config, making it a lot simpler for us to configure PHP-Scoper in a WP plugin context.
It means we can get rid of all the manual str_replace
calls in the scoper config thanks to expose-global-{constants, classes, functions}
and expose-{namespaces, constants, classes, functions}
We could even automate this by setting the config based on the WP stubs, see https://github.com/humbug/php-scoper/issues/303#issuecomment-1021388471
Though we could split that up in its own ticket.
Implementation Brief
- Install latest version of PHP-Scoper via Composer
- Remove all the
str_replace
calls in the PHP-Scoper config - Install
sniccwp/php-scoper-wordpress-excludes
as a dev dependency and configure theexclude-classes
,exclude-functions
, andexclude-constants
options accordingly
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Results From Across the Web
[Scoper] Improve the WP support experience #303 - GitHub
One straightforward way is to simply tell php-scoper to not prefix ... Update PHP-Scoper to v0.16.2 GoogleForCreators/web-stories-wp#10407.
Read more >GraphQL API for WordPress is now scoped, thanks to PHP ...
Plugin GraphQL API for WordPress is now scoped. This means the plugin can be finally uploaded to the WordPress plugin directory.
Read more >PHP Scoper: How to Avoid Namespace Issues in your ...
See how you can use PHP-Scoper to namespace your dependencies and avoid the world's worst knock-knock joke.
Read more >This Week In GraphQL - Amazon S3
Release Version 16.2 · graphql-java/graphql-java · GitHub ... GraphQL API for WordPress is now scoped, thanks to PHP-Scoper!
Read more >Google Cloud Talent Solution for PHP
v0.16.2 - Jan 12, 2022 ... update with latest version of protobuf (#3742) (a84e2a4) ... PHP-Scoper is a tool which essentially moves any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome! That definitely makes me more confident that we can use this in this project.
@swissspidy Implemented now. We run a daily check against php-stubs/wordpress stubs and tag a new release automatically. Available at packagist now aswell.
We changed from .php to .json because with .php git would go mad on the numerically indexed array. It would show 6000 additions and deletions basically. With JSON it’s much clearer now what got updated and what got removed.