Download the PHP package cambis/silverstripe-rector without Composer
On this page you can find all versions of the php package cambis/silverstripe-rector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cambis/silverstripe-rector
More information about cambis/silverstripe-rector
Files in cambis/silverstripe-rector
Package silverstripe-rector
Short Description Rector rules for Silverstripe.
License MIT
Informations about the package silverstripe-rector
Silverstripe Rector | Kaiako Ponga
This project contains Rector rules for Silverstripe CMS.
See available Silverstripe rules.
Prerequisites 🦺
Installation 👷♀️
Install via composer.
Ensure you have PSR-4 autoload setup in your composer.json
.
Verify everything is PSR-4 compliant.
Rebuild your application.
Configuration 🚧
If you do not have an existing rector.php
file, run the following command and Rector will create one for you.
Then use the SilverstripeLevelSetList
and SilverstripeSetList
sets and pick one of the constants.
Usage 🏃
Analyse your code with Rector and review the suggested changes.
Apply the suggested changes after they have been reviewed.
For more information on usage, please refer to the official docs.
Troubleshooting 😢
You may run into some issues while running rector. If you do, hopefully you will find one of the following examples useful.
Issue with the Rector autoloader
If you run into an issue such as 'Class ... was not found while trying to analyse it...', see the official docs.
Issue with the Silverstripe autoloader
If you receive an error such as 'System error: "Interface App\Contract\FooInterface was not found"', try rebuilding your application first before running Rector again.
If the problem still persists, check if you have imported the affected class incorrectly somewhere in your code. The following example illustrates this case.
Fix the import casing and rebuild your application before running Rector again.
If the problem continues to persist you can attempt resolve it by including the affected file during the bootstrapping process.
First copy the existing bootstrap file:
Then modifiy the file as so:
Finally, include the custom bootstrap file in your configuration:
Remember to rebuild your application first before running Rector again.
All versions of silverstripe-rector with dependencies
silverstripe/framework Version ^4.0 || ^5.0
webmozart/assert Version ^1.11
php Version ^7.4 || ^8.0