Commit graph

4 commits

Author SHA1 Message Date
Henrique Moody
81310cc4d9
Rename namespace Rules to Validators
Since that namespace contains our “validators”, naming it as such makes
much more sense.
2026-01-05 17:36:35 +01:00
Henrique Moody
5afb69d6ad
Rename RuleFactory to ValidatorFactory
Since this factory creates “validators”, it makes sense that its name
follows the same name as the objects it creates.
2026-01-05 17:36:35 +01:00
Henrique Moody
54ac76adce
Rename Rule to Validator
The name "rule" has always been confusing to me. It can be when you talk
about "validation rules", but it’s a very verbose way to describe it,
and it doesn’t work all the time.

This commit will rename the interface `Rule` to `Validator`, but it will
also rename the concept of "rule" to "validator".
2026-01-05 17:36:34 +01:00
Henrique Moody
bf5f6c0952
Refactor the Factory class
The class was called `Factory` because we used to use it to create rules
and exceptions. Since we don’t have more exceptions per rule, the name
`RuleFactory` makes more sense, as it accurately describes its purpose.

I’ve turned that class into an interface, and copied the implementation
to a new class, `NamespacedRuleFactory`, which describes more of what
that specific implementation does.
2025-12-30 11:44:55 +01:00
Renamed from tests/unit/FactoryTest.php (Browse further)