问题描述
将项目推送到heroku时出现此错误。怎么了?
Deprecation Notice: Class App\Http\Controllers\Admin\n ./app/Http/Controllers/Administrator/Auth/LoginController.PHP doesding standard. It will not autoload anymore in Composer v2.0. in phau/PHP/bin/composer/src/Composer/Autoload/ClassMapGenerator.PHP:201
remote: Deprecation Notice: Class App\Models\vendor located i not comply with psr-4 autoloading standard. It will not autoload anr:///tmp/build_fd6c0433/.heroku/PHP/bin/composer/src/Composer/Autolo
remote: Deprecation Notice: Class App\Models\Rider located inot comply with psr-4 autoloading standard. It will not autoload anym///tmp/build_fd6c0433/.heroku/PHP/bin/composer/src/Composer/Autoload
remote: > Illuminate\Foundation\ComposerScripts::postAutoload
remote: > @PHP artisan package:discover --ansi
remote:
remote: In ProviderRepository.PHP line 208:
remote:
remote: Class 'Tymon\JWTAuth\Providers\LaravelServiceProvid
remote:
remote:
remote: Script @PHP artisan package:discover --ansi handling eturned with error code 1
remote: ! WARNING: There was a class not found error in your co
remote:
remote: ! ERROR: Dependency installation Failed!
remote: !
remote: ! The 'composer install' process Failed with an error.
remote: ! may be the download or installation of packages,or a
remote: ! post-install hook (e.g. a 'post-install-cmd' item in
remote: ! in your 'composer.json'.
remote: !
remote: ! Typical error cases are out-of-date or missing parts
remote: ! timeouts when making external connections,or memory
remote: !
remote: ! Check the above error output closely to determine the
remote: ! the problem,ensure the code you're pushing is functi
remote: ! properly,and that all local changes are committed co
remote: !
remote: ! For more information on builds for PHP on Heroku,ref
remote: ! https://devcenter.heroku.com/articles/PHP-support
remote: !
remote: ! REMINDER: the following warnings were emitted during
remote: ! check the details above,as they may be related to th
remote: ! - Your 'composer.lock' is out of date!
remote: ! - There was a class not found error in your code
解决方法
- 确保你的 composer.json (Tymon\JWTAuth) 中有这个包
- 如果是,则仅作曲家更新 [包名称]
- 作曲家转储自动加载
希望它能帮助我,因为它帮助了我。
如果上述方法不起作用!只需确保您的包在 composer.json 中从 require-dev 移动到 require