Conversation
Disable ClassPropertyAssignToConstructorPromotionRector It only added string casts to lambda arguments.
Disable ClassPropertyAssignToConstructorPromotionRector It only added string casts to lambda arguments.
|
@coderabbitai review this pr |
|
@BacLuc: I'll review the pull request for you. This appears to be a Rector upgrade to PHP 8.3. I'll analyze the changes and provide feedback shortly. 🧠 Learnings used✅ Actions performedReview triggered.
|
carlobeltrame
left a comment
There was a problem hiding this comment.
What advantage do these override annotations yield? I never understood why java had them and I thought they stopped using them, no?
| extractProperty: fn (CampCollaboration $data) => $data->status, | ||
| beforeAction: fn (CampCollaboration $data) => $this->onBeforeStatusChange($data), | ||
| afterAction: fn (CampCollaboration $data) => $this->onAfterStatusChange($data) | ||
| beforeAction: $this->onBeforeStatusChange(...), |
There was a problem hiding this comment.
Wow, did not know that one
There was a problem hiding this comment.
I learned that too yesterday. And i thought i read the php release notes up to 8.4.
|
|
||
| protected function setCreateTime(ScheduleEntry $scheduleEntry, \DateTime $createTime) { | ||
| $createTimeProperty = (new \ReflectionClass(ScheduleEntry::class))->getProperty('createTime'); | ||
| $createTimeProperty->setAccessible(true); |
There was a problem hiding this comment.
Removing this seems wrong..?
There was a problem hiding this comment.
Note: As of PHP 8.1.0, calling this method has no effect; all properties are accessible by default.
See https://www.php.net/manual/en/reflectionproperty.setaccessible.php
And it goes even further (meaner): |
|
In php it has an effect too: https://www.php.net/manual/en/class.override.php |
No description provided.