awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
rectorphp avatar

rectorphp/rector

0
View on GitHub↗
10,199 Stars·739 Forks·PHP·mit·3 Aufrufegetrector.com↗

Rector

Rector is an automated PHP refactoring and modernization tool designed to upgrade language versions and modernize syntax using predefined rules. It functions as a static analysis engine that inspects code structures and types to identify refactoring targets without executing the code.

The project provides a framework for defining custom transformation logic to automate project-specific changes. It distinguishes itself by offering specialized capabilities for migrating legacy or custom frameworks to modern alternatives and converting docblock annotations into native language attributes.

The system covers broad capability areas including dead code elimination, automated type hinting, and class visibility optimization. It also manages codebase standardization through namespace restructuring and the removal of redundant code artifacts.

The tool includes command-line utilities for previewing changes via diffs and integrating refactoring workflows into continuous integration pipelines.

Features

  • Automated Code Refactoring - Automatically applies structural changes to PHP code to upgrade language versions and improve maintainability.
  • Code Refactoring Tools - Implements a comprehensive suite of utilities for restructuring and modernizing PHP source code via predefined rulesets.
  • Language Version Migrations - Automatically updates PHP codebases from older versions to current releases to leverage new language features and syntax.
  • Dead Code Elimination - Identifies and eliminates unused code to improve general coding style and reduce technical debt.
  • Version Migration Utilities - Provides tools to facilitate the migration of codebases between major language and framework versions.
  • PHP Development Tools - Provides an automated tool for modifying PHP source code to upgrade language versions and modernize syntax.
  • Annotation to Attribute Migrations - Transforms docblock annotations into native language attributes by identifying attribute classes in project dependencies.
  • Codebase Modernizers - Updates legacy PHP codebases to leverage modern language features and runtime versions through automated refactoring.
  • Automated Type Hinting - Adds native type hints and docblock types to parameters, returns, and variables to increase coverage.
  • Code Transformation Engines - Provides a rule-based engine that automates structural code modifications via syntax tree transformations.
  • Code Transformation Tools - Implements structural code modifications by parsing PHP grammars into abstract syntax trees.
  • Custom Analysis Rules - Provides a framework for defining custom, metadata-driven rules to automate the replacement of outdated code patterns.
  • Version Compatibility Analyzers - Includes static analysis rules that ensure code is compatible with specific target language versions.
  • Framework Migrations - Transforms code from a custom or legacy framework to a modern open-source alternative to eliminate technical debt.
  • Framework Migrations - Provides specialized capabilities for migrating code from legacy or custom frameworks to modern open-source alternatives.
  • AST Node Metadata - Stores contextual information on AST nodes during traversal for use by subsequent refactoring rules.
  • Multi-Pass AST Traversals - Processes the code hierarchy in multiple stages to resolve complex dependencies and apply incremental changes.
  • Automated Type Hinting - Uses static analysis to automatically add native PHP type declarations and docblock types to parameters and return values.
  • Static Analysis Engines - Uses a static analysis engine to inspect PHP code structures and types to identify refactoring targets.
  • Technical Debt Management - Identifies and removes dead code, commented-out blocks, and outdated patterns to reduce technical debt.
  • Static Reflection - Inspects classes using static reflection to avoid executing the code or requiring a functional autoload setup.
  • Static Code Analysis - Analyzes variable and method types using static tools to ensure refactoring changes apply only to intended classes.
  • Parsed Code Caching - Stores parsed code objects on disk to avoid reprocessing unchanged files in subsequent runs.
  • Analysis Result Caches - Stores parsed code objects between executions to avoid re-parsing unchanged files and accelerate subsequent runs.
  • External Ruleset Integrations - Allows the import of external or community-authored refactoring rules to extend the tool's capabilities.
  • Version-Aware Rulesets - Automatically selects the appropriate refactoring rules by detecting installed package versions.
  • Refactoring Scope Control - Enables precise control over which files, paths, or rules are applied during the refactoring process.
  • Structural Change Previews - Generates a diff of proposed structural modifications for verification before applying them to source files.
  • Tool Execution Optimizers - Speeds up execution by configuring parallel processing and managing cache directories to process only changed files.
  • Visibility Optimizations - Finalizes classes and privatizes constants that are not used outside their containing class.
  • Rule Package Distributions - Automatically loads specialized collections of refactoring rules based on the versions of installed packages.
  • Transformation Rule Frameworks - Offers a framework for defining and executing specialized transformation logic to automate project-specific code changes.
  • Namespace Standardization - Converts random namespaces to a standard structure by updating configurations, class names, and imports.
  • Parallel Processing - Reduces processing time for large codebases by running tasks simultaneously across multiple CPU cores.
  • Refactoring Safety Controls - Provides controls to prevent the modification of public and non-final elements, balancing refactoring depth with risk.
  • Static Analysis Extensions - Integrates external analysis configurations and container metadata to improve the precision of type-based refactorings.
  • Code Quality Tools - Detects commented-out code and fake traits to remove technical debt and maintain high software quality.
  • Code Analysis and Refactoring - Automates code upgrades and refactoring tasks.

Star-Verlauf

Star-Verlauf für rectorphp/rectorStar-Verlauf für rectorphp/rector

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Rector

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Rector.
  • openrewrite/rewriteAvatar von openrewrite

    openrewrite/rewrite

    3,312Auf GitHub ansehen↗

    OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic tree parser to represent source code as type-aware trees that preserve original whitespace and formatting, enabling precise and deterministic modifications. The project utilizes a declarative refactoring pipeline where sequences of transformations are defined in YAML to resolve breaking changes and technical debt. It features type-aware pattern matching and cross-language model mapping to apply similar refactoring patterns across different programming languages. The framework

    Javaabstract-syntax-treeastcode-search
    Auf GitHub ansehen↗3,312
  • php-cs-fixer/php-cs-fixerAvatar von PHP-CS-Fixer

    PHP-CS-Fixer/PHP-CS-Fixer

    13,463Auf GitHub ansehen↗

    This tool is a command-line utility designed to automatically detect and correct coding standard violations in PHP source files. It functions as a static analysis and refactoring engine that ensures consistent project-wide formatting by applying predefined community conventions or custom organizational rules. The project distinguishes itself through a modular rule-based engine that supports both automated style correction and codebase modernization. It allows developers to update legacy syntax to align with newer language versions and testing framework requirements, facilitating the adoption

    PHPcode-standardscode-stylephp
    Auf GitHub ansehen↗13,463
  • phpstan/phpstanAvatar von phpstan

    phpstan/phpstan

    13,999Auf GitHub ansehen↗

    This project is a static analysis engine and type checker designed for PHP codebases. It evaluates source code structure and type annotations to identify potential bugs, type mismatches, and logic errors without executing the application. By parsing code into an abstract syntax tree and applying a rule-based validation framework, it enforces code quality and safety standards across a project. What distinguishes this tool is its sophisticated type inference engine, which models dynamic language features, magic methods, and conditional types to maintain accuracy even in unconventional code. It

    PHPphpphp7phpstan
    Auf GitHub ansehen↗13,999
  • rrrene/credoAvatar von rrrene

    rrrene/credo

    5,193Auf GitHub ansehen↗

    Credo is a static analysis tool and linter for Elixir. It functions as a code quality analyzer that scans source code to identify stylistic inconsistencies, common mistakes, and potential security vulnerabilities. The tool provides a customizable framework for defining and testing specialized rules to enforce project-specific coding standards. It identifies complex code fragments and duplication to highlight opportunities for refactoring and simplification. Its capabilities cover automated code reviews, the enforcement of Elixir coding standards, and real-time developer feedback through edit

    Elixir
    Auf GitHub ansehen↗5,193
Alle 30 Alternativen zu Rector anzeigen→

Häufig gestellte Fragen

Was macht rectorphp/rector?

Rector is an automated PHP refactoring and modernization tool designed to upgrade language versions and modernize syntax using predefined rules. It functions as a static analysis engine that inspects code structures and types to identify refactoring targets without executing the code.

Was sind die Hauptfunktionen von rectorphp/rector?

Die Hauptfunktionen von rectorphp/rector sind: Automated Code Refactoring, Code Refactoring Tools, Language Version Migrations, Dead Code Elimination, Version Migration Utilities, PHP Development Tools, Annotation to Attribute Migrations, Codebase Modernizers.

Welche Open-Source-Alternativen gibt es zu rectorphp/rector?

Open-Source-Alternativen zu rectorphp/rector sind unter anderem: openrewrite/rewrite — OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic… php-cs-fixer/php-cs-fixer — This tool is a command-line utility designed to automatically detect and correct coding standard violations in PHP… phpstan/phpstan — This project is a static analysis engine and type checker designed for PHP codebases. It evaluates source code… rrrene/credo — Credo is a static analysis tool and linter for Elixir. It functions as a code quality analyzer that scans source code… analysis-tools-dev/static-analysis — This project is a comprehensive, curated directory of static analysis, linting, and security scanning utilities. It… voltagent/awesome-claude-code-subagents — This project provides a framework for managing multi-agent systems, designed to automate complex software development,…