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

PHP Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in alias.php on line 18 #623

Closed
joshmurrayeu opened this issue Sep 4, 2018 · 24 comments

Comments

@joshmurrayeu
Copy link

I am attempting to start up Valet on my new MacBook Pro using High Sierra 10.13.6.

I have followed the instructions... brew update, brew install php@7.2, etc however, when I run valet install, I am greeted with this stack trace.

Any help would be appreciated.

Thanks

Stack trace:

~/projects/test ⮀ valet install
PHP Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
PHP Stack trace:
PHP 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
PHP 2. require() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:10
PHP 3. ComposerAutoloaderInit8ea7fb8c1f0e827c917dfbfde1721b9d::getLoader() /Users/joshmurray/.composer/vendor/autoload.php:7
PHP 4. composerRequire8ea7fb8c1f0e827c917dfbfde1721b9d() /Users/joshmurray/.composer/vendor/composer/autoload_real.php:56
PHP 5. require() /Users/joshmurray/.composer/vendor/composer/autoload_real.php:66
PHP 6. class_alias() /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:18

Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18

Call Stack:
0.0005 447352 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
0.0007 448496 2. require('/Users/joshmurray/.composer/vendor/autoload.php') /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:10
0.0008 463152 3. ComposerAutoloaderInit8ea7fb8c1f0e827c917dfbfde1721b9d::getLoader() /Users/joshmurray/.composer/vendor/autoload.php:7
0.0051 1309584 4. composerRequire8ea7fb8c1f0e827c917dfbfde1721b9d() /Users/joshmurray/.composer/vendor/composer/autoload_real.php:56
0.0052 1313520 5. require('/Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php') /Users/joshmurray/.composer/vendor/composer/autoload_real.php:66
0.0058 1456008 6. class_alias() /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:18

PHP Warning: Class 'Tightenco\Collect\Support\Debug\HtmlDumper' not found in /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
PHP Stack trace:
PHP 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
PHP 2. require() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:10
PHP 3. ComposerAutoloaderInit8ea7fb8c1f0e827c917dfbfde1721b9d::getLoader() /Users/joshmurray/.composer/vendor/autoload.php:7
PHP 4. composerRequire8ea7fb8c1f0e827c917dfbfde1721b9d() /Users/joshmurray/.composer/vendor/composer/autoload_real.php:56
PHP 5. require() /Users/joshmurray/.composer/vendor/composer/autoload_real.php:66
PHP 6. class_alias() /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:18

Warning: Class 'Tightenco\Collect\Support\Debug\HtmlDumper' not found in /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18

Call Stack:
0.0005 447352 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
0.0007 448496 2. require('/Users/joshmurray/.composer/vendor/autoload.php') /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:10
0.0008 463152 3. ComposerAutoloaderInit8ea7fb8c1f0e827c917dfbfde1721b9d::getLoader() /Users/joshmurray/.composer/vendor/autoload.php:7
0.0051 1309584 4. composerRequire8ea7fb8c1f0e827c917dfbfde1721b9d() /Users/joshmurray/.composer/vendor/composer/autoload_real.php:56
0.0052 1313520 5. require('/Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php') /Users/joshmurray/.composer/vendor/composer/autoload_real.php:66
0.0064 1456040 6. class_alias() /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:18

Stopping nginx...
Installing nginx configuration...
Installing nginx directory...
Updating PHP configuration...
Restarting php...
Restarting dnsmasq...
Restarting nginx...

Valet installed successfully!

@paulredmond
Copy link

paulredmond commented Sep 4, 2018

I'm getting the same issue, it seems related to laravel/framework#25087.

Also relevant tighten/collect#124

@mattstauffer
Copy link
Member

I broke it! Sorry! I will fix it as soon as I get my kids to bed ❤️

@mattstauffer mattstauffer changed the title PHP Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in /Users/joshmurray/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18 PHP Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in alias.php on line 18 Sep 5, 2018
@mattstauffer
Copy link
Member

mattstauffer commented Sep 5, 2018

I've fixed this problem, but I can't figure out a way to make the fix go out until Laravel 5.7.2 comes out (because I can't tag Collect 5.7.2 with the fix, because then it would be out of sync with the Laravel components).

@paulredmond
Copy link

It’s a warning so I’m not seeing anything critical myself with it 😁

@mattstauffer
Copy link
Member

Yep, I was thinking the same thing; ignore the warning and it will go away as soon as we tag the next release. :) Thanks!

@mattstauffer
Copy link
Member

Reopening so people can find it until it’s fixed.

@satyago
Copy link

satyago commented Sep 5, 2018

@mattstauffer Thank you for the quick fix and keeping this record !
Took me a while to find it but now I'm relieved 👍🥇

@joshmurrayeu
Copy link
Author

Good morning all.

I've just preformed a quick composer global update and I received the following updates:

~/.composer ⮀ composer global update
Changed current directory to /Users/joshmurray/.composer
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals

  • Updating symfony/var-dumper (v3.4.15 => v4.1.4): Loading from cache
  • Updating tightenco/collect (v5.7.1 => v5.7.2): Downloading (100%)
    Writing lock file
    Generating autoload files

I preformed a valet install and I'm still getting this:

~/.composer ⮀ valet install
Password:
Sorry, try again.
Password:
PHP Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
PHP Stack trace:
PHP 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
PHP 2. require() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:8
PHP 3. ComposerAutoloaderInit13b2b43e1baf99c536dd6f91a45f1789::getLoader() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/autoload.php:7
PHP 4. composerRequire13b2b43e1baf99c536dd6f91a45f1789() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:56
PHP 5. require() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:66
PHP 6. class_alias() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php:18

Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18

Call Stack:
0.0006 447352 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
0.0026 448528 2. require('/Users/joshmurray/.composer/vendor/laravel/valet/vendor/autoload.php') /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:8
0.0037 463376 3. ComposerAutoloaderInit13b2b43e1baf99c536dd6f91a45f1789::getLoader() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/autoload.php:7
0.0194 836192 4. composerRequire13b2b43e1baf99c536dd6f91a45f1789() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:56
0.0199 840144 5. require('/Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php') /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:66
0.0282 1268080 6. class_alias() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php:18

PHP Warning: Class 'Tightenco\Collect\Support\Debug\HtmlDumper' not found in /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
PHP Stack trace:
PHP 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
PHP 2. require() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:8
PHP 3. ComposerAutoloaderInit13b2b43e1baf99c536dd6f91a45f1789::getLoader() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/autoload.php:7
PHP 4. composerRequire13b2b43e1baf99c536dd6f91a45f1789() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:56
PHP 5. require() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:66
PHP 6. class_alias() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php:18

Warning: Class 'Tightenco\Collect\Support\Debug\HtmlDumper' not found in /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18

Call Stack:
0.0006 447352 1. {main}() /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:0
0.0026 448528 2. require('/Users/joshmurray/.composer/vendor/laravel/valet/vendor/autoload.php') /Users/joshmurray/.composer/vendor/laravel/valet/cli/valet.php:8
0.0037 463376 3. ComposerAutoloaderInit13b2b43e1baf99c536dd6f91a45f1789::getLoader() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/autoload.php:7
0.0194 836192 4. composerRequire13b2b43e1baf99c536dd6f91a45f1789() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:56
0.0199 840144 5. require('/Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php') /Users/joshmurray/.composer/vendor/laravel/valet/vendor/composer/autoload_real.php:66
0.0298 1268112 6. class_alias() /Users/joshmurray/.composer/vendor/laravel/valet/vendor/tightenco/collect/src/Collect/Support/alias.php:18

Stopping nginx...
Installing nginx configuration...
Installing nginx directory...
Updating PHP configuration...
Restarting php...
Restarting dnsmasq...
Restarting nginx...

Valet installed successfully!

Do you know when this will be fixed?

Thanks very much.
Josh

@joshmurrayeu
Copy link
Author

Hi again

I just wanted to let everyone know that this seems to be fixed now. I went to my global composer.json located in my home directory and I removed everything from there with: composer remove vendor/package. Once I had went through all of the removals, I proceeded with a quick composer dump-autoload and lastly a composer clear-cache.

I then required valet again with composer global require laravel/valet and executed valet install.

Works. Thanks @mattstauffer

Josh

@mattstauffer
Copy link
Member

Composer global update should fix it for anyone else who runs into this. Or ‘composer global update Laravel/valet’ I think.

@pankaj-ag
Copy link

I just ran composer global update and then valet install and getting the following error.

valet start
PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/Collection.php on line 181
PHP Stack trace:
PHP 1. {main}() /Users/pankajagrawal/.composer/vendor/laravel/valet/cli/valet.php:0
PHP 2. require() /Users/pankajagrawal/.composer/vendor/laravel/valet/cli/valet.php:10
PHP 3. ComposerAutoloaderInitf1e036c3fa08b21f654fd3b8a328d868::getLoader() /Users/pankajagrawal/.composer/vendor/autoload.php:7
PHP 4. composerRequiref1e036c3fa08b21f654fd3b8a328d868() /Users/pankajagrawal/.composer/vendor/composer/autoload_real.php:56
PHP 5. require() /Users/pankajagrawal/.composer/vendor/composer/autoload_real.php:66
PHP 6. class_alias() /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:16
PHP 7. spl_autoload_call() /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:16
PHP 8. Composer\Autoload\ClassLoader->loadClass() /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:16
PHP 9. Composer\Autoload\includeFile() /Users/pankajagrawal/.composer/vendor/composer/ClassLoader.php:322
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/Collection.php on line 181Call Stack:
0.0008 300952 1. {main}() /Users/pankajagrawal/.composer/vendor/laravel/valet/cli/valet.php:0
0.0010 302560 2. require('/Users/pankajagrawal/.composer/vendor/autoload.php') /Users/pankajagrawal/.composer/vendor/laravel/valet/cli/valet.php:10
0.0012 318440 3. ComposerAutoloaderInitf1e036c3fa08b21f654fd3b8a328d868::getLoader() /Users/pankajagrawal/.composer/vendor/autoload.php:7
0.0035 575232 4. composerRequiref1e036c3fa08b21f654fd3b8a328d868() /Users/pankajagrawal/.composer/vendor/composer/autoload_real.php:56
0.0036 579496 5. require('/Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php') /Users/pankajagrawal/.composer/vendor/composer/autoload_real.php:66
0.0039 587200 6. class_alias() /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:16
0.0039 587568 7. spl_autoload_call() /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:16
0.0039 587624 8. Composer\Autoload\ClassLoader->loadClass() /Users/pankajagrawal/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php:16
0.0039 587792 9. Composer\Autoload\includeFile() /Users/pankajagrawal/.composer/vendor/composer/ClassLoader.php:322

@drbyte
Copy link
Contributor

drbyte commented Sep 12, 2018

@pankaj-ag wrote:

PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR)

The most often cause of that is using an old PHP version. Valet requires at least PHP 5.6. I suspect yours is older.
What does this output? php -v

@pankaj-ag
Copy link

@drbyte
Current php version is php 5.6.37.

PHP 5.6.37 (cli) (built: Jul 20 2018 08:26:50)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

@drbyte
Copy link
Contributor

drbyte commented Sep 12, 2018

What's in your ~/.composer/composer.json file?

@drbyte
Copy link
Contributor

drbyte commented Sep 12, 2018

I think you're using PHP7 versions of packages, but don't have PHP 7 installed.
Therefore for you forcing your global composer config to require PHP 5.6 versions of packages will be necessary until you move to a newer PHP version.

composer global config platform.php 5.6.36
composer global update

@pankaj-ag
Copy link

thanks @drbyte
I will try and let you know if this fix the issue.

thanks again for the help.

@Lloople
Copy link

Lloople commented Sep 29, 2018

I'm having this error.

I tried with composer global update laravel/valet and also the steps suggested by @joshmurrayeu. Any news? 🤔

Valet version is v2.1.1

@joshmurrayeu
Copy link
Author

Hi @Lloople

Did you follow all of the steps I noted down or just some of them? I have tried this on multiple machines and it seems to work in every case. Please try once again (remove all of the packages, dump the autoload, clear the cache, require the package once again).

Before you remove all of your packages, I would recommend making a backup of your global composer.json file (you should always do periodic backups of these files anyway).

Please get back and let us know how you get on.

Thanks
Josh

@Lloople
Copy link

Lloople commented Sep 30, 2018

Hi @joshmurrayeu,

Yes I followed all the steps, and I did it again in case I missed something last time.

It continues to happen, but only in a non-laravel project which have installed tightenco/collect.

Weird thing is that the erro comes from project/vendor/tightenco/collect/src/Collect/Support/helpers.php, so maybe I should open an issue in that package 🤔

@mattstauffer
Copy link
Member

mattstauffer commented Sep 30, 2018

@Lloople you have an outdated version of Collect. Your problem has nothing to do with Valet. You need to update collect in that project.

@Lloople
Copy link

Lloople commented Sep 30, 2018

@mattstauffer this is what composer.lock says on that project

"name": "tightenco/collect",
"version": "v5.7.6",

I think it's the last version (Installed it yesterday)

EDIT: But you gave an idea with that comment. The issue was that this project already required symfony/var-dumper, but an old version: "symfony/var-dumper": "^3.3@dev". I removed that line and run composer update and everything works now. Maybe tightenco/collect should be less flexible on var-dumper version? 🤔

@mattstauffer
Copy link
Member

@Lloople if you want to discuss any further let’s move over to collect. But it is relaxed; you may have just needed to update twice (we upped and then re-lowered that exact version constraint if I remember correctly)

@pankaj-ag
Copy link

@drbyte your solution worked for me. Thanks.

@adahox
Copy link

adahox commented Feb 22, 2022

composer global update worked smooth to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants