System error: Class ... should be known at this point
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start with AddParamBasedOnParentClassMethodRector.php at the reported reflection lookup, then inspect how Rector discovers classes and processes files. The reproducer is the LDAPAccountManager/lam project linked in the report; compare behavior between Rector 2.7.x and 2.8.0 or later. Done means Rector processes the affected files without the reported system error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report
| Subject | Details |
|---|---|
| Rector version | 2.8.3 |
I get lots of errors that classes could not be processed because they should be known at this point. This did not happen with 2.7.x and started with version 2.8.0.
Skipping the rule that shows up in the stack trace only leads to a different rule that fails.
Minimal PHP Code Causing Issue
Unable to provide a minimal test case but you can run rector here:
https://github.com/LDAPAccountManager/lam
[ERROR] Could not process
"/home/github/actions-runner2/_work/lam/lam/lam/lib/2factor.inc" file,
due to:
"System error: "Class "LAM\LIB\TWO_FACTOR\BaseProvider" should be known
at this point"
Stack trace:
#0
vendor/rector/rector/rules/Php80/Rector/ClassMethod/AddParamBasedOnPare
ntClassMethodRector.php(119):
Rector\Rector\AbstractRector->fetchClassLikeReflection()
#1 vendor/rector/rector/src/Rector/RectorRunner.php(60):
Rector\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector-
>refactor()
#2
vendor/rector/rector/src/PhpParser/NodeTraverser/RectorNodeTraverser.ph
p(94): Rector\Rector\RectorRunner->run()
#3
vendor/rector/rector/src/PhpParser/NodeTraverser/RectorNodeTraverser.ph
p(44):
Rector\PhpParser\NodeTraverser\RectorNodeTraverser->traverseArray()
#4
vendor/rector/rector/src/PhpParser/NodeTraverser/RectorNodeTraverser.ph
p(115):
Rector\PhpParser\NodeTraverser\RectorNodeTraverser->traverseNode()
#5
vendor/rector/rector/src/PhpParser/NodeTraverser/RectorNodeTraverser.ph
p(44):
Rector\PhpParser\NodeTraverser\RectorNodeTraverser->traverseArray()
#6
vendor/rector/rector/src/PhpParser/NodeTraverser/RectorNodeTraverser.ph
p(115):
Rector\PhpParser\NodeTraverser\RectorNodeTraverser->traverseNode()
#7
vendor/rector/rector/src/PhpParser/NodeTraverser/RectorNodeTraverser.ph
p(37):
Rector\PhpParser\NodeTraverser\RectorNodeTraverser->traverseArray()
#8 vendor/rector/rector/src/Application/FileProcessor.php(106):
Rector\PhpParser\NodeTraverser\RectorNodeTraverser->traverse()
#9
vendor/rector/rector/src/Application/ApplicationFileProcessor.php(198):
Rector\Application\FileProcessor->processFile()
#10
vendor/rector/rector/src/Application/ApplicationFileProcessor.php(166):
Rector\Application\ApplicationFileProcessor->processFile()
#11
vendor/rector/rector/src/Application/ApplicationFileProcessor.php(136):
Rector\Application\ApplicationFileProcessor->processFiles()
#12 vendor/rector/rector/src/Console/Command/ProcessCommand.php(182):
Rector\Application\ApplicationFileProcessor->run()
#13
vendor/rector/rector/vendor/symfony/console/Command/Command.php(289):
Rector\Console\Command\ProcessCommand->execute()
#14 vendor/rector/rector/vendor/symfony/console/Application.php(920):
RectorPrefix202610\Symfony\Component\Console\Command\Command->run()
#15 vendor/rector/rector/vendor/symfony/console/Application.php(280):
RectorPrefix202610\Symfony\Component\Console\Application->doRunCommand
()
#16 vendor/rector/rector/src/Console/ConsoleApplication.php(75):
RectorPrefix202610\Symfony\Component\Console\Application->doRun()
#17 vendor/rector/rector/vendor/symfony/console/Application.php(163):
Rector\Console\ConsoleApplication->doRun()
#18 vendor/rector/rector/bin/rector.php(171):
RectorPrefix202610\Symfony\Component\Console\Application->run()
#19 vendor/rector/rector/bin/rector(5): require_once('...')
#20 vendor/bin/rector(119): include('...')
#21 {main}". On line: 58
Expected Behaviour
Process the files without system errors.
- 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
-
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
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/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
-
Author mapping step: "create new user" and "assign to existing user" fields have no spacing between themCó thể đã có người làm @umeshnevase đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
WordPress/wordpress-importer#275 ·
-
security/openvpn-legacy: read-only user can stop a running VPNCó thể đã có người làm @besendorf đã nhận hôm nay. Đang mởincomplete
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
opnsense/plugins#5887 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
jira-created
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100