[OXID] replace backwards-compatability classes in oxNew#2883
Merged
TomasVotruba merged 1 commit intorectorphp:masterfrom Feb 18, 2020
Merged
[OXID] replace backwards-compatability classes in oxNew#2883TomasVotruba merged 1 commit intorectorphp:masterfrom
TomasVotruba merged 1 commit intorectorphp:masterfrom
Conversation
Member
|
Nice job 👍 |
TomasVotruba
added a commit
that referenced
this pull request
Sep 1, 2022
rectorphp/rector-src@8961d20 [DX] Localize multi instance checker and privates accessor from Symplify + bump to PHPStan 1.8.3 (#2883)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OXID Framework has a wrapper for the
newkeyword, which allows loading a class likeA few years ago we moved to namespaces
... but many modules and projects out there still use the old syntax. This rule makes the transition to the new recommended way a breeze.
I plan to add a similar rector for replacing these classes also in docblocks (
@returnand@paramstatements) which should help to get static analysis like phpstan or psalm running. I will extract the class-map to a standalone class to make it usable in multiple rectors.