GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rectorphp/rector-downgrade-php: Rector downgrade rules for PHP

BranchesTags
Open more actions menu

Latest commit

 

History

527 Commits
527 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bench
bench
 
 
config/set
config/set
 
 
rules-tests
rules-tests
 
 
rules
rules
 
 
src
src
 
 
stubs/Symfony/Component/Annotation
stubs/Symfony/Component/Annotation
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
ecs.php
ecs.php
 
 
phpstan.neon
phpstan.neon
 
 
phpunit.xml
phpunit.xml
 
 
rector.php
rector.php
 
 
structarmed.php
structarmed.php
 
 

Repository files navigation

Rector Rules for PHP Downgrade

See available Downgrade rules

Install

This package is already part of rector/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, use Rector\Set\ValueObject\DowngradeLevelSetList class and pick target set:

use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withDowngradeSets(php72: true);

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 these how-to posts to get the idea:

  • How all Frameworks can Bump to PHP 8.1 and You can Keep Using Older PHP
  • Introducing ECS Prefixed and Downgraded to PHP 7.1
  • How to bump Minimal PHP Version without Leaving Anyone Behind?
  • Rector 0.10 Released - with PHP 7.1 Support

Learn Rector Faster

Rector is a tool that we 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:

  • read a book - The Power of Automated Refactoring
  • hire our experienced team to improve your code base

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

About

Rector downgrade rules for PHP

tomasvotruba.com/blog/how-to-release-php-81-and-72-package-in-the-same-repository/

Resources

Readme
MIT license
Activity
Custom properties

Stars

44 stars

Watchers

1 watching

Forks

28 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.