-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deprecation notices with PHP 8.2. #86
Conversation
Guys any plan to merge this PR and also i can see some more depreciation related PHP 8.2 |
@@ -11,6 +11,7 @@ class Less_Tree_Color extends Less_Tree { | |||
public $alpha; | |||
public $isTransparentKeyword; | |||
public $type = 'Color'; | |||
public $name = 'n/a'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to reproduce or find how or where this is read or written to. I don't see it in the composer test
output on PHP 8.2, and quick analysis doesn't show an obvious place where Color->name
takes place.
$ git grep -E '>name =|\bname;' lib/
lib/Less/Parser.php: if ( $rule->name == $var_name ) {
lib/Less/Parser.php: $name = $nameLoop = $val->name;
lib/Less/Parser.php: $nonVendorSpecificName = $name;
lib/Less/Parser.php: return $name;
lib/Less/Tree/Call.php: public $name;
lib/Less/Tree/Call.php: $this->name = $name;
lib/Less/Tree/Directive.php: public $name;
lib/Less/Tree/Directive.php: $this->name = $name;
lib/Less/Tree/Mixin/Definition.php: public $name;
lib/Less/Tree/Mixin/Definition.php: $this->name = $name;
lib/Less/Tree/NameValue.php: public $name;
lib/Less/Tree/NameValue.php: $this->name = $name;
lib/Less/Tree/Rule.php: public $name;
lib/Less/Tree/Rule.php: $this->name = $name;
lib/Less/Tree/Rule.php: $name = $this->name;
lib/Less/Tree/Rule.php: $this->name = $name;
lib/Less/Tree/Variable.php: public $name;
lib/Less/Tree/Variable.php: $this->name = $name;
lib/Less/Tree/Variable.php: $name = $this->name;
lib/Less/Visitor/toCSS.php: if ( $directiveNode->name === '@charset' ) {
lib/Less/Visitor/toCSS.php: $key = $rule->name;
The only one that seems plausible is the references in toCSS.php, but those have explicit Rule or NameValue type checks which each have a name property already.
Do you have a stack trace or reproduction case for this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<b>Deprecated</b>: Creation of dynamic property Less_Tree_Color::$name is deprecated in <b>/usr/share/php/Icinga/Less/Visitor.php</b> on line <b>196</b><br />
See: https://github.com/Icinga/icingaweb2/blob/v2.11.3/library/Icinga/Less/Visitor.php#L196
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll land this without the Color
change for now.
Dynamic properties are deprecated in 8.2, see: https://wiki.php.net/rfc/deprecate_dynamic_properties