Releases: robertogallea/laravel-codicefiscale
Releases · robertogallea/laravel-codicefiscale
Release list
3.0.0
3.0 is a ground-up rewrite, and an intentional, clean break from 2.x with no compatibility shims. See UPGRADE.md for a complete call-by-call migration table.
Added
- A small, framework-agnostic domain core (
Robertogallea\CodiceFiscale) with no Laravel dependency, separate from aRobertogallea\CodiceFiscale\Laravelintegration layer. - An immutable
CodiceFiscalevalue object, constructed viafrom()/tryFrom(), that can only ever hold a structurally valid code. Generator, taking aPersonDTO (realDateTimeImmutable,BirthPlaceCode,Genderenum) instead of loosely-typed positional arguments.Parser, decoding aCodiceFiscaleintosurnameCode()/nameCode()(honestly named as encoded fragments, not real names), birth date/gender/birthplace, with automatic reference-date resolution of the ambiguous two-digit birth year.Validator, with independently-callable format/checksum/semantics tiers and aValidationResultcarrying every applicableValidationError, instead of one exception at a time.Matcher, comparing aCodiceFiscaleagainst aPerson/PartialPersonand reporting matched/mismatched/skipped fields explicitly.Omocodia, exposingcanonical(),variants()(all 128 combinations), andisEquivalentTo().- A
BirthPlacedomain backed by real ANPR (Italian municipalities) and MAECI (foreign countries) government data, with genuine historical validity windows - a renamed or merged municipality now resolves correctly against a birth date from before the change. - A
codice-fiscale:update-placesartisan command that downloads both datasets into the consuming application's own dedicated SQLite database - never bundled with the package, never touching the host application's primary database. CodiceFiscaleCast(Eloquent attribute casting),CodiceFiscaleRule::make()->matching(...)(fluent cross-field validation), and a Faker provider - all rebuilt on the new core API.- Restored, localized (
en/it) validation error messages.
Removed
- The entire 2.x API (
robertogallea\LaravelCodiceFiscale\*) - no backward-compatibility shims. See UPGRADE.md. - Bundled birthplace data - nobody had verified the redistribution terms of the source datasets, so shipping a converted copy meant redistributing it under this package's own unverified authority.
Note for early adopters
If you were requiring the pre-release dev-dev branch directly, switch to ^3.0 now that a tagged release exists.
2.3.0
v2.0.2
2.0.0
- Add Faker provider for generating total or partial generation of codice fiscale
- Add support for Carbon 3
- Minor refactoring
1.12.1
Add missing city (#55) * Add 'I719' => 'SIAMANNA SIAPICCIA', * Add 'I719' => 'SIAMANNA SIAPICCIA',
1.10.1
Merge pull request #37 from robertogallea/add_configurable_labels_and…
1.9.1
Merge pull request #32 from michelepizzi/master add other cities from A001 to A099 and F888
1.9.0
You can now validate your codice fiscale against other form fields to check whether there is a match
or not.
You must specify all of the required fields:
first_namelast_namebirthdateplacegender
giving parameters to the codice_fiscale rule.
For example:
public function rules()
{
return [
'codicefiscale' => 'codice_fiscale:first_name=first_name_field,last_name=last_name_field,birthdate=birthdate_field,place=place_field,gender=gender_field',
'first_name_field' => 'required|string',
'last_name_field' => 'required|string',
'birthdate_field' => 'required|date',
'place_field' => 'required|string',
'gender_field' => 'required|string|max:1',
];
}Validation fails if the provided codicefiscale and the one generated from the input fields do not match.
1.8.2
Merge pull request #30 from michelepizzi/master H397 code for an italian city
1.7.2
Merge pull request #25 from halservice/custom Added C171