Skip to content

0.5.0

Choose a tag to compare

@developeritsme developeritsme released this 01 Feb 18:45
· 16 commits to master since this release

Breaking Changes

  • PHP 8.0+ required — dropped PHP 7.x support
  • Carbon 3.x supported — now requires nesbot/carbon ^2.0 || ^3.0
  • setType() deprecated — replaced by setMethod() (CASH/NONCASH) and setInvoiceType() (INVOICE/CORRECTIVE/etc.). setType() still works as a deprecated alias.
  • HasGroupedItems trait removed — was dead code on PaymentMethods; SameTaxes uses its own implementation
  • Countries no longer extends Model — standalone class, toXML() removed

Security

  • Fix null pointer crash in response parsing when expected XML elements are missing
  • Fix \Exception namespace in Fiscal::sign() — now throws FiscalException
  • SSL peer verification enabled by default (CURLOPT_SSL_VERIFYPEER => true)
  • Prevent XXE attacks in XML response parsing
  • Add error handling for IIC signing failures

New Features

  • ExemptFromVAT reason on Item (EX attribute) and SameTaxes (spec 3.7.1.99, 3.7.1.109)
  • SubseqDelivType on Invoice and CashDeposit request headers (spec 3.7.1.3)
  • BankAccNum, Note, PayDeadline on Invoice (spec 3.7.1.28, 3.7.1.34, 3.7.1.35)
  • setRebate($percent, $reducesBasePrice) on Item — configurable item-level discounts (spec 3.7.1.90-91)
  • toArray() on all consumer-facing models (Invoice, Item, BusinessUnit, CashDeposit, etc.)
  • FiscalException base class — all library exceptions extend it
  • ValidationException — pre-send model validation with structured error messages
  • Invoice::setNumber() now rejects zero (spec requires >= 1)

Full Changelog: 0.4.0...0.5.0