arnoson / kirby-vite

Use Kirby CMS together with Vite
MIT License
81 stars 7 forks source link

fix: deprecated dynamic property #17

Closed bogdancondorachi closed 1 year ago

bogdancondorachi commented 1 year ago

When running npm run preview on PHP 8.2 an deprecated warning will appear:

Creation of dynamic property arnoson\KirbyVite\Vite::$manifest is deprecated

This means that using the var keyword to create dynamic properties is no longer allowed in PHP 8.2, and you should instead declare properties explicitly in the class definition.

To quickly fix this issue, I've declared the $manifest property in the Vite class definition as follows: protected ?array $manifest = null;

arnoson commented 1 year ago

good catch, thanks!