{"id":28387591,"url":"https://github.com/rectorphp/rector-downgrade-php","last_synced_at":"2025-06-26T20:31:30.576Z","repository":{"id":40553446,"uuid":"499893977","full_name":"rectorphp/rector-downgrade-php","owner":"rectorphp","description":"Rector downgrade rules for PHP","archived":false,"fork":false,"pushed_at":"2025-06-24T20:02:22.000Z","size":1271,"stargazers_count":44,"open_issues_count":0,"forks_count":20,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-24T20:47:36.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tomasvotruba.com/blog/how-to-release-php-81-and-72-package-in-the-same-repository/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rectorphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-04T17:31:12.000Z","updated_at":"2025-06-24T20:02:26.000Z","dependencies_parsed_at":"2024-02-24T06:23:05.906Z","dependency_job_id":"e428f96b-7c13-465f-a637-e626924a841f","html_url":"https://github.com/rectorphp/rector-downgrade-php","commit_stats":{"total_commits":127,"total_committers":5,"mean_commits":25.4,"dds":0.2834645669291339,"last_synced_commit":"23e55c64ba3ae187dad8f9453e520ca621dcae8d"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/rectorphp/rector-downgrade-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Frector-downgrade-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Frector-downgrade-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Frector-downgrade-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Frector-downgrade-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rectorphp","download_url":"https://codeload.github.com/rectorphp/rector-downgrade-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Frector-downgrade-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262139487,"owners_count":23265162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-30T18:38:04.033Z","updated_at":"2025-06-26T20:31:30.532Z","avatar_url":"https://github.com/rectorphp.png","language":"PHP","readme":"# Rector Rules for PHP Downgrade\n\nSee available [Downgrade rules](https://getrector.com/find-rule?query=downgrade+rules)\n\n## Install\n\nThis package is already part of [rector/rector](http://github.com/rectorphp/rector) package, so it works out of the box.\n\nAll you need to do is install the main package, and you're good to go:\n\n```bash\ncomposer require rector/rector --dev\n```\n\n\u003cbr\u003e\n\n## Use Sets\n\nTo add a set to your config, use `Rector\\Set\\ValueObject\\DowngradeLevelSetList` class and pick target set:\n\n```php\nuse Rector\\Set\\ValueObject\\DowngradeLevelSetList;\nuse Rector\\Config\\RectorConfig;\n\nreturn static function (RectorConfig $rectorConfig): void {\n    $rectorConfig-\u003esets([\n        DowngradeLevelSetList::DOWN_TO_PHP_72\n    ]);\n};\n```\n\nThen run Rector to downgrade your code to PHP 7.2!\n\n```bash\nvendor/bin/rector\n```\n\n\u003cbr\u003e\n\n## How the Downgrade Workflow looks?\n\nIt's simple in the nature. Read these *how-to* posts to get the idea:\n\n* [How all Frameworks can Bump to PHP 8.1 and You can Keep Using Older PHP](https://getrector.com/blog/how-all-frameworks-can-bump-to-php-81-and-you-can-use-older-php)\n* [Introducing ECS Prefixed and Downgraded to PHP 7.1](https://tomasvotruba.com/blog/introducing-ecs-prefixed-and-downgraded-to-php-71/)\n* [How to bump Minimal PHP Version without Leaving Anyone Behind?](https://getrector.com/blog/how-to-bump-minimal-version-without-leaving-anyone-behind)\n* [Rector 0.10 Released - with PHP 7.1 Support](https://getrector.com/blog/rector-010-released-with-php71-support)\n\n\u003cbr\u003e\n\n## Learn Rector Faster\n\nRector is a tool that [we develop](https://getrector.com/) 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:\n\n* read a book - \u003ca href=\"https://leanpub.com/rector-the-power-of-automated-refactoring\"\u003eThe Power of Automated Refactoring\u003c/a\u003e\n* hire our experienced team to \u003ca href=\"https://getrector.com/contact\"\u003eimprove your code base\u003c/a\u003e\n\nBoth ways support us to and improve Rector in sustainable way by learning from practical projects.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frectorphp%2Frector-downgrade-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frectorphp%2Frector-downgrade-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frectorphp%2Frector-downgrade-php/lists"}