Commit graph

7 commits

Author SHA1 Message Date
Henrique Moody
7c681fec66
Fix SPDX headers in all files
I ran the `bin/console spdx --fix` with different strategies for
different files. For most of the core classes, since they've been
drastically rebuilt, I've run it with the `git-blame` strategy, for for
the `src/Validators`, in which the API changed completely but the logic
remains the same, I use the `git-log` strategy.
2026-02-03 15:23:23 +01:00
Alexandre Gomes Gaigalas
d9cdc118b2 Introduce REUSE compliance
This commit introduces REUSE compliance by annotating all files
with SPDX information and placing the reused licences in the
LICENSES folder.

We additionally removed the docheader tool which is made obsolete
by this change.

The main LICENSE and copyright text of the project is now not under
my personal name anymore, and it belongs to "The Respect Project
Contributors" instead.

This change restores author names to several files, giving the
appropriate attribution for contributions.
2026-01-21 06:28:11 +00:00
Alexandre Gomes Gaigalas
4618996b52 Fix factory when validator has no constructor
This change introduces a less misleading exception when trying to
construct an instance and failing due to mismatched arguments
coming from ReflectionExceptions.
2026-01-15 05:51:00 +00:00
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)