Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rector Laravel Package

contao/rector

Automate Contao CMS code upgrades with Rector rules and presets. contao/rector helps refactor PHP codebases to newer Contao and PHP versions, applying safe transformations to reduce manual migration work and keep projects consistent.

View on GitHub
Deep Wiki
Context7

Rector configurations for Contao

This package includes the Rector configuration for Contao.

Installation

Add the package to your Contao installation via Composer:

composer require contao/rector --dev

Usage

Create a file named rector.php in the root directory of your project.

<?php

declare(strict_types=1);

use Contao\Rector\Set\SetList;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withSets([SetList::CONTAO])
    // Adjust the configuration according to your needs.
;

Then run the script like this:

vendor/bin/rector

What's inside?

The package contains the following custom rectors:

Class Description
SimplifyObjectOrNullCheckRector Replaces null comparisons that check for object|null with boolean comparisons.

License

Contao is licensed under the terms of the LGPLv3.

Getting support

Visit the support page to learn about the available support options.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity