You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PHP 9.0, dynamic properties will result in a fatal error!
Steps to reproduce
composer require phpstan/phpstan
vendor/bin/phpstan analyse
Expected behavior
No deprecation notices
Actual behavior
Deprecation notices like:
Access to an undefined property craft\base\ElementInterface::$applicationDeadline.
Access to an undefined property craft\base\ElementInterface::$badgeIcon.
Access to an undefined property craft\base\ElementInterface::$benefitRelations.
Access to an undefined property craft\base\ElementInterface::$cardColor.
Access to an undefined property craft\base\ElementInterface::$cardImage.
Access to an undefined property craft\base\ElementInterface::$cardLink.
Access to an undefined property craft\base\ElementInterface::$cardLogo.
Access to an undefined property craft\base\ElementInterface::$customEventDate.
Access to an undefined property craft\base\ElementInterface::$disableCardImage.
Access to an undefined property craft\base\ElementInterface::$duplicateOf.
Access to an undefined property craft\base\ElementInterface::$eventEnd.
Access to an undefined property craft\base\ElementInterface::$eventStart.
Access to an undefined property craft\base\ElementInterface::$eventTargetGroup.
Access to an undefined property craft\base\ElementInterface::$hardDelete.
Access to an undefined property craft\base\ElementInterface::$id.
Access to an undefined property craft\base\ElementInterface::$image.
Access to an undefined property craft\base\ElementInterface::$kicker.
Access to an undefined property craft\base\ElementInterface::$logo.
Access to an undefined property craft\base\ElementInterface::$metaDescription.
Access to an undefined property craft\base\ElementInterface::$moreInformation.
Access to an undefined property craft\base\ElementInterface::$noindex.
Access to an undefined property craft\base\ElementInterface::$ogDescription.
Access to an undefined property craft\base\ElementInterface::$ogImage.
Access to an undefined property craft\base\ElementInterface::$partnerCompany.
Access to an undefined property craft\base\ElementInterface::$place.
Access to an undefined property craft\base\ElementInterface::$productDates.
Access to an undefined property craft\base\ElementInterface::$productTargetGroup.
Access to an undefined property craft\base\ElementInterface::$scholarshipDescription.
Access to an undefined property craft\base\ElementInterface::$showApplicationDeadline.
Access to an undefined property craft\base\ElementInterface::$siteId.
Access to an undefined property craft\base\ElementInterface::$title.
Access to an undefined property craft\base\ElementInterface::$updatingFromDerivative.
Access to an undefined property craft\base\ElementInterface::$uri.
Access to an undefined property craft\base\ElementInterface::$useCustomEventDate.
Access to an undefined property craft\base\FieldInterface::$handle.
Access to an undefined property craft\base\FieldInterface::$id.
- '#^Access to an undefined property .*Interface\b.*::\$\w+\.$#'
- '#Cannot access property \$\w+ on .*Interface\.$#'
In the future, we are expecting this will be fixed via a new @phpstan-require-use tag we can add to interfaces which expect implementers to use a trait (phpstan/phpstan#9899).
Description
Craft CMS still uses dynamic properties which are deprecated since PHP 8.2, see https://php.watch/versions/8.2/dynamic-properties-deprecated
In PHP 9.0, dynamic properties will result in a fatal error!
Steps to reproduce
Expected behavior
No deprecation notices
Actual behavior
Deprecation notices like:
Solution
Declare the properties or mark classes to allow dynamic properties, see https://www.php.net/manual/en/class.allowdynamicproperties.php
Craft CMS version
4.5
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: