Class botman does not exist resolve(botman) in botman.php from template project when deploying to Heroku

Đang mở
#71 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
laravel, php
Lĩnh vực
backend, cloud

Hướng nghiên cứu

Bắt đầu với routes/botman.php, đặc biệt là lời gọi resolve('botman') ở dòng 17, và so sánh việc triển khai trên Heroku với thiết lập cục bộ. Xem xét config/app.php và stack trace của container Laravel để xác định lý do binding của BotMan không khả dụng trong môi trường triển khai. Hoàn thành khi route hoạt động trên Heroku mà không gặp lỗi Class botman does not exist đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

When running php artisan serve on mi local server, I'm able to connect to Facebook with my application without problem, but when deployed to Heroku and accessing the route ...routes/botman.php the Heroku logs show the following error:

2018-10-05T22:12:54.859603+00:00 heroku[web.1]: State changed from starting to up 2018-10-05T22:13:11.016623+00:00 heroku[router]: at=info method=GET path="/routes/botman.php" host=testint-bot-credifintech.herokuapp.com request_id=24f81856-a417-4f89-bc57-5a0ec7dde6f2 fwd="189.216.104.106" dyno=web.1 connect=1ms service=182ms status=500 bytes=169 protocol=https 2018-10-05T22:13:11.019071+00:00 app[web.1]: [05-Oct-2018 22:13:11 UTC] PHP Fatal error: Uncaught ReflectionException: Class botman does not exist in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:767 2018-10-05T22:13:11.019509+00:00 app[web.1]: Stack trace: 2018-10-05T22:13:11.019772+00:00 app[web.1]: #0 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('botman') 2018-10-05T22:13:11.020942+00:00 app[web.1]: #1 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('botman') 2018-10-05T22:13:11.021997+00:00 app[web.1]: #2 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('botman', Array) 2018-10-05T22:13:11.023205+00:00 app[web.1]: #3 /app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(119): Illuminate\Container\Container->make('botman', Array) 2018-10-05T22:13:11.024174+00:00 app[web.1]: #4 /app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(763): app('botman') 2018-10-05T22:13:11.024419+00:00 app[web.1]: #5 /app/routes/botman.php(17): resolve('botman') 2018-10-05T22:13:11.024691+00:00 app[web.1]: #6 {main} 2018-10-05T22:13:11.025843+00:00 app[web.1]: thrown in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 767

I've seen similar problems with other classes such as View in Laravel, but I've tried from clean:cache, update my composer dependencies, adding a Facade BotMan in config/app.php array, again, with every modification it runs without problem in my pc but when accessing the route on Heroku it shows 500 internal server error message.

These are the versions of heroku and laravel I'm using:

  • Laravel Framework 5.6.39
  • PHP 7.2.8 (cli)
Ngôn ngữ chính
PHP
Star
332
Fork
91
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của botman/studio

Tất cả issue của botman/studio

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.