coding-standards
coding-standards copied to clipboard
Support new magic methods in PHP 7.4
PHP 7.4 introduces two new magic methods, __serialize and __unserialize. Introducing support for this has broken PHPCS on the relevant repos because the Joomla.NamingConventions.ValidFunctionName.MethodDoubleUnderscore sniff does not know about these new methods.
Does the newer versions of PHPCS v3.4.x work with it?
hmm should't we be able to extend the $this->magicMethods array ourself as workaround?
You'll have to for the Joomla Coding Standards 2.x ruleset at a minimum unless you basically say that will never be PHP 7.4 friendly (AFAIK PHP_CodeSniffer isn't supporting 2.x anymore). For 3.x, the minimum PHP_CodeSniffer version can be bumped to something that supports it when available.