Reducktion Socrates Versions Save

PHP package to Validate and Extract information from National Identification Numbers.

v2.0.0

1 year ago

This update brings Socrates to PHP 8.1! 🎉 A thorough code review was performed where we fixed some silly issues that went under the radar. The dependencies have been cleaned up. We now leverage enums for stronger type safety.

We also decided to remove Facade and Validator classes for Laravel.

This results in a leaner and better performing package. Enjoy!

Added

  • PHP 8.1 is now supported and the minimum required version
  • Enums for Gender and Country

Removed

  • Laravel facade and validation rule.
  • Luxembourg ID Validator and Extractor classes
  • Carbon dependency
  • Orchestra testbench dev dependency
  • Old string constants for Gender and Country

Updated

  • PHPUnit was updated to version 9
  • The entire codebase now uses 8.1 syntax

Fixed

  • Several code style improvements and some house cleaning
  • Some performance improvements

v1.3.0

3 years ago

This is our biggest release yet and it features a number of new contributors! 🎉 We now support a number of North, South and Central American countries.

Added

  • PHP 8 is now supported (#114)
  • United States ID validator (#69)
  • Canada ID validator (#70)
  • Mexican ID validator (#78) @tiagomichaelsousa
  • Argentina ID validator (#80) @gheleri
  • Chile ID validator (#81) @gheleri
  • Uruguay ID validator (#95) @gheleri
  • German ID validator (#97) @bofalke
  • Peru ID validator (#98) @gheleri
  • Ecuador ID validator (#104) @gheleri
  • Added string constants with the countries' ISO codes to simplify how the package is used (#107)
  • Added a new getDateOfBirthNative() method to Citizen that returns a native DateTime and deprecate the old method (#109)

Removed

  • Socrates will no longer try to guess the locale if using Laravel (#108)
  • Luxembourg ID validator (#112)

Updated

  • Link to official Belgium ID information (#75) @YvesBos
  • Improve internal class structure (#88) @bofalke
  • Updated InvalidLengthException phpdoc (#110)
  • Improved contribution guide with a tutorial on how to implement a country from scratch! 🎉 (#111)

Fixed

  • Fixed Belgium ID validation (#91) @YvesBos
  • Several code style improvements and some house cleaning

v1.2.0

3 years ago

We're crossing the Atlantic! :tada:

Added

  • Add Brazil ID validator (#73) @flavioheleno

v1.1.1

3 years ago

Added

  • Add test runner per pull request (#60)
  • Add a reference to the official algorithm source on Portugal, Spain and Italy's classes (#66)

Fixed

  • Fix Portugal validation algorithm (#57) @SLourenco
  • Fix most ID validation tests and add more invalid ID cases (#59, #64)
  • Fix month code handling on France extractor (#61, #62) @SLourenco
  • Fix Corsica region handling on France extractor and validator (#67)

v1.1.0

4 years ago

Added

  • Add docblocks to the public facing classes (#49)
  • Add method annotations to the Facade to enable IDE autocompletion (#50)
  • Add StyleCI integration (#52)

Fixed

  • Fix the behaviour of the Laravel validation rule (#48)
  • Fix the COUNTRIES.md table and move it to the project root (#51)

Changed

  • Change internal Exception handling for better maintainability (#49)

v1.0.0

4 years ago

Initial Release :tada: