Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Class 'Laravel\Tinker\ClassAliasAutoloader' not found #12

Closed
mendelsimon opened this issue Sep 4, 2020 · 8 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@mendelsimon
Copy link

// Laravel Tinker started at 2020-09-04 11:18:43
PHP Fatal error:  Uncaught Error: Class 'Laravel\Tinker\ClassAliasAutoloader' not found in Command line code:38
Stack trace:
#0 {main}
  thrown in Command line code on line 38

                                                                                                 
  [Symfony\Component\Debug\Exception\FatalErrorException]                                        
  Uncaught Error: Class 'Laravel\Tinker\ClassAliasAutoloader' not found in Command line code:38  
  Stack trace:                                                                                   
  #0 {main}                                                                                      
    thrown                                                                                       
                                                                                                 



*** Execution finished ***
@Roboroads
Copy link
Owner

Roboroads commented Sep 4, 2020

Hey, what version of Laravel are you on? Or version of Tinker?

@Roboroads Roboroads added bug Something isn't working need more info I will need a little more information to be able to do or fix this. labels Sep 4, 2020
@mendelsimon
Copy link
Author

Laravel 5.3.20 with PHP 7.1.28 on Windows.

@Roboroads Roboroads added wontfix and removed need more info I will need a little more information to be able to do or fix this. labels Sep 4, 2020
@Roboroads
Copy link
Owner

Roboroads commented Sep 4, 2020

Well, there is the problem. I'm using the underlying laravel tinker package (https://github.com/laravel/tinker). Laravel Tinker was introduced in Laravel 5.4 (tinker 1.0 btw, I have only tested it with tinker 2 which came with Laravel 6)

You should consider upgrading to a higher laravel version.

But nontheless, thank you for trying to help me find bugs!

@mendelsimon
Copy link
Author

mendelsimon commented Sep 4, 2020

I can definitely use Tinker in Laravel 5.3.20 with php artisan tinker.
Here is the version information for Tinker in my Laravel version: Psy Shell v0.7.2 (PHP 7.1.28 — cli)

@Roboroads
Copy link
Owner

What is your tinker version? (composer show laravel/tinker)

@Roboroads Roboroads reopened this Sep 6, 2020
@mendelsimon
Copy link
Author

Running that command gives me

[InvalidArgumentException]
Package laravel/tinker not found

It looks like Tinker used to be a part of laravel/framework before 5.4, where it was removed into its own laravel/tinker package: laravel/framework#17002.

@Roboroads
Copy link
Owner

Roboroads commented Sep 7, 2020

Ah, seems like it. I think the scope of this bug goes a little over what I want to support. Laravel ended support for 5.3 a long time ago (August 23rd, 2017). I'm willing to fix bugs that occur in currently supported versions.There has to be some boundary, I hope you understand me 🙏

If you really want to support your edge case, you may create a PR for it :)

@Roboroads Roboroads changed the title Error When Run Uncaught Error: Class 'Laravel\Tinker\ClassAliasAutoloader' not found Sep 16, 2020
@Roboroads
Copy link
Owner

@mendelsimon I will add an if araound the classloader (#20) so your application will probably also work in v1.1.2 - note that autoloading is probably not going to work, but i'm not sure and am also not officially supporting it.

@Roboroads Roboroads reopened this Sep 16, 2020
@Roboroads Roboroads removed the wontfix label Sep 16, 2020
@Roboroads Roboroads added this to the v1.2.0 milestone Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants