Laravel-log-viewer: Class Rap2hpoutre\LaravelLogViewer\LogViewerController does not exist

Created on 23 Apr 2020  ·  12Comments  ·  Source: rap2hpoutre/laravel-log-viewer

Just did a composer update on a Laravel project and now it's showing.

_Class Rap2hpoutre\LaravelLogViewer\LogViewerController does not exist_

This was working fine before the composer update

Thank you.

bug

Most helpful comment

Hi @raymondTheDev @mikemand @scaenicus @tiagoa @DjeeBay @timothymarois & @avesgit !

Thank you for your patience and sorry for the mess. I merged a PR that introduced a breaking change and released it in a minor version (v1.5.0): my bad, I'm sorry about that.

⚠️ I decided (hope I'm not wrong again!) to revert this change in v1.5.2 (I consider reverting as a fix of a regression). 🔥

Unfortunately, it means that you will have to revert your change too, I'm sincerely sorry. Since only 20+ hours as passed since the release I guess we could consider not too much projects are affected, and the next users that will upgrade would not see the problem. I prefer preserving the semantical version (again maybe I'm wrong and sorry for the mess) to avoid unexpected behavior for other users.

Feel free to send me feedback!

All 12 comments

Make sure you are dumping the autoloader when you update:

composer update -oa

Hi @mikemand

Yeah been trying that and it didn't work for me. Is the package working for you right now?

For the mean time, this is how I'm making it work.
web.php:
Route::get('logs', 'HomeController@viewLogs');

HomeController.php:
use Rap2hpoutre\Controllers\LogViewerController;
public function viewLogs(){ $log = new LogViewerController(); return $log->index(); }

same problem

Yes, it's working for me. Are your routes cached? Check the /bootstrap/cache directory. You can safely remove any *.php files in that directory, they will be generated by Laravel on the next page load.

Oh, no sorry. My fault, I was checking a site with an old version still. The new one isn't working for me. I'm investigating.

Ok, I got it working. I used the class-based way of routing, but it should work for the original string-based way too.

Route::get('logs', [\Rap2hpoutre\Controllers\LogViewerController::class, 'index'])

Edit: I think I see the problem. The namespace changed for the controller. Instead of \Rap2hpoutre\LaravelLogViewer\LogViewerController it is now \Rap2hpoutre\Controllers\LogViewerController

I think that's the issue! We would just need to update the README file in regards to the update.

Thank you @mikemand !

In my opinion, Composer needs some way to supply upgrade steps (if applicable) when it is upgrading packages. I spend more time checking each package for an upgrade guide (and if they don't have one, comparing versions) than I do coding sometimes. 😢

Glad you got it working!

Oops. I should not have merged https://github.com/rap2hpoutre/laravel-log-viewer/pull/227 that fast. I re-open this issue since it's a problem that other people may have in the next days. I'm not sure I have to fix this or leave as is and write something in README though...

Hi @raymondTheDev @mikemand @scaenicus @tiagoa @DjeeBay @timothymarois & @avesgit !

Thank you for your patience and sorry for the mess. I merged a PR that introduced a breaking change and released it in a minor version (v1.5.0): my bad, I'm sorry about that.

⚠️ I decided (hope I'm not wrong again!) to revert this change in v1.5.2 (I consider reverting as a fix of a regression). 🔥

Unfortunately, it means that you will have to revert your change too, I'm sincerely sorry. Since only 20+ hours as passed since the release I guess we could consider not too much projects are affected, and the next users that will upgrade would not see the problem. I prefer preserving the semantical version (again maybe I'm wrong and sorry for the mess) to avoid unexpected behavior for other users.

Feel free to send me feedback!

In other words, you have to update then keep using:

\Rap2hpoutre\LaravelLogViewer\LogViewerController

Resolved now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

serdarsaygili picture serdarsaygili  ·  11Comments

rap2hpoutre picture rap2hpoutre  ·  7Comments

hmrneves1 picture hmrneves1  ·  3Comments

judgej picture judgej  ·  9Comments

raksa picture raksa  ·  3Comments