Commit graph

5 commits

Author SHA1 Message Date
Alexandre Gomes Gaigalas
47f8f82d7f Remove mathematical, niche and deprecated validators
This commit removes validators described in #1642, refactoring
to clean up after their removal.

 - Url was refactored to use the function `filter_var` instead.
 - tests/bootstrap.php is no longer needed and was removed.
 - Updated migration guide with recommendations for replacements.
2026-01-30 16:08:27 +00:00
Alexandre Gomes Gaigalas
9862963d06 Setup Continuous Performance
A new workflow, continuous-integration-perf.yml was introduced. It:

 - Checks out the `benchmarks` branch locally.
 - Runs the benchmarks, accounting for non-existant baselines
   and target (main/PR).
 - Stores the .phpbench storage folder and a human-readable
   report in the `benchmarks` branch.
 - Does not make a PR fail, and never reports a failure
   when merging to main.
 - Allows workflow_dispatch for quick re-runs, and has an
   option to reset the baseline in case something changes
   (GitHub runner setup gets faster/slower, major refactors,
   etc).

Thus, it keeps a historical record of all benchmark results.

These results can be viewed by exploring GitHub via the web
interface and seeing the changes in `latest.md` (the human
file commited).

Additionally, one can clone the `benchmarks` branch and run
`phpbench log` to explore the history in more detail.

Some adjustments to previously added benchmarks were made:

 - Assertions were included in order to track time and memory
   tresholds.
 - The benchmarks are now more surgical, and address the
   concrete validators instead of the whole chain validate.

These changes were made to make benchmarks more isolated, with
the intention of adding chain-related benchmarks separately
in the future.
2026-01-21 06:31:37 +00: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
3270c1f72c Make all remaining validators serializable
This commit concludes the effort to make all current validators
serializable by fixing the remaining ones.

The ability to use `finfo` instances on some filesystem validators
was removed. `Image` was refactored to be a readonly class.

A command was added to the main `composer qa` flow that checks
if all validators are covered by smoke tests (which are currently
used by benchmarks and serialization tests). Therefore, this commit
also ensures that every validator has a benchmark.
2026-01-19 11:04:35 +00:00
Alexandre Gomes Gaigalas
0090191aaa Introduce tests for serialization of validators
This commit introduces a new feature test: SerializableTest, that
tests several validators for their ability to be serialized and
unserialized.

It also makes it so that the same list of validators can be used
by both simple benchmarks and "smoke tests" of all kinds, including
this serialize/unserialize one.

Additionally, the FilterVar validator was modified. Previously, due
to the use of Callback, it was not serializable, but now it is.
2026-01-19 09:24:38 +00:00