---
title: "How can I fix scheduled job rector errors?"
date: "2025-05-27T09:50:57+00:00"
summary: "Learn how to fix scheduled job rector errors in Code Studio with step-by-step solutions for outdated versions and configuration issues."
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/code-studio/help/69326-how-can-i-fix-scheduled-job-rector-errors"
id: "0da028c9-0bbc-42ae-89fb-4b0af88ef0b1"
---

**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](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-stage)

[Test Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-job)

`Undefined constant Rector\Core\Configuration\Option::IMPORT_DOC_BLOCKS`

Application

Customer

**Resolution 1:**

1.  Run `composer remove palantirnet/drupal-rector`.
2.  Delete the `rector.php` file from the root of your project, allowing Code Studio to handle the rector going forward.

**Resolution 2:**

1.  Run `composer update palantirnet/drupal-rector -W` to upgrade your rector package to the latest rector version.
2.  Remove the `rector.php` file from the root of your project.
3.  Run `cp vendor/palantirnet/drupal-rector/rector.php` to recopy the `rector.php` file.

**Description**

**Build stage**

**Job**

**Error message**

**Category**

**Responsibility**

[Test Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-stage)

[Test Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-job)

`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:**

1.  Remove the `rector.php` file at the root of your project.
2.  Run `cp vendor/palantirnet/drupal-rector/rector.php` to recopy the `rector.php` file to your project.