"System error: "Node "PhpParser\Node\Expr\ClassConstFetch" with is missing scope required for scope refresh"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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);- Lingua principale
- PHP
- Stelle
- 10.5k
- Fork
- 742
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rectorphp/rector
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
MyCLabsMethodCallToEnumConstRector should only refactor according to RuleDefinitionForse già presa @samsonasik l’ha presa 1 giorno fa. Apertabug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 55/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di rectorphp/rector
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Spomky-Labs/pwa-bundle#480 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
WebDevStudios/wp-search-with-algolia#593 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Browser plugin leaves `playwright run-server` running after tests when /bin/sh is dashAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
needs-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-fuzzing bug claude Major
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno