I want to use this package: https://github.com/lucadegasperi/oauth2-server-laravel/wiki/Installation for using OAuth 2.0 in Laravel
I can't install it correctly. First, I cannot update the composer, so I have to change "minimum-stability": "stable"
to "minimum-stability": "dev"
. By updating the composer, all my packages are being replaced bij dev versions.
And second, I can not publish my package by typing this command in my terminal: php artisan config:publish lucadegasperi/oauth2-server-laravel
.
I get this error:
php artisan config:publish lucadegasperi/oauth2-server-laravel
{"error":{"type":"ErrorException","message":"file_put_contents(\/Applications\/XAMPP\
/xamppfiles\/htdocs\/api-dashboardv2\/app\/storage\/meta\/services.json): failed to
open stream: Permission denied","file":"\/Applications\/XAMPP\/xamppfiles\/htdocs\
/api-dashboardv2\/vendor\/laravel\/framework\/src\/Illuminate\/Filesystem\
/Filesystem.php","line":69}}
I tried chmod -R 777 app
, but it is unable to change the file mode on app. I am using XAMMP for developing.
Can I install and publish this package without composer or something?
UPDATE:
I get the following error now:
PHP Fatal error: Class 'League\\OAuth2\\Server\\Storage\\Adapter' not found in /Applications/XAMPP/xamppfiles/htdocs/api-dashboardv2/vendor/lucadegasperi/oauth2-server-laravel/src/Storage/FluentAdapter.php on line 18 {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'League\\OAuth2\\Server\\Storage\\Adapter' not found","file":"/Applications/XAMPP/xamppfiles/htdocs/api-dashboardv2/vendor/lucadegasperi/oauth2-server-laravel/src/Storage/FluentAdapter.php","line":18}}
And, is it possible to set "minimum-stability": "dev"
back to 'stable'
and only get the dev version of the OAuth package?
As others have mentioned you should be fine by giving it write permission as described in the Docs
chmod -R 775 app/storage
Note that 775 should be sufficient. Here's a nice answer pointing out the difference...
Regarding the stability config in your composer.json
You can define the stability on each package!
"lucadegasperi/oauth2-server-laravel": "@dev"
[The bug has been fixed in the meantime]
Apparently someone just made very recent changes to the project that broke some things. They are already trying to fix it... Github Issue
You need to chmod -R 777 app/storage
or sufficient write permissions to the folder. As the framework stores and write to the folders within the folder. The documentation does say here .
did you try:
chmod 777 app/storage/meta/services.json
it worked for me easily
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.