phpcs using PHP 8.1 outputs the following errors:
FILE: /var/www/html/web/modules/contrib/smart_date/modules/smart_date_recur/src/Plugin/Field/FieldFormatter/SmartDateRecurrenceFormatter.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------
339 | ERROR | "$this" can no longer be used in a plain function or method since PHP 7.1.
----------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/smart_date/src/TypedData/Plugin/DataType/SmartDate.php
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
17 | ERROR | The interface DateTimeInterface is intended for type hints only and is not implementable.
--------------------------------------------------------------------------------------------------------
The latter is just because phpcs thinks the DateTimeInterface used there is the PHP global interface.
Attached patch fixes these errors.
Needs review
3.7
Code