Skip to content

RectorConfig::import no longer supports globs after 0.18 #8151

@rmobis

Description

@rmobis

Bug Report

Subject Details
Rector version 0.18.0

A breaking change was introduced in 0.18.0 where RectorConfig::import no longer seems to support globs. Whenever a glob is used, it fails with the following error message:

[ERROR] The file "<path>/*" does not exist.

This issue affects FriendsOfShopware/shopware-rector#22

Minimal PHP Code Causing Issue

Since this involves multiple config files, I couldn't reproduce it on the demo page, but I've prepared a very simple MRE on this repository: https://github.com/rmobis/shopware-rector-mre/tree/rector/rector

Cloning the repo, installing composer dependencies and running vendor/bin/rector process src --dry-run reproduces the issue.

Expected Behaviour

When given a glob, rector should load all files matching that glob. For the MRE presented, that means it should report both RecastingRemovalRector and RemoveAlwaysTrueIfConditionRector issues on the given code.

This was the behaviour on 0.17. If that is not desired, a breaking change notice should be added to the 0.18 release notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions