Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Humbug and Laravel Valet #186

Open
greenbicycle opened this issue Sep 3, 2016 · 4 comments
Open

Humbug and Laravel Valet #186

greenbicycle opened this issue Sep 3, 2016 · 4 comments

Comments

@greenbicycle
Copy link

I am trying Humbug out for the first time and I am having a small problem with Humbug + Laravel Valet.

Humbug is trying to load the Valet helpers file and the Illuminate/Foundation/helpers.php file at the same time and they both have a function named info(). So I am getting a 'cannot redeclare info() error'. This error isn't present when I run PHPUnit on the same project.

How do I tell Humbug not to load the global Valet files (located in ~/.composer/vendor/laravel/valet/cli/includes/helpers.php)?

I can fix this by wrapping the info function in helpers.php in an "if(!function_exists('info'){})" statement, but that doesn't sound like a long term solution.

@greenbicycle
Copy link
Author

If I remove Laravel Valet, then Humbug works fine.

I just re-installed Valet and I am using 1.1.19. Humbug is 1.0-dev.

I had originally installed humbug globally via composer. I just uninstalled it globally and re-installed it locally in the project and everything works now. I can have Valet and Humbug installed at the same time.

@theofidry
Copy link
Member

@greenbicycle any application/tool executing your code may have dependencies that can conflict with yours. If you want to avoid that, installing it as a dependency of your project solve that problems.

@greenbicycle
Copy link
Author

Thanks. Problem solved.

@padraic
Copy link
Collaborator

padraic commented Apr 13, 2017

Probably worth noting somewhere prominently in the docs.

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

No branches or pull requests

3 participants