Skip to content

Version 3 Migration

Mat Lipe edited this page Feb 19, 2024 · 2 revisions

WP CLI Tools

The stubs for the wp-cli/php-cli-tools used to contain a patch version in the file name. This required updating the phpstan config every time a new patch version was available. Going forward the file will be set a minor version so patch version updates are received automatically.

# Previous
scanFiles:
  - %rootDir%/../../lipemat/phpstan-wordpress/stubs/wp-cli/php-cli-tools-0.11.11.php

# New
scanFiles:
  - %rootDir%/../../lipemat/phpstan-wordpress/stubs/wp-cli/php-cli-tools-0.11.php

WooCommerce Stubs

Version 3 will no longer include any WooCommerce related stubs.

As it turns out, WooCommerce is updated frequently and various projects will use various versions of WooCommerce and WooCommerce Subscriptions at various times. (notice all the "various"). With each project requiring its specific version of the stubs it makes more sense to require the necessary version in the project's composer.json file instead of from the phpstan-wordpress library.

The woocommerce-subscriptions.sh stub generator will remain in the repository. You may use the generator to run off a stub file for WooCommerce Subscription at any time.

Clone this wiki locally