Skip to content

Laravel 9+ features #1

Open
Open
@judgej

Description

@judgej

Some nice-to-haves, not all essential.

  • Support PHP Money ^4.0
  • Use PHP enum for ledger type.
  • Use string for accounting_ledgers.type. Database enums are great, but really hard to manage in Laravel.
  • Use anonymous function style migrations.
  • Database migration should use the current date and time (but keep the migrations in the correct order).
  • Add notes about using aliases for the morphed type models.
  • Replace dates casting with casts in the models (dates has been deprecated, and removed for Laravel 10).
  • Fix balance calculations so they cannot accidentally mix currencies.
  • Support Carbon\CarbonImmutable for dates, as that is the new default for Laravel 9+. Use Carbon\CarbonInterface as the common interface.
  • initJournal should take a Money\Currency object to be sure it is valid, and if not supplied, default to the config currency, not hard-coded USD.
  • Fix model needing to be re-fetched after its journal has been initialised before the journal can be seen.
  • The transaction reference object should be a normal polynomial relationship.
  • Unique index on journals to ensure a model does not have multiple journals.
  • Move the migrations out of the autoload src directory.
  • Overhaul the whole readme.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions