DowngradeFinalPropertyPromotionRector#317
Conversation
There was a problem hiding this comment.
use docblockUpdater instead, ensure existing doc when exists not removed, see example
There was a problem hiding this comment.
use VisibilityManipulator->hasVisibility() as well
There was a problem hiding this comment.
if(!$this->visibilityManipulator->hasVisibility($param, Visibility::PUBLIC)){
continue;
}Correct ?
There was a problem hiding this comment.
use VisibilityManipulator->makeNonFinal() usage, see
There was a problem hiding this comment.
The makeNonFinal method is accepting Class_|ClassMethod, not accepting param
There was a problem hiding this comment.
It should add Param as well on rector-src then
There was a problem hiding this comment.
| class Fixture | |
| class SkipFixtureReadonly |
There was a problem hiding this comment.
Probably consider implicit property promotion fixture as well:
class ImplicitFinalPropertyPromotion
{
- public function __construct(final string $foo)
+ public function __construct(
+ /**
+ * @final
+ */
+ public string $foo
)
{
}
}https://3v4l.org/BXcO6/rfc#vgit.master
However, this probably a "bug" in php 8.5 which without explicit public, it can't be accessed even it should means a public, see the different:
- https://3v4l.org/TdZfV/rfc#vgit.master (explicit)
- https://3v4l.org/LMaT0/rfc#vgit.master (implicit)
|
Please add fixture I requested above #317 (review) and run rector and fix-cs |
|
Please check it. |
|
Please add fixture for implicit public I requested above |
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Outdated
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Outdated
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Outdated
Show resolved
Hide resolved
rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php
Show resolved
Hide resolved
|
Thank you @arshidkv12 , I've added |
| @@ -0,0 +1,25 @@ | |||
| <?php | |||
There was a problem hiding this comment.
@arshidkv12 oh, this is .php file, and skipped from the scan, should be .php.inc, I was wondering why it was working ...
No description provided.