Date Published: May 27, 2025
How can I fix scheduled job rector errors?
Description
This error is usually a result of an older version of rector being added in your project. Code Studio attempts to add the latest version of rector during the Pipeline. However, it uses your version if that is included in your project’s composer.lock file.
| Build stage | Job | Error message | Category | Responsibility | 
|---|
| Test Drupal | Test Drupal | Undefined constant Rector\Core\Configuration\Option::IMPORT_DOC_BLOCKS | Application | Customer | 
Resolution 1:
- Run composer remove palantirnet/drupal-rector.
- Delete the rector.phpfile from the root of your project, allowing Code Studio to handle the rector going forward.
Resolution 2:
- Run composer update palantirnet/drupal-rector -Wto upgrade your rector package to the latest rector version.
- Remove the rector.phpfile from the root of your project.
- Run cp vendor/palantirnet/drupal-rector/rector.phpto recopy therector.phpfile.
Description
| Build stage | Job | Error message | Category | Responsibility | 
|---|
| Test Drupal | Test Drupal | Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::__construct(): Argument #1 ($container) must be of type Symfony\Component\DependencyInjection\ContainerBuilder, RectorPrefix202208\Symfony\Component\DependencyInjection\ContainerBuilder given, called in /home/codestudio/.config/composer/vendor/rector/rector/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php on line 67 | Application | Customer | 
This error indicates that your project’s rector.php file needs to be recreated. Newer versions of rector altered the configuration syntax, resulting in your rector.php file no longer being valid.
Resolution:
- Remove the rector.phpfile at the root of your project.
- Run cp vendor/palantirnet/drupal-rector/rector.phpto recopy therector.phpfile to your project.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.