laravel-arangodb
laravel-arangodb copied to clipboard
Third-party package compatibility
Aranguent is nearing the point where it can work with third party packages. I'm aiming to provide a smooth conversion with minimal extra steps for anyone implementing this driver.
If you have migrations you will need to publish and convert those. If you have a model you will need to extend Aranguent's model or use the IsAranguentModel trait and override the key attributes (primaryKey & keyType).
These are the packages I'll be testing in the coming weeks/months:
- [x] :white_check_mark: Laravel Horizon
- [x] :white_check_mark: Spatie Medialibrary
- [x] :white_check_mark: Spatie Permissions
- [x] :white_check_mark: barryvdh/laravel-debugbar
- [x] :white_check_mark:/:x: Laravel Pulse (* see comment)
- [ ] Laravel Passport
- [ ] Laravel Sanctum
- [ ] Spatie laravel-multitenancy
- [ ] Cashier Mollie
If you have any (popular) package you'd like to see tested please put them in a comment, or better yet: help out, test it and comment your findings or help out by improving Aranguent.
Things to look for that might indicate incompatiblities:
- transactions
- Assumed field names. i.e. hard coded standards like id, created_at, deleted_at which ought to be configurable and retrieved with a getter.
- raw SQL queries
- non-customizable models
- foreign keys with cascading deletes and updates
- Proper id/_key conversion
Spatie's medialibrary works like a charm. A simple override of the media model is all it takes and can be done in about 30 seconds.
Extend the new model from Spatie's Media model and use isAranguentModel and set the key type to string.
use IsAranguentModel;
/**
* The primary key type.
*
* @var string
*/
protected $keyType = 'string';
I'll add it to the documentation at some point
Laravel Horizon works out of the box. (it mostly uses redis anyway)
Spatie permissions works outof the box
The laravel debugbar works out of the box.
(Note that booleans are displayed as '1' or '0' strings instead of true/false(!) in the query log.
You CAN use Laravel Pulse if you use a SQL database next to your ArangoDB project.
Laravel Pulse requires a SQL database. So, you can't store your Pulse Data within ArangoDB.
If you really want to store the Pulse data within ArangoDB, it looks like a wrapper shouldn't be a problem though. I have no plans to develop that atm.