PHP 8.0 | :sparkles: New `PHPCompatibility.ParameterValues.ForbiddenGetClassNoArgsOutsideOO` sniff by jrfnl · Pull Request #1602 · PHPCompatibility/PHPCompatibility

8.0.0 Calling this function from outside a class, without any arguments, will now throw an Error.
Previously, an E_WARNING was raised and the function returned false.

Applies to both get_class() as well as get_called_class().

Refs:

This adds a new sniff to detect the above, which wasn't mentioned in the PHP 8.0 generic changelog nor in the migration guide, though a note about it can be found on the functions manual pages.

Includes tests and documentation.

Related to #809