cloudcreativity / laravel-json-api

JSON API (jsonapi.org) package for Laravel applications.
http://laravel-json-api.readthedocs.io/en/latest/
Apache License 2.0
778 stars 109 forks source link

bug: service provider boot throws "No application encryption key has been specified." #639

Closed paul-thebaud closed 11 months ago

paul-thebaud commented 11 months ago

When cloning a project with this package automatically discovered on a dockerized environment, we were seing errors "No application encryption key has been specified.".

Looks like this is due to the ServiceProvider bootResponseMacro method (because ResponseFactory will make the service container craft a SessionStore, which requires an application key).

Changing the service provider to only boot response macro if not running in console could fix this.

paul-thebaud commented 11 months ago

Looks like this error is due to the use of SESSION_ENCRYPT=true env variable, not to your package. Closing the issue.