infinum/eightshift-libs-stubs

PHPStan stubs for eightshift-libs project

0.8.0 2022-08-24 08:08 UTC

This package is auto-updated.

Last update: 2024-12-24 13:06:30 UTC


README

This package offers PHPStan stubs for the use with Eightshift Frontend Libs. Currently, it only holds the Helpers stubs, since those are the only ones needed for inspections inside the block files.

Usage

Install them using composer as

composer require infinum/eightshift-libs-stubs --dev

Then, while developing you should add the stubs to phpstan.neon.dist

parameters:
	bootstrapFiles:
		- %currentWorkingDirectory%/vendor/infinum/eightshift-libs-stubs/eightshift-libs-stubs.php

Modification of the stub generation

The stubs are using the PHP Stub Generator. In order to generate the new or updated stubs, you'll need to update the eightshift-libs inside the composer.json, and then generate new stubs using

php generate.php

This will create the eightshift-libs-stubs.php file.

License

Eightshift Libs Stubs ©2022 Eightshift and Infinum. It is free software, and may be redistributed under the terms specified in the LICENSE file.