Skip to content

Worker process files which do not match the configured fileextension #8056

@staabm

Description

@staabm

Question

I am in the process of debugging my way thru the rector codebase.

after adding some debug output, I was wondering - even if I have configured $rectorConfig->fileExtensions(['php']); in my config - I am seeing non-.php files beeing contained in $json[Bridge::FILES] when dumping it in WorkerRunner.php#L79

this indicates rector is reading/processing files which don't contain the configured extension, which seems to be unnecessary work.

I can see rector reading files like baseline.neon (PHPStan baselines), xml-files which are part of my app and similar.

since I can see them in the WorkerRunner I guess this also means the JSON data which is used to communicate between the processes also contain unncessary information which adds overhead in the inter process communication.

I was expecting, the files list would have already been filtered against the configured file-extension before beeing communicated to the workers?

is this expected behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions