Commit graph

2,357 commits

Author SHA1 Message Date
dependabot[bot]
73375a77da Bump phpbench/phpbench from 1.4.3 to 1.5.1
Bumps [phpbench/phpbench](https://github.com/phpbench/phpbench) from 1.4.3 to 1.5.1.
- [Release notes](https://github.com/phpbench/phpbench/releases)
- [Changelog](https://github.com/phpbench/phpbench/blob/master/CHANGELOG.md)
- [Commits](https://github.com/phpbench/phpbench/compare/1.4.3...1.5.1)

---
updated-dependencies:
- dependency-name: phpbench/phpbench
  dependency-version: 1.5.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-13 18:48:33 +00:00
The Respect Panda
917a55332f Update Regional Information 2026-03-12 00:21:58 +00:00
Alexandre Gomes Gaigalas
1c56012cc3 Generate PrefixMap constants from Mixin attributes
- Add PrefixMapGenerator to produce COMPOSABLE/COMPOSABLE_WITH_ARGUMENT
  constants from #[Mixin] attributes, replacing hand-written arrays
- Move Prefix transformer to reference generated PrefixMap constants
- Extract NamespaceScanner from MixinGenerator for shared directory scanning
- Introduce FluentBuilder subnamespace for builder-chain generators
  (MixinGenerator, PrefixMapGenerator, MethodBuilder, Mixin attribute)
- Add CodeGenerator interface and Config class as shared CodeGen contracts
2026-03-11 19:06:51 +00:00
dependabot[bot]
6965c6449a Bump pestphp/pest from 4.4.1 to 4.4.2
Bumps [pestphp/pest](https://github.com/pestphp/pest) from 4.4.1 to 4.4.2.
- [Release notes](https://github.com/pestphp/pest/releases)
- [Changelog](https://github.com/pestphp/pest/blob/4.x/RELEASE.md)
- [Commits](https://github.com/pestphp/pest/compare/v4.4.1...v4.4.2)

---
updated-dependencies:
- dependency-name: pestphp/pest
  dependency-version: 4.4.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-11 16:38:33 +00:00
dependabot[bot]
caf21167a3 Bump symfony/console from 8.0.6 to 8.0.7
Bumps [symfony/console](https://github.com/symfony/console) from 8.0.6 to 8.0.7.
- [Release notes](https://github.com/symfony/console/releases)
- [Changelog](https://github.com/symfony/console/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/console/compare/v8.0.6...v8.0.7)

---
updated-dependencies:
- dependency-name: symfony/console
  dependency-version: 8.0.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-11 16:37:15 +00:00
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
Alexandre Gomes Gaigalas
317ffef4b7 Fix isVisible() initial value bug in NestedListStringFormatter
The array_reduce in isVisible() used `true` as its initial value with
an `||` reducer, meaning it always returned `true` when siblings existed
regardless of their actual visibility. This caused unnecessary nesting
in full messages by showing single-child wrapper nodes that should have
been collapsed.

Replace array_reduce with a foreach loop starting from `false`, which
also enables early return on the first visible sibling.
2026-03-10 15:13:28 +00:00
The Respect Panda
50a3ab3e24 Update Regional Information 2026-03-09 00:19:49 +00:00
The Respect Panda
d1d2d186f8 Update Regional Information 2026-03-05 00:26:15 +00:00
dependabot[bot]
84d743656e Bump symfony/translation from 8.0.4 to 8.0.6
Bumps [symfony/translation](https://github.com/symfony/translation) from 8.0.4 to 8.0.6.
- [Release notes](https://github.com/symfony/translation/releases)
- [Changelog](https://github.com/symfony/translation/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/translation/compare/v8.0.4...v8.0.6)

---
updated-dependencies:
- dependency-name: symfony/translation
  dependency-version: 8.0.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-04 17:25:28 +00:00
dependabot[bot]
ccdd6ac3c1 Bump giggsey/libphonenumber-for-php-lite from 9.0.24 to 9.0.25
Bumps [giggsey/libphonenumber-for-php-lite](https://github.com/giggsey/libphonenumber-for-php-lite) from 9.0.24 to 9.0.25.
- [Release notes](https://github.com/giggsey/libphonenumber-for-php-lite/releases)
- [Commits](https://github.com/giggsey/libphonenumber-for-php-lite/compare/9.0.24...9.0.25)

---
updated-dependencies:
- dependency-name: giggsey/libphonenumber-for-php-lite
  dependency-version: 9.0.25
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-04 17:23:48 +00:00
dependabot[bot]
d2873c4432 Bump symfony/console from 8.0.4 to 8.0.6
Bumps [symfony/console](https://github.com/symfony/console) from 8.0.4 to 8.0.6.
- [Release notes](https://github.com/symfony/console/releases)
- [Changelog](https://github.com/symfony/console/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/console/compare/v8.0.4...v8.0.6)

---
updated-dependencies:
- dependency-name: symfony/console
  dependency-version: 8.0.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-04 17:22:28 +00:00
dependabot[bot]
b0b714a1a1 Bump nette/php-generator from 4.2.1 to 4.2.2
Bumps [nette/php-generator](https://github.com/nette/php-generator) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/nette/php-generator/releases)
- [Commits](https://github.com/nette/php-generator/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: nette/php-generator
  dependency-version: 4.2.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-04 17:21:13 +00:00
The Respect Panda
c0c506692b
Update Regional Information 3.1.0 2026-03-02 10:46:21 -03:00
Alexandre Gomes Gaigalas
2600db3c74 Introduce Trimmed validator
This commit introduces the `Trimmed` validator that ensures a string
cannot start or end with a list of specific values.

The default values used are a selected list of Unicode invisible
characters.

To support this change, the StartsWith and EndsWith validators were
modified so they can also support multiple values to check for.

While StartsWith and EndsWith are more generic, and also perform
start-of-array and end-of-array kinds of checks, Trimmed is more
focused on string inputs, which tailors to a more specific use
case.
2026-02-26 10:34:53 +00:00
The Respect Panda
e924e39940 Update Regional Information 3.0.2 2026-02-26 00:24:14 +00:00
dependabot[bot]
dd95656bf0 Bump giggsey/libphonenumber-for-php-lite from 9.0.23 to 9.0.24
Bumps [giggsey/libphonenumber-for-php-lite](https://github.com/giggsey/libphonenumber-for-php-lite) from 9.0.23 to 9.0.24.
- [Release notes](https://github.com/giggsey/libphonenumber-for-php-lite/releases)
- [Commits](https://github.com/giggsey/libphonenumber-for-php-lite/compare/9.0.23...9.0.24)

---
updated-dependencies:
- dependency-name: giggsey/libphonenumber-for-php-lite
  dependency-version: 9.0.24
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 00:14:02 +00:00
dependabot[bot]
2376ac07f8 Bump phpstan/phpstan from 2.1.39 to 2.1.40
---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-version: 2.1.40
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 00:12:56 +00:00
dependabot[bot]
928fbff693 Bump symfony/console from 7.4.4 to 8.0.4
Bumps [symfony/console](https://github.com/symfony/console) from 7.4.4 to 8.0.4.
- [Release notes](https://github.com/symfony/console/releases)
- [Changelog](https://github.com/symfony/console/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/console/compare/v7.4.4...v8.0.4)

---
updated-dependencies:
- dependency-name: symfony/console
  dependency-version: 8.0.4
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 00:11:20 +00:00
Alexandre Gomes Gaigalas
ad7a74838b Allow panda.yml to request benchmark runs for PRs
This change introduces a new command to `@TheRespectPanda` bot,
allowing him to dispatch the ci-perf.yml workflow benchmarks for
a pull request.

Initially, the bot will just trigger it and return the workflow
run URL for manual inspection. Future iterations on this feature
could then grab the benchmark results and update the comment.
2026-02-24 05:12:58 +00:00
Alexandre Gomes Gaigalas
7c8ecfa317 Fix PublicSuffix validator and UpdateDomainSuffixesCommand
- Parce PSL ICANN section into structured sections (rules,
   wildcards, exceptions) according to the format.
 - Updates PublicSuffix semantics for complete application of
   the rules.
 - Includes private domain suffixes now.
 - Refreshes the existing data.
 - Fixes the update-regionals.yml workflow, set it to run
   twice a week.

References: https://github.com/publicsuffix/list/wiki/Format#format
2026-02-23 12:18:57 +00:00
dependabot[bot]
e1ff5aa8fc Bump pestphp/pest from 4.3.2 to 4.4.1
Bumps [pestphp/pest](https://github.com/pestphp/pest) from 4.3.2 to 4.4.1.
- [Release notes](https://github.com/pestphp/pest/releases)
- [Changelog](https://github.com/pestphp/pest/blob/4.x/RELEASE.md)
- [Commits](https://github.com/pestphp/pest/compare/v4.3.2...v4.4.1)

---
updated-dependencies:
- dependency-name: pestphp/pest
  dependency-version: 4.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-18 18:51:31 +00:00
dependabot[bot]
fada372844 Bump phpstan/phpstan-deprecation-rules from 2.0.3 to 2.0.4
Bumps [phpstan/phpstan-deprecation-rules](https://github.com/phpstan/phpstan-deprecation-rules) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/phpstan/phpstan-deprecation-rules/releases)
- [Commits](https://github.com/phpstan/phpstan-deprecation-rules/compare/2.0.3...2.0.4)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-deprecation-rules
  dependency-version: 2.0.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-18 18:48:17 +00:00
dependabot[bot]
101ed3ed4d Bump phpstan/phpstan-phpunit from 2.0.14 to 2.0.16
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 2.0.14 to 2.0.16.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases)
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/2.0.14...2.0.16)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
  dependency-version: 2.0.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-18 18:43:16 +00:00
Alexandre Gomes Gaigalas
fdee9a9f7f Update URLs that changed 2026-02-11 20:24:00 +00:00
dependabot[bot]
da7d63b22a Bump phpstan/phpstan-phpunit from 2.0.13 to 2.0.14
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 2.0.13 to 2.0.14.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases)
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/2.0.13...2.0.14)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
  dependency-version: 2.0.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 16:48:09 +00:00
Michele Beltrame
896126caa5 Change isValid method visibility to public + Change validator registration
The "protected" isValid() method didn't work, threw an exception sying it needs to be "public".

Also the registration didn't work that way. I was unable to fix it but found an alternate way which works. Maybe it's not the right one but I'm indicating it here.
2026-02-11 14:04:18 +01:00
Alexandre Gomes Gaigalas
5d43388354 Add TheRespectPanda Bot workflow
Includes a basic bot workflow that just answers "pong" to ping
requests, includes a help message and ignores invalid commands.

This is the minimum feature that exercises token access, non
recursive comments (answering to its own pong) and so on.
2026-02-10 18:24:50 +00:00
Henrique Moody
305a7d15db
Add FormatterModifier to message rendering and expand test coverage 3.0.1
Integrate FormatterModifier into the validation message modifier chain,
enabling StringFormatter formatters to be used as pipe modifiers in
message templates (e.g., {{input|uppercase}}, {{input|mask:1-4:X}}).
This requires bumping respect/string-formatter to ^1.7.

Add feature tests for both the Formatted validator (uppercase, lowercase,
trim, number, date, creditCard, secureCreditCard, chained formatters) and
the FormatterModifier in templates (all major formatters, custom parameters,
multi-argument modifiers, and chained modifiers).

Assisted-by: Claude Code (Claude Opus 4.6)
2026-02-10 06:07:49 +01:00
copilot-swe-agent[bot]
eedce8fb32 Use Punycode filenames for non-ASCII TLD suffix data files 3.0.0
Some systems and tools (e.g., certain archive extractors, Windows
environments, or CI pipelines) do not properly handle non-ASCII
characters in file paths. The public suffix data files for
internationalized TLDs (such as ישראל, СРБ, 香港, and ไทย) were stored
using their native Unicode names, which caused installation failures
on those systems.

This commit converts those filenames to their Punycode equivalents
(e.g., XN--4DBRK0CE.php instead of ישראל.php) using `idn_to_ascii()`.
Both the data generation command (`UpdateDomainSuffixesCommand`) and the
runtime validator (`PublicDomainSuffix`) are updated to use the same
Punycode-based file lookup, ensuring consistency. A polyfill dependency
(`symfony/polyfill-intl-idn`) is added so that `idn_to_ascii()` is
available even when the `intl` PHP extension is not installed.

Assisted-by: Claude Code (Claude Opus 4.6)
Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
2026-02-09 17:34:56 +01:00
Henrique Moody
ddb5ef6605
Export aliases.php in package
Previously aliases.php was incorrectly excluded from the package export due to
improper gitattributes configuration. This change ensures aliases.php is
included in the distributed package by using the correct -export-ignore syntax.

Assisted-by: OpenCode (ollama-cloud/glm-4.7)
2026-02-09 15:34:55 +01:00
dependabot[bot]
5a114662e4 Bump giggsey/libphonenumber-for-php-lite from 8.13.55 to 9.0.23
Bumps [giggsey/libphonenumber-for-php-lite](https://github.com/giggsey/libphonenumber-for-php-lite) from 8.13.55 to 9.0.23.
- [Release notes](https://github.com/giggsey/libphonenumber-for-php-lite/releases)
- [Commits](https://github.com/giggsey/libphonenumber-for-php-lite/compare/8.13.55...9.0.23)

---
updated-dependencies:
- dependency-name: giggsey/libphonenumber-for-php-lite
  dependency-version: 9.0.23
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 13:52:05 +01:00
dependabot[bot]
a0ecc12049 Bump nette/php-generator from 4.2.0 to 4.2.1
Bumps [nette/php-generator](https://github.com/nette/php-generator) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/nette/php-generator/releases)
- [Commits](https://github.com/nette/php-generator/compare/v4.2.0...v4.2.1)

---
updated-dependencies:
- dependency-name: nette/php-generator
  dependency-version: 4.2.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 13:47:42 +01:00
dependabot[bot]
4d27c08992 Bump symfony/var-exporter from 7.4.0 to 8.0.0
Bumps [symfony/var-exporter](https://github.com/symfony/var-exporter) from 7.4.0 to 8.0.0.
- [Release notes](https://github.com/symfony/var-exporter/releases)
- [Changelog](https://github.com/symfony/var-exporter/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/var-exporter/compare/v7.4.0...v8.0.0)

---
updated-dependencies:
- dependency-name: symfony/var-exporter
  dependency-version: 8.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 13:45:55 +01:00
dependabot[bot]
f869da4883 Bump phpstan/phpstan-phpunit from 2.0.12 to 2.0.13
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 2.0.12 to 2.0.13.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases)
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/2.0.12...2.0.13)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
  dependency-version: 2.0.13
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 13:43:51 +01:00
Henrique Moody
c783abaf37
Upgrade respect/string-formatter to 1.6.0 and remove redundant alias
- Updated respect/string-formatter from ^1.0 to ^1.6
- Removed manual 'f' alias for FormatterBuilder as the package now handles it
- Simplified aliases.php by delegating aliasing to the dependency itself

Assisted-by: OpenCode (ollama-cloud/glm-4.7)
2026-02-09 13:38:40 +01:00
The Respect Panda
74299fded1
Update Regional Information 2026-02-09 13:10:54 +01:00
Henrique Moody
d4605f4493
Add wildcard support to ResultQuery::findByPath()
Before this change, querying validation results required knowing the
exact path to a specific result node—including numeric indices for
array elements (e.g., `items.1.email`). This made it impractical to
locate the first failing result in dynamic collections where the
failing index is not known ahead of time.

Wildcard segments (`*`) allow matching any single path component, so
patterns like `items.*`, `*.email`, or `data.*.value` will traverse
the result tree and return the first node whose path matches. This is
particularly valuable when validating arrays of items with `each()`,
because consumers can now ask "give me the first failure under items"
without iterating manually.

The implementation replaces the previous flat `array_find` lookup with
a recursive depth-first traversal that, when a wildcard is present,
compares each node's full path against the pattern using segment-level
matching. Non-wildcard lookups continue to use exact array equality,
so there is no behavioral change for existing callers.

Assisted-by: Claude Code (claude-opus-4-6)
2026-02-08 22:43:06 +01:00
Henrique Moody
6abf3a548c
Remove Masked validator in favor of Formatted
The Masked validator was a proxy for what the new Formatted validator
already does, so it is being removed to reduce redundancy. All tests and
documentation have been updated accordingly.

Assisted-by: OpenCode (ollama-cloud/glm-4.7)
2026-02-06 20:44:26 +01:00
Henrique Moody
dc0c0345c9
Create "Formatted" validator
The Formatted validator decorates another validator to transform how
input values appear in error messages, while still validating the
original unmodified input.

This is useful for improving the readability of error messages by
displaying values in a user-friendly formatd.

The validator accepts any Respect\StringFormatter\Formatter implementation,
allowing direct use of StringFormatter's fluent builder. As StringFormatter
expands with more formatters in future releases, users will automatically
benefit from the full range of formatting options.

Assisted-by: Claude Code (Opus 4.5)
2026-02-06 20:44:26 +01:00
Alexandre Gomes Gaigalas
8eaedcfba0 Update composer lifecycle
- Commit composer.lock.
 - The lock is not ignored anymore.
 - Changed to ramsey/composer-install action for cache.
2026-02-06 19:20:10 +00:00
Henrique Moody
e84d15f4e4
Rename Composite to LogicalComposite
Rename the Composite class to LogicalComposite to more accurately reflect
its purpose as a validator that combines child validators using logical
operations (AND, OR, NAND, XOR).

This better naming also opens the door for additional composite patterns
beyond logical operations, enabling future validator compositions.

Assisted-by: OpenCode (GLM 4.5)
2026-02-06 18:15:36 +01:00
Alexandre Gomes Gaigalas
91ceaafd2d Update translation docs
The documents on translation were updated to feature symfony with
an array provider. Duplicated container notes were extracted to
a single configuration.md file.

An API for accessing the messages, so users don't have to copy
and paste them from the source or docs, was provided and
TemplateResolver was refactored to use it.
2026-02-06 17:11:34 +00:00
Henrique Moody
b701fac656
Create ShortCircuit validator and ShortCircuitable interface
This commit introduces a mechanism for validators to return early once
the validation outcome is determined, rather than evaluating all child
validators.

The ShortCircuit validator evaluates validators sequentially and stops
at the first failure, similar to how PHP's && operator works. This is
useful when later validators depend on earlier ones passing, or when
you want only the first error message.

The ShortCircuitCapable interface allows composite validators (AllOf,
AnyOf, OneOf, NoneOf, Each, All) to implement their own short-circuit
logic.

Why "ShortCircuit" instead of "FailFast":

The name "FailFast" was initially considered but proved misleading.
While AllOf stops on failure (fail fast), AnyOf stops on success
(succeed fast), and OneOf stops on the second success. The common
behavior is not about failing quickly, but about returning as soon as
the outcome is determined—which is exactly what short-circuit
evaluation means. This terminology is familiar to developers from
boolean operators (&& and ||), making the behavior immediately
understandable.

Co-authored-by: Alexandre Gomes Gaigalas <alganet@gmail.com>
Assisted-by: Claude Code (Opus 4.5)
2026-02-05 17:32:42 +01:00
Alexandre Gomes Gaigalas
e636b63f14 Add v::format() to check if data is already in a specific format
This validator is not so much about how we present the input
during error messages, but in what format data already is formatted.
2026-02-05 16:19:11 +00:00
Valdeir S
570ba481b1 Add Support for Alphanumeric CNPJ
Due to the continuous increase in the number of companies and the
imminent exhaustion of available CNPJs (Brazilian taxpayer
identification numbers), the Brazilian Federal Revenue Service is
instituting the alphanumeric CNPJ. The initiative aims to
facilitate the identification of all companies and improve the
business environment, contributing to the economic and social
development of Brazil.

The alphanumeric CNPJ will be assigned, starting in July 2026,
exclusively to new registrations.

Changes:

- Add support for alphanumeric CNPJ validation
- Format code according to PHPCS standards
- Simplify CNPJ conversion to uppercase character array
- Add documentation about CNPJ structure
2026-02-04 13:20:30 +01:00
Alexandre Gomes Gaigalas
16148e9593 Standardize and improve validation message templates
- Remove redundant "valid" prefix:
   Date, DateTime, DateTimeDiff, Domain, Email, Iban, Imei, Ip, Isbn, Json, LanguageCode, LeapDate, LeapYear, Luhn, MacAddress, NfeAccessKey, Nif, Nip, Pesel, Phone, Pis, PolishIdCard, PostalCode, Roman, Slug, Tld, Url, Uuid, Version.

 - Remove redundant "value" suffix
   ArrayVal, BoolVal, Countable, FloatVal, IntVal, IterableVal, NumericVal, ScalarVal, StringVal.

 - Standardize "consist only of" phrasing
   Alnum, Alpha, Cntrl, Consonant, Digit, Graph, Lowercase, Printable, Punct, Space, Spaced, Uppercase, Vowel, Xdigit.

 - Improve file accessibility messages
   Directory, Executable, File, Image, Readable, SymbolicLink, Writable.

 - Improve grammar and article usage
   CreditCard, Extension, Mimetype, Regex, Size.
2026-02-03 19:58:55 +00:00
Alexandre Gomes Gaigalas
5f25627e61 Update .gitattributes
- Follows up on the rename from library/ to src/
 - Includes required files for proper SBOM
 - Don't show diffs for generated files
 - Include aliases.php
2026-02-03 16:22:40 +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
7db3bea8a6
Enhance LintSpdxCommand with contributor tracking and header normalization
Improves SPDX header linting to ensure consistent license metadata across
the codebase.

Key changes:

- Enforce deterministic tag ordering (License-Identifier, FileCopyrightText,
  FileContributor) to ensure consistency, prevent merge conflicts, and
  simplify code reviews

- Add contributor alias mapping to consolidate contributors with multiple
  emails or name variations (e.g., "nickl-" → "Nick Lombard")

- Add --contributions-strategy option with "blame" (current code authors)
  and "log" (all historical contributors) to support different attribution
  philosophies

- Add optional path argument to lint specific files or directories

- Add --fix option to automatically correct header issues

Assisted-by: Claude Code (claude-opus-4-5-20251101)
2026-02-03 15:23:20 +01:00