Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rectorphp/rector-downgrade-php

Repository files navigation

See availableDowngrade rules

Install

This package is already part ofrector/rector package, so it works out of the box.

All you need to do is install the main package, and you're good to go:

composer require rector/rector --dev

Use Sets

To add a set to your config, useRector\Set\ValueObject\DowngradeLevelSetList class and pick target set:

useRector\Set\ValueObject\DowngradeLevelSetList;useRector\Config\RectorConfig;returnstaticfunction (RectorConfig$rectorConfig):void {$rectorConfig->sets([        DowngradeLevelSetList::DOWN_TO_PHP_72    ]);};

Then run Rector to downgrade your code to PHP 7.2!

vendor/bin/rector

How the Downgrade Workflow looks?

It's simple in the nature. Read thesehow-to posts to get the idea:


Learn Rector Faster

Rector is a tool thatwe develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:

Both ways support us to and improve Rector in sustainable way by learning from practical projects.

Contributors17

Languages


[8]ページ先頭

©2009-2025 Movatter.jp