wordpress-plugin icon indicating copy to clipboard operation
wordpress-plugin copied to clipboard

phpcs updates

Open tijmenbruggeman opened this issue 1 month ago • 0 comments

Updates and additions to formatting dependencies. This PR will also help ensure the plug-in stays compatible with php5.6.

Changes

  • Update license to GPL-2.0-or-later. License "GPL-2.0+" is a deprecated SPDX license identifier, use "GPL-2.0-or-later" instead
  • Added php-compatibility checks. This check will ensure that our plug-in stays compatible with the defined version (in this case php5.6)
  • Added php-compatibility-wp as wordpress adds some polyfills. This ensures the compatiblity checker doesn't fall over those additions.
  • updated phpcs and wordpress codestyles, ran autoformatter
  • manual fixes
    • line endings
    • use gmdate instead of date
    • explicit visibility for methods
    • allow one class per file
    • strict in_array comparisons for types
    • ignore strict comparison check (===) as this would functionally change the workings and I don't want to add functional changes in this PR.

tijmenbruggeman avatar Nov 24 '25 19:11 tijmenbruggeman