wppunk / WPPlugin

Boilerplate for WordPress plugin using autoload, coding standard, webpack, PHP/JS tests, etc.
MIT License
147 stars 25 forks source link

Is it possible to downgrade min PHP to PHP 5.6? #12

Closed slaFFik closed 3 years ago

slaFFik commented 3 years ago

That’s the min version supported by WordPress.

As I understand, PHP 7.2 is used only because of tests libs, correct?

wppunk commented 3 years ago

Yep, it possible. You can change the PHP version into composer.json, plugin-name.php, readme.txt, .phpcs.xml. Then replace : void { to { in the src folder and fix the type hinting for the PluginName\Plugin::__construct method.

But I don't want to implement these changes to the master branch because PHP7+ has a lof of strong stuff.

slaFFik commented 3 years ago

Yeah, I totally understand. Thanks for the answer, I will most likely proceed that way.