Commit graph

4 commits

Author SHA1 Message Date
Alexandre Gomes Gaigalas
91fb70fd11 Extract CodeGen namespace from LintMixinCommand
Replace hardcoded validator class lists with a declarative #[Mixin]
attribute and extract the mixin generation logic into a reusable
CodeGen namespace under src-dev/CodeGen/.

The new MixinGenerator discovers prefix definitions and filtering
rules by scanning #[Mixin] attributes on the target namespace's
classes, removing the need for hardcoded configuration. It supports
configurable interface types (Builder for __callStatic, Chain for
__call) with custom suffixes, return types, and root extends.

This is the first step toward extracting the code generation into a
standalone package that can map __call/__callStatic to any namespace,
possibly for Respect/StringFormatter and any kind of project in the
future.
2026-03-11 14:06:12 +00:00
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
Henrique Moody
b352f17718
Remove "Wrapper" abstract class
With PHP's promoted properties, there is little reason to have an
abstract class that only provides a constructor and a proxy method.
The greater part of the classes that extended Wrapper had their own
implementation of evaluate(), hence it made very little sense to keep
Wrapper in the codebase.

Assisted-by: Claude Code (Opus 4.5)
2026-01-31 00:36:19 +01:00
Henrique Moody
140bd36aa3
Rename library/ to src/
We've always considered renaming this directory, as it's not a common
standard to name `library` the directory where the source code of a
library it. Having it as `src/` is a common pattern we find in several
PHP libraries these days.

Acked-by: Alexandre Gomes Gaigalas <alganet@gmail.com>
2026-01-22 13:13:15 +01:00
Renamed from library/Validators/PropertyOptional.php (Browse further)