Repository navigation
Breaking release.
See UPGRADE.md for every change with before and after code.
Changed
-
Requires PHP ^8.4, Laravel 12 or 13 and
nesbot/carbon^3.15. Laravel 10 and 11 and PHP 8.1 to 8.3 stay on 1.x. -
Moved to
src/. The main class isConsoleTVs\Invoices\Invoice;ConsoleTVs\Invoices\Classes\Invoiceremains as a
deprecatedclass_alias. Config isconfig/invoices.php, views areresources/views, currencies are
resources/currencies.json. -
Fully typed (
declare(strict_types=1), native types,#[\Override]). Invoice state usesprotected(set)properties:
readable by templates, writable only through fluent setters. -
The API is camelCase:
dueDate(),withPagination(),duplicateHeader(),taxRates(), and so on. The snake_case
methods are removed.quantityreplacesamount/ammount. -
Money lives in
Support\Moneyand is string based end to end; formatting no longer goes through floats, so large
amounts keep every digit. PubliclineTotal(),subtotal(),tax(),taxTotal(),total(),format(). -
PdfRenderer(container bound, configured frominvoices.pdf.*) replaces the staticPDF::generate(). PHP
execution stays off and TLS stays verified. -
The default
tax_ratesconfig is an empty list; the blank placeholder rate of 1.x configs is ignored. -
The default template uses the new API and prints an item description when there is one.
-
download()andshow()return anIlluminate\Http\Responseinstead of streaming to the output;stream()is an
alias. The name is optional and.pdfis appended. -
The default font is
Helveticainstead ofDejaVu Sans(much smaller PDFs). Non-Latin scripts needfont('DejaVu Sans'). -
The default template is translated and prints dates and, with
ext-intl, amounts in the invoice locale.Invoice::$name
is nullable (useheading()),Party::lines()takes the id label. -
Percentage taxes are calculated on the tax base (subtotal minus discounts plus taxable fees).
-
Requires
illuminate/contracts,illuminate/httpandilluminate/translation; suggestsext-intlandilluminate/mail.
Added
-
Laravel integration: the invoice is
Responsable,Htmlable(toHtml()) andAttachable(->attach($invoice)in
Mailables and notifications);filename(). -
Translations for English, Spanish, Catalan, French, German, Italian, Portuguese and Dutch, the
invoices-translations
publish tag andlocale(). -
Locale aware currency formatting (
money(),Number::currency()with an exact fallback beyond float precision) and dates. -
font()and thefontconfig key;direction()and automatic right to left layout forar,fa,he,ur. -
discount()andfee()(taxable or not) withdiscountTotal(),feeTotal()andtaxBase(). -
Document types (
Invoice::quote(),receipt()("Payment date", no due date),creditNote(),proforma(),type()) and status stamps
(stamp(),paid(),void()). -
Exceptions
InvalidDirection,InvalidFontandInvalidAdjustment. -
Item,TaxRateandPartyvalue objects (withfromArray()factories, so arrays keep working);TaxType,
OrientationandPaperenums. -
addItems(),output(),logo($url, $height),Partyemailandextralines, itemdescription. -
ConsoleTVs\Invoices\Facades\Invoicefacade (no global alias),InvoiceFactory,Macroable,ConditionableandTappable. -
Publish tags
invoices-configandinvoices-views(invoicesstill publishes both). -
Specific exceptions under
Exceptions\, allInvalidArgumentExceptions. -
PHPStan level 9 (Larastan) and Pint, run in CI; CI on PHP 8.4 to 8.6 with Laravel 12 and 13.
-
UPGRADE.md,AGENTS.md,CONTRIBUTING.md, issue and pull request templates.
Removed
-
The stale
docs/1/readme.md. -
The snake_case methods,
formatCurrency(),detailLines(),isPlaceholderTaxRate(),Classes\PDFand
Traits\Setters.
Upgrading from 1.x: see UPGRADE.md.