- The version helper didn't report the correct result for 1.11.1 (duh)
- Requests with a JSON payload that was not valid JSON caused a PHP error. Now an error response is returned. Thanks to @marvoh for reporting the problem.
Note: there is a new entry in the Ledger config, session_key_prefix
, which defaults
to "ledger." and can be overridden by setting LEDGER_SESSION_PREFIX
in the environment.
Existing installations should add this to config/ledger.php.
- Fixed an error in the JSON balance-response schema.
- Fixed: missing audit logs
LedgerAccount::findWith()
now throws an exception when a UUID and account code are both provided but the retrieved code does not match the UUID.- Added API diagnostics, enabled via the
LEDGER_API_DEBUG_ALLOWED
environment setting. When enabled, calls will return version information for the Ledger core and API. - Started API version tracking.
- Refactored API controllers. Messages now have a
run()
method responsible for executing the message. - Improved some error messages.
- Fixed table references in TrialBalanceReport (again)
- Ledger was forcing a name to be present in the default language. Now a named entity must have at least one name in any language.
- Added a description property to entry queries, allowing wildcard matches on the description.
- Changed the error code on unknown operations from Rule Violation to Bad Request.
- Added query operations for currencies, domains, and sub-journals.
- Expanded query selection capabilities by adding
codes
andnames
properties where relevant. - Updated JSON schemas and documentation.
- Issue 10 exposed several cases where performing operations before the ledger was created resulted in confusing responses instead of an error.
- Issue 12 The sub-journal was being validated but not stored in the journal entry.
- ControllerResultHandler::unexpectedException() returns a generic error string suitable for returning to an API call, instead of void.
- LedgerAccount::rules() has a new
required
argument that will throw a Breaker instead of returning null. It defaults to true.
- It was possible to give two ledger accounts the same name in the same language.
- It was possible to give two ledger domains the same name in the same language.
- Updated tests to catch the duplicate naming problem.
- Description arguments in Entry messages were not correctly handled.
- Running a trial balance report on an empty journal generated an error. Thanks to @RoNDz for finding this (Issue #9).
- New test case for Issue 9.
- Added new LedgerAccountTest::testCreateNoRules to catch missing pageSize and missing ledger rules errors.
- If no default page size was set, account/query would return an error (thanks @lewrw!).
- If no rules were specified on ledger creation, an error resulted.
- Ability to add or limit reports via config (thanks @ivanmazep!).
- Implementation of report options on API requests. Trial balance report can now limit how many levels of subaccount detail are returned; application can limit max depth.
- Converted some exceptions to throw a Breaker instead. Added CONFIG_ERROR code, thrown when the report configuration is invalid.
- Breaker::withCode now accepts a string for the error argument in addition to an array.
- The trial balance report now returns the domain with the name localized.
- API requests now decode the JSON directly, avoiding middleware.
- Added the decimal, negative, and thousands options to the trial balance report
- Removed the unused
opFlags
argument from ReportAccount::fromArray() and deprecated the equally unused ReportAccount::validate().
- A query in the trial balance report failed to add a table prefix. Thanks, @alexgoogole!
- Incorrect field in ReportController::getCached(). Thanks @alexgoogole!
- Added clearing transactions.
- Started validating results against our JSON schemas.
- Significant cleanup and restructuring of JSON schemas.
- Consolidated migrations for a new installation.
- Removed redundant messages when returning an error from several API requests
- Audit log now just includes the User ID (if any), not the whole user object.
- Fix rounding error in journal entry.
- Improve error message when account not found in journal entry.
- Fix accidental removal of PHP 8.0 from composer.json
- JournalReference::createFromMessage wasn't looking up the domain.
- Message creation now allows a reference as a string UUID (Detail and Entry messages)
- Add account property to JournalDetail model to retrieve the parent account.
- Add entry property to JournalDetail model to retrieve the parent Entry.
- Abivia\Ledger\Messages\Detail::validate set debit/credit to '' instead of using unset().
- Abivia\Ledger\Messages\Detail::normalizeAmount now takes a null argument
- Added CI for running tests.
- Publishing an updated version was creating redundant migrations.
- Added a
locked
flag to Journal Entries and a lock (/unlock) operation to the journal entry API. Delete and update transactions will fail when an entry is locked.
- Moving logic that's useful to applications outside the API into separate classes under the Logic namespace.
- Templates can now set the account codeFormat rule. Ledger create requests can override the template.
- Added LedgerAccount->parentCode which will fetch the parent's account code (or null if no parent)
- LedgerAccount and Name models have a new toMessage() method.
- Made RootController::listTemplates() static.
- Made the default domain name a constant in Messages\Create
- Added constructors to Messages\Currency, Messages\Name
- Added Messages\Account::inheritFlagsFrom()
- Made ReportAccount::$flex protected so that it is invisible to the API
- Duplicate error messages were being returned.
- The toCode attribute of an account update message was being ignored.
- Invalid API root operations were being treated as create.
- Debit/credit flags were not being inherited for accounts defined in a Create message.
- Names were not being returned on sub-journal requests.
fromArray()
method of message classes given more meaningful defaults for$opFlags
argument (typically OP_ADD).- If no flags are defined in an entry in
Message::$copyable
the default is nowMessage::ALL_OPS
.
- Tests were breaking with new migration class names.
- Fix accounting error in GettingStartedTest.
- Sort accounts by code on trial balance report.
- Bugfix: fix migration file/class naming #2.
- Bugfix: fix migration file/class naming.
- Bugfix: adjust migration timestamps to ensure they run in the right order.
- Bugfix: add sequence number to migrations to ensure they run in the right order.
- Bugfix: short form parent account references (code only) not handled correctly.
- Fix regression: custom ledger rules were being dropped.
- Templates and ledger create operations can now define "sections" for reporting purposes.
- Accounts now have a
taxCode
attribute to simplify mapping for tax reporting. - Created a set of Rules classes for storing Ledger rules.
- Switched from referencing migrations to publishing them.
- Bug fixes.
- Delete operations for Account, Currency, Domain, SubJournal weren't verifying revision hash.
- Implement Balance retrieval via JSON API.
- Bugfix: ranges on account query were ignored.
- Minor bug fixes.
- First production release