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

v1.1.22 using laravel/framework v5.2.45 using symphony/http-foundation v.3.0.9 : cannot redeclare info() error #169

Closed
nateritter opened this issue Sep 23, 2016 · 4 comments

Comments

@nateritter
Copy link
Contributor

nateritter commented Sep 23, 2016

Here's my current setup:

  • laravel/valet v1.1.22
  • laravel/framework v5.2.45
  • symfony/http-foundation v3.0.9

Installing valet while using the laravel/framework v5.2 works fine. But immediately errors pop up when doing valet start.

PHP Fatal error: Cannot redeclare info() (previously declared in /Users/nateritter/.composer/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:454) in /Users/nateritter/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 21

So, I thought and try to go wrap a conditional into the /valet/cli/includes/helpers.php to check if the function has been declared. But when doing that and then running any commands which utilize the info() method, I get the following:

[ReflectionException]     
Class log does not exist
@adamwathan
Copy link
Contributor

What's the reason for having laravel/framework installed globally?

One alternative is to clone laravel/valet somewhere else on your machine, run composer install locally for that folder, and then symlink valet from that folder to /usr/local/bin/valet manually, and remove the version you have installed globally.

The way Composer mixes all your global packages is sort of a nightmare sometimes 😔

@nateritter
Copy link
Contributor Author

Honestly, I can't remember why I installed the framework globally. Good catch.

composer global remove laravel/framework and then removed and reinstalled valet and !! poof !! magic. It works.

Thanks @adamwathan .... BTW, huge fan of yours. Thanks for making this awesome product and what you do with the community at large.

@adamwathan
Copy link
Contributor

Sweet! Glad I could help 👍

@jbrooksuk
Copy link
Member

Heads up, Laravel Zero installs some of the illuminate components, so you'd have to remove this.

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

3 participants