php-abraflexi-bricks v1.5.0 released

EN
php-abraflexi-bricks

php-abraflexi-bricks

v1.5.0

Version 1.5.0 - Customer Class Refactoring

Critical Fixes

  • Fixed fatal error in getUserEmail() with proper null handling for PHP 8+ compatibility
    • Error: strlen(): Argument #1 ($string) must be of type string, null given
    • Now returns empty string when no email is available
  • Fixed inverted logic in insertToAbraFlexi() that was overwriting parameter data
  • Fixed query builder in getCustomerDebts() that concatenated object instead of ID
  • Fixed uninitialized $firma property

✨ Improvements

  • Changed property visibility to private for better encapsulation (except parent class requirements)
  • Improved return type declarations (mixed instead of incorrect int/bool)
  • Constructor now accepts optional $firma parameter
  • Refactored constructor logic into loadByUsername() and loadByEmail() helper methods
  • Improved error handling with proper status messages throughout

➕ Added Features

  • Added setFirma() and getFirma() accessor methods
  • Added proper null-safe string operations throughout
  • Added comprehensive PHPDoc comments

Documentation

  • Added CHANGELOG.md
  • Added COVERAGE.md with comprehensive test coverage report
  • Updated README.md with v1.5.0 highlights
  • Updated debian/changelog

Testing

  • 23 unit tests, 31 assertions - ALL PASSING
  • 44.44% line coverage, 45.45% method coverage for Customer class
  • Critical test added for getUserEmail() null handling

⚠️ Breaking Changes

  • Properties changed from public to private (use getter/setter methods)
  • Constructor signature accepts optional $firma parameter

Requirements

  • PHP 8.0+
  • spojenet/flexibee ^3.6

Full Changelog: https://github.com/VitexSoftware/php-abraflexi-bricks/compare/v1.4.1...v1.5.0

Back to articles