Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 9, 2024 via composer

rector/rector 0.18.0

Instant Upgrade and Automated Refactoring of any PHP code
Package summary
Share
0
issues
1
license
2
MIT
Package created
15 Jul 2017
Version published
17 Aug 2023
Maintainers
2
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
phpstan/phpstan@1.10.60
rector/rector@0.18.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of rector/rector 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
phpstan/phpstan1.10.60-MIT
prod

Visualizations

Frequently Asked Questions

What does rector/rector do?

Rector, also known as rector/rector, is an exceptional tool designed to instantly upgrade and refactor your PHP code. It effectively serves two main purposes. Firstly, it offers instant upgrades from PHP 5.3 to 8.2 and supports major open-source projects such as Symfony, PHPUnit and Doctrine. This ensures that you can have your code constantly at the cutting-edge level of PHP and frameworks without exerting any effort. Secondly, Rector allows for automated refactoring. If you want to maintain high code quality, especially when introducing new developers to your team, Rector can streamlines this process. Simply add Rector to your CI and let it continuously refactor your code to maintain a high code quality.

How do you use rector/rector?

To use Rector/rector, start by installing it using composer with the following command: composer require rector/rector --dev. After installing, there are two main ways to use Rector, either by a single rule for controlled changes, or by groups of rules known as sets. This can be done by creating a rector.php file in your root directory with the command vendor/bin/rector, and modifying it as follows:

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;

return static function (RectorConfig $rectorConfig): void {
    // register single rule
    $rectorConfig->rule(TypedPropertyFromStrictConstructorRector::class);

    // here we can define, what sets of rules will be applied
    // tip: use "SetList" class to autocomplete sets with your IDE
    $rectorConfig->sets([
        SetList::CODE_QUALITY
    ]);
};

You can then run Rector using the command: vendor/bin/rector process src. If you prefer to verify the changes that would be made first, use the --dry-run option as follows: vendor/bin/rector process src --dry-run.

Where are the rector/rector docs?

For complete documentation and additional details on how to use Rector/rector, you can visit the official documentation. You can also explore the find variety of Rector Rules through the Rector Rules overview page. For a more in-depth understanding of how Rector works, creating your own rules, and more, consider reading Rector - The Power of Automated Refactoring book. This book guides you step by step through the Rector setup and how to create your own rules.