"System error: "Node "PhpParser\Node\Expr\ClassConstFetch" with is missing scope required for scope refresh"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
Start by reproducing the dry-run with the supplied Statistic.php example and Rector configuration, then trace where the ClassConstFetch node reaches scope refresh. The report does not name a test or source file, so locate the relevant processing path and add a regression test for this input. Done means dry-run processes the file without the scope refresh error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When running rector with dry-run, while it's displaying the results, i get this error :
[ERROR] Could not process "C:\wamp64\www\regies-portail\src\Entity\Statistic.php" file, due to:
"System error: "Node "PhpParser\Node\Expr\ClassConstFetch" with is missing scope required for scope refresh"
Here is the mentioned file :
`<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
/**
-
@ORM\Entity(repositoryClass="App\Repository\StatisticRepository")
-
@ORM\InheritanceType("JOINED")
-
@ORM\DiscriminatorColumn(name="statistic", type="string")
-
@ORM\DiscriminatorMap({"statistic"="App\Entity\Statistic", "page" = "App\Entity\Statistic\Page", "email" = "App\Entity\Statistic\Email"})
*/
class Statistic
{
use ORMBehaviors\Timestampable\Timestampable;/**
- @ORM\Id
- @ORM\GeneratedValue
- @ORM\Column(type="integer")
*/
private $id;
/**
- @ORM\ManyToOne(targetEntity="Connection", inversedBy="statistics")
*/
private $connection = null;
/**
- @ORM\ManyToOne(targetEntity="Concession", fetch="EAGER")
*/
private $concession;
public function getId()
{
return $this->id;
}public function getConnection()
{
return $this->connection;
}public function setConnection(Connection $connection = null)
{
$this->connection = $connection;return $this;}
public function getConcession()
{
return $this->concession;
}public function setConcession(Concession $concession = null)
{
$this->concession = $concession;return $this;}
}
`
And here goes the rector setting :
withPaths([ __DIR__ . '/src', __DIR__ . '/config', __DIR__ . '/tests', ]) // PHP 8.2, minimum requis pour Symfony 7.4 ->withPhpSets(php82: true) // Règles de migration Symfony et Doctrine ->withComposerBased( symfony: true, doctrine: true, ) // Annotations vers attributs PHP ->withAttributesSets( symfony: true, doctrine: true, sensiolabs: true, ) // Qualité du code Symfony ->withSets([ \Rector\Symfony\Set\SymfonySetList::SYMFONY_CODE_QUALITY, ]) ->withImportNames(removeUnusedImports: true);- Ngôn ngữ chính
- PHP
- Star
- 10.5k
- Fork
- 742
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rectorphp/rector
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
MyCLabsMethodCallToEnumConstRector should only refactor according to RuleDefinitionCó thể đã có người làm @samsonasik đã nhận 2 ngày trước. Đang mởbug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 55/100
Tất cả issue của rectorphp/rector
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
YunoHost-Apps/snappymail_ynh#205 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
ExpressionEngine/ExpressionEngine#5453 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
✨️ai-candidate effort: [XS] Made by AI module: user interface type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Logout link is empty in environment-variable mode without login form (regression from #1235)Đang mở0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Type: Enhancement Type: Support
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
google/site-kit-wp#14096 ·
Maintainer thường phản hồi trong vòng 2 ngày