Skip to content

Update README/docs config examples to current RectorConfig::configure()->withPaths() form #389

Description

@bbrala

Companion to GitLab issue #3446874 (reported by joachim).

Rector now auto-generates a rector.php using the fluent API:

return RectorConfig::configure()
    ->withPaths([...]);

But the docs are inconsistent with this:

  • The README still shows $rectorConfig->sets([...]).
  • The attribute-conversion doc (docs/core_plugin_conversion.md) shows the old return static function(RectorConfig $rectorConfig): void { $rectorConfig->ruleWithConfiguration(...) } style.

Update the README and docs examples to the current RectorConfig::configure() fluent form so new users aren't confused (this contributes to the common "rector runs but produces no diff" reports).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions