OussamaMater's avatar

OussamaMater wrote a reply+100 XP

5mos ago

Feels a bit overcomplicated if I'm being honest.

I don't have enough context about the rules or whether the order matters, etc. But if you have already created the classes and they all take the same input, you might as well turn them into validation rules and chain them in your validation, like this:

validator($data, rules: [
    // .. other request validation rules if they make sense
    new CompareMembersValues,
    new IdentifyOverlaps,
])->validate();

No need for tags

OussamaMater's avatar

OussamaMater wrote a reply+100 XP

5mos ago

If by "modules" you mean packages, the development packages (for example, PHPUnit or FakerPHP) are already marked as dev dependencies. During deployment, you won't install them:

composer install --no-dev

Now, is this an optimization? Not really. Optimization isn't about deleting files, it's about caching configs, routes, improving queries, etc..