RELEASE // THESMARTER/TAFQEET
v2.0โ STABLEโ 0 downloads0 files ยท 0 B
$ gh release view v2.0 --repo thesmarter/TafqeetQuick install
$ gh release download v2.0 --repo thesmarter/TafqeetFILES // 0 ASSETS
Downloads
$ NO_ATTACHED_BINARIES โ grab the source archive below.
NOTES // CHANGELOG
Release notes
๐ What's New in v2
#### ๐ง Code Rebuild
- Rebuilt the entire library from 5 traits (577 lines) into 1 clean class (384 lines)
- Removed excessive trait architecture (
Validation,Handler,Digit,Calculators,App) - Improved code maintainability and reduced complexity
#### โก Performance & Reliability
- Added
declare(strict_types=1)for strict type checking - Fixed digit comparison bugs by using
array_map('intval', ...)(integer arrays instead of strings) - Replaced
die()error handling with properTafqeetExceptioncustom exception - Used
matchexpressions replacing if/elseif chains for cleaner dispatch
#### ๐ Bug Fixes
- Fixed strict comparison bug in
in_arrayfor fractional word selection - Fixed case-sensitivity issue:
src/coreโsrc/Core(PSR-4 compatibility on Linux) - Fixed
detectClassreturning null for lengths > 6 (now returns null gracefully)
#### ๐ฆ Packaging
- Updated
composer.json: addedphp: ^8.1requirement, removed duplicateminimum-stability - Proper PSR-4 autoloading:
thesmarter\Tafqeet\โsrc/ - Added dev dependencies: PHPUnit 10, PHPCS 3
- Added composer scripts:
test,cs,cs-fix,test:ci
#### ๐ Documentation
- Complete rewrite of README (English + Arabic)
- Added 6 shields.io badges (Packagist, PHP 8.1+, License, CI, Downloads, GitHub)
- Added Packagist link: https://packagist.org/packages/thesmarter/tafqeet
- Added installation instructions (Composer + manual)
- Added usage examples and currency support table
- Created dedicated
README-ar.mdfor Arabic documentation
#### ๐ CI/CD
- Added
.github/workflows/ci.yml- automated testing on push & pull request - PHP 8.3, composer validate, lint, and tests
#### ๐งช Testing
- Added comprehensive PHPUnit test suite (11 tests, 100% passing)
- Added
phpunit.xmlconfiguration
๐ Full Change List
- New file:
src/Core/Tafqeet.php(rebuilt) - New file:
src/Exception/TafqeetException.php - New file:
tests/TafqeetTest.php(11 tests) - New file:
.github/workflows/ci.yml - New file:
phpunit.xml - New file:
README.md(English) - New file:
README-ar.md(Arabic) - Deleted:
src/helper/App.php,src/helper/Calculators.php,src/helper/Digit.php,src/helper/Handler.php,src/helper/Validation.php - Deleted:
src/.DS_Store - Modified:
composer.json,test.php,.gitignore
๐ท๏ธ Breaking Changes
- PHP 8.1+ required (was unconstrained)
- Directory renamed:
src/core/โsrc/Core/(case-sensitive for Linux compatibility) - Error handling:
die()โTafqeetException(catch exceptions instead of fatal errors)
๐ก Migration Guide
BASH
# Update the package
composer require thesmarter/tafqeet:^2.0
# If upgrading from v1, no code changes needed
# The API remains the same:
Tafqeet::arablic(3150.9); // Same outputFull Changelog: https://github.com/thesmarter/Tafqeet/compare/v1.2...v2.0