Code Monkey home page Code Monkey logo

rector-config's Introduction

Rector config

Coverage Maintainability CGL Tests Supported PHP Versions

This package contains basic Rector config for use in my personal projects. It is not meant to be used anywhere else. I won't provide support and don't accept pull requests for this repo.

๐Ÿ”ฅ Installation

Packagist Packagist Downloads

composer require --dev eliashaeussler/rector-config

โšก Usage

# rector.php

use EliasHaeussler\RectorConfig\Config\Config;
use EliasHaeussler\RectorConfig\Set\CustomSet;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
    // Optional: Configure PHP version explicitly
    // Can be left out to use the current environment's PHP version
    $phpVersion = PhpVersion::PHP_81;

    // Create config from Rector config object
    $config = Config::create($rectorConfig, $phpVersion)->in(
        __DIR__.'/src',
        __DIR__.'/tests',
    );

    // Skip specific paths
    $config->not(
        __DIR__.'/src/lib',
        __DIR__.'/tests/test-application/vendor',
    );

    // Include default PHPUnit sets
    $config->withPHPUnit();

    // Include default Symfony sets
    $config->withSymfony();

    // Include default TYPO3 sets
    $config->withTYPO3();

    // Include custom sets
    $config->withSets(
        new CustomSet(
            SetList::CODE_QUALITY,
            SetList::CODING_STYLE,
        ),
    );

    // Skip specific rectors
    $config->skip(
        AnnotationToAttributeRector::class,
        [
            __DIR__.'/src/Some/File.php',
        ],
    );

    // Apply configuration
    $config->apply();
};

โญ License

This project is licensed under GNU General Public License 3.0 (or later).

rector-config's People

Contributors

eliashaeussler avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

rector-config's Issues

Add custom presets

The following presets should be added:

  • Symfony project
  • TYPO3 extension

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • [TASK] Update all dependencies

Vulnerabilities

Renovate has not found any CVEs on osv.dev.

Detected dependencies

composer
composer.json
  • php ~8.1.0 || ~8.2.0 || ~8.3.0
  • rector/rector ^1.2
  • armin/editorconfig-cli ^1.8 || ^2.0
  • composer/composer ^2.0
  • eliashaeussler/php-cs-fixer-config ^2.0
  • eliashaeussler/phpstan-config ^2.0
  • ergebnis/composer-normalize ^2.30
  • illuminate/container ^10.39 || ^11.0
  • phpstan/extension-installer ^1.2
  • phpunit/phpunit ^10.1 || ^11.0
  • ssch/typo3-rector ^2.0
  • symfony/config ^5.4 || ^6.0 || ^7.0
  • typo3/cms-core ^12.4 || ^13.0
github-actions
.github/workflows/cgl.yaml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • shivammathur/setup-php v2
  • ramsey/composer-install v2
.github/workflows/release.yaml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • ncipollo/release-action v1
.github/workflows/tests.yaml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • shivammathur/setup-php v2
  • ramsey/composer-install v2
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • shivammathur/setup-php v2
  • ramsey/composer-install v2
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/download-artifact v4
  • paambaati/codeclimate-action v8.0.0
  • coverallsapp/github-action v2
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • shivammathur/setup-php v2
  • ramsey/composer-install v2
regex
.github/workflows/cgl.yaml
  • php 8.3
.github/workflows/tests.yaml
  • php 8.3
  • php 8.3

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.