Skip to content

Conversation

@arshidkv12
Copy link
Contributor

@samsonasik
Copy link
Member

This is invalid, the variable is undefined by default, and we don't know if it is a global variable or not, eg via include.

Manual verify is the way if needed.

@samsonasik samsonasik closed this Sep 7, 2025
@arshidkv12
Copy link
Contributor Author

Ok.
Please add roadmap to rector new implementation.

@samsonasik
Copy link
Member

No, rector can't handle variable - global use. It always depends on usage of the project.

@arshidkv12
Copy link
Contributor Author

I am saying this is not related to this PR. Please add the details of the new implementations required, and then I can work on them

@samsonasik
Copy link
Member

There is no implementation can be handled by rector for this, not sure if you mean on php-src itself, then I have no idea about that.

@arshidkv12
Copy link
Contributor Author

Thank you. I’m ready to contribute. Could you please suggest some ideas, similar to this: rectorphp/rector#9265

@samsonasik
Copy link
Member

Some new feature that introduce new syntax, eg: final property promotion needs downgrade rule first if possible, eg:

public function __construct(
-    final public string $id
+    /** @final */
+    public string $id
) {}

see https://3v4l.org/3XL5r/rfc#vgit.master

Some consideration that final seems doesn't always mean property promotion, which strange on the implementation, without public modifier marking, it seems marked as normal parameter:

see https://3v4l.org/noq7hD/rfc#vgit.master

which works on other flag, eg: readonly without public, it marked as property promotion already

see https://3v4l.org/Bo7Fr/rfc#vgit.master

The downgrade rule can be created and registered at

https://github.com/rectorphp/rector-downgrade-php

@arshidkv12
Copy link
Contributor Author

Thank you

@arshidkv12
Copy link
Contributor Author

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.

2 participants