Repository navigation
0.5.0
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 bysetMethod()(CASH/NONCASH) andsetInvoiceType()(INVOICE/CORRECTIVE/etc.).setType()still works as a deprecated alias.HasGroupedItemstrait removed — was dead code onPaymentMethods;SameTaxesuses its own implementationCountriesno longer extendsModel— standalone class,toXML()removed
Security
- Fix null pointer crash in response parsing when expected XML elements are missing
- Fix
\Exceptionnamespace inFiscal::sign()— now throwsFiscalException - 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
ExemptFromVATreason onItem(EX attribute) andSameTaxes(spec 3.7.1.99, 3.7.1.109)SubseqDelivTypeonInvoiceandCashDepositrequest headers (spec 3.7.1.3)BankAccNum,Note,PayDeadlineonInvoice(spec 3.7.1.28, 3.7.1.34, 3.7.1.35)setRebate($percent, $reducesBasePrice)onItem— configurable item-level discounts (spec 3.7.1.90-91)toArray()on all consumer-facing models (Invoice, Item, BusinessUnit, CashDeposit, etc.)FiscalExceptionbase class — all library exceptions extend itValidationException— pre-send model validation with structured error messagesInvoice::setNumber()now rejects zero (spec requires>= 1)
Full Changelog: 0.4.0...0.5.0