awesome-repositories.com
Blog
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectDespreCum realizăm clasamentulPresăServer MCP
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
rectorphp avatar

rectorphp/rector

0
View on GitHub↗
10,199 stele·739 fork-uri·PHP·mit·3 vizualizărigetrector.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.

Istoric stele

Graficul istoricului de stele pentru rectorphp/rectorGraficul istoricului de stele pentru rectorphp/rector

Căutare AI

Explorează mai multe repository-uri excelente

Descrie ce ai nevoie în limbaj simplu — AI-ul sortează mii de proiecte open source selectate în funcție de relevanță.

Start searching with AI

Întrebări frecvente

Ce face 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.

Care sunt principalele funcționalități ale rectorphp/rector?

Principalele funcționalități ale rectorphp/rector sunt: Automated Code Refactoring, Code Refactoring Tools, Language Version Migrations, Dead Code Elimination, Version Migration Utilities, PHP Development Tools, Annotation to Attribute Migrations, Codebase Modernizers.

Care sunt câteva alternative open-source pentru rectorphp/rector?

Alternativele open-source pentru rectorphp/rector includ: 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,…

Alternative open-source pentru Rector

Proiecte open-source similare, clasificate după numărul de funcționalități comune cu Rector.
  • openrewrite/rewriteAvatar openrewrite

    openrewrite/rewrite

    3,312Vezi pe GitHub↗

    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
    Vezi pe GitHub↗3,312
  • php-cs-fixer/php-cs-fixerAvatar PHP-CS-Fixer

    PHP-CS-Fixer/PHP-CS-Fixer

    13,463Vezi pe GitHub↗

    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
    Vezi pe GitHub↗13,463
  • phpstan/phpstanAvatar phpstan

    phpstan/phpstan

    13,999Vezi pe GitHub↗

    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
    Vezi pe GitHub↗13,999
  • rrrene/credoAvatar rrrene

    rrrene/credo

    5,193Vezi pe GitHub↗

    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
    Vezi pe GitHub↗5,193
  • Vezi toate cele 30 alternative pentru Rector→