boxybird / laravel-directus-api-wrapper

A collection of Laravel facades to interact with Directus CMS.
9 stars 2 forks source link

Lumen Compatibility? #4

Closed doughnet closed 3 years ago

doughnet commented 3 years ago

Howdy. Wanted to see if there was any luck using Lumen? I get this below error with running php artisan after installing the package. Would be nice if compatibility with Lumen worked to minimize the size of the framework since Directus is used as a backend.

`In Container.php line 811:

Uncaught ReflectionException: Class path.storage does not exist in /home/bgv/dev/laravel/lumenTest/ven dor/laravel/framework/src/Illuminate/Container/Container.php:809 Stack trace:

0 /home/bgv/dev/laravel/lumenTest/vendor/laravel/framework/src/Illuminate/Container/Container.php(809

): ReflectionClass->__construct()

1 /home/bgv/dev/laravel/lumenTest/vendor/laravel/framework/src/Illuminate/Container/Container.php(691

): Illuminate\Container\Container->build()

2 /home/bgv/dev/laravel/lumenTest/vendor/laravel/framework/src/Illuminate/Container/Container.php(637

): Illuminate\Container\Container->resolve()

3 /home/bgv/dev/laravel/lumenTest/vendor/laravel/lumen-framework/src/Application.php(300): Illuminate

\Container\Container->make()

4 /home/bgv/dev/laravel/lumenTest/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(119)

: Laravel\Lumen\Application->make()

5 /home/bgv/dev/laravel/lumenTest/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(768)

: app()

6 /home/

`

boxybird commented 3 years ago

Hello, @doughnet -

In spirit, I agreed with you. Lumen feels lean and mean, and a perfect frontend solution for a Directus backend.

In reality, supporting Lumen for this package doesn't feel right. About a year ago Taylor Otwell (creator of Laravel and Lumen) went public with these thoughts: https://twitter.com/taylorotwell/status/1144316193706323973

doughnet commented 3 years ago

Hello, @doughnet -

In spirit, I agreed with you. Lumen feels lean and mean, and a perfect frontend solution for a Directus backend.

In reality, supporting Lumen for this package doesn't feel right. About a year ago Taylor Otwell (creator of Laravel and Lumen) went public with these thoughts: https://twitter.com/taylorotwell/status/1144316193706323973

Thank you for responding. Definitely agree with the performance benefits; it's so minimal. I believe in terms of disk space it is a big difference. A fresh laravel install is about 150mb+ I believe while a lumen fresh install is about 35mb.

So someone with 1gb of hosting would only be able to do a few laravel installs versus many more lumens ...

boxybird commented 3 years ago

Interesting. I never thought about the framework file size... so I just did a little test.

Note: To keep it apples to apples, I did not install any JS (node_modules), just the raw frameworks.

Lumen: 31.4 MB - 6,473 Files - 1,083 Folders Laravel: 35.2 MB - 7,258 Files - 1,194 Folders

What am I missing?

doughnet commented 3 years ago

you're probably correct; i was just doing a du -sh from the directory.