Skip to content

Rector php83#8418

Merged
BacLuc merged 2 commits intoecamp:develfrom
BacLuc:rector-php83
Oct 30, 2025
Merged

Rector php83#8418
BacLuc merged 2 commits intoecamp:develfrom
BacLuc:rector-php83

Conversation

@BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Oct 29, 2025

No description provided.

Disable ClassPropertyAssignToConstructorPromotionRector
It only added string casts to lambda arguments.
Disable ClassPropertyAssignToConstructorPromotionRector
It only added string casts to lambda arguments.
@BacLuc
Copy link
Contributor Author

BacLuc commented Oct 29, 2025

@coderabbitai review this pr

@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

@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
Learnt from: BacLuc
PR: ecamp/ecamp3#8025
File: .helm/ecamp3/deploy.sh:1-7
Timestamp: 2025-08-24T13:01:06.983Z
Learning: In the ecamp3 project (.helm/ecamp3/deploy.sh), BacLuc prefers to keep shell scripts compatible with basic sh rather than switching to bash, prioritizing compatibility with minimal environments over advanced error handling features.

Learnt from: BacLuc
PR: ecamp/ecamp3#8025
File: .helm/ecamp3/values.yaml.gotmpl:157-165
Timestamp: 2025-08-24T12:52:55.631Z
Learning: In the ecamp3 project, BacLuc prefers to let PostgreSQL database name configuration errors (like hyphens or dots in names) fail explicitly rather than automatically sanitizing them. This "fail fast" approach ensures configuration issues are immediately visible instead of being silently corrected.
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@BacLuc BacLuc requested a review from a team October 29, 2025 20:49
Copy link
Member

@carlobeltrame carlobeltrame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(...),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, did not know that one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this seems wrong..?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@BacLuc
Copy link
Contributor Author

BacLuc commented Oct 30, 2025

What advantage do these override annotations yield? I never understood why java had them and I thought they stopped using them, no?

@Override is still here, and in java it even has an effect.

When overriding a method, you might want to use the @Override annotation that instructs the compiler that you intend to override a method in the superclass. If, for some reason, the compiler detects that the method does not exist in one of the superclasses, then it will generate an error. For more information on @Override, see Annotations.

And it goes even further (meaner):
https://www.baeldung.com/java-override#override-annotation

@BacLuc
Copy link
Contributor Author

BacLuc commented Oct 30, 2025

In php it has an effect too: https://www.php.net/manual/en/class.override.php

@BacLuc BacLuc added this pull request to the merge queue Oct 30, 2025
Merged via the queue into ecamp:devel with commit e1abba5 Oct 30, 2025
30 checks passed
@BacLuc BacLuc deleted the rector-php83 branch October 30, 2025 23:23
This was referenced Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants