rector: Child process Error when running rector
Bug Report
Hello, I want to use rector to reformat my Doctrine Annotations. But when I start rector with --dry-run. it shows me the files and the rules. But it stops befor finishing with the Error:
[ERROR] Could not process some files, due to:
"Child process error: ".
The strange thing, is that the reason for the error is just empty. I use the latest 0.13.9 version.
I tried to use this instruction: https://getrector.org/blog/how-to-upgrade-annotations-to-attributes
So my rector.php file looks like this:
<?php
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\SensiolabsSetList;
use Rector\Nette\Set\NetteSetList;
use Rector\Config\RectorConfig;
return function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
NetteSetList::ANNOTATIONS_TO_ATTRIBUTES,
SensiolabsSetList::FRAMEWORK_EXTRA_61,
]);
};
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (16 by maintainers)
@TomasVotruba, Following your comment I performed a few actions to get it working again;
$rectorConfig->paths([ __DIR__ . '/src' ]);Instead of entering it manuallySomehow this sequence of actions fixed the problems on my end. Your suggestion was very valuable @TomasVotruba, thank you! 😃
Hello @samsonasik,
I created a github action with the project and rector doctrine annotation to attribute. https://github.com/holema/rector_parallel_test
I hope this can help 😃
That’s seems parallel process, could you try with disable parallel:
and see if it is working?
If you’re running on windows, I don’t have windows11 at my local dev, so can’t test the exact environment.
We need the exact step by step to reproduce the issue, (the file, the config, the command that run), better to use Github repository with github action running.
You may can create reproducible repository with Github action with windows for it https://github.blog/changelog/2022-01-11-github-actions-jobs-running-on-windows-latest-are-now-running-on-windows-server-2022/