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

[proposal] some kind of namespacing on globals #6872

Closed
CarstenHoyer opened this issue Jan 2, 2015 · 5 comments
Closed

[proposal] some kind of namespacing on globals #6872

CarstenHoyer opened this issue Jan 2, 2015 · 5 comments

Comments

@CarstenHoyer
Copy link

I just installed Drupal and Drush in Homestead using Composer. I know Homestead is made for Laravel, but its just so good :)

When doing anything with Drush I would get:

PHP Fatal error: Cannot redeclare base_path() (previously declared in /home/vagrant/.composer/vendor/illuminate/support/Illuminate/Support/helpers.php:365) in /home/vagrant/Workspace/drupal/8/community/core/includes/common.inc on line 830

Drupal also has a base_path global function. I ended up renaming the Laravel base_path to laravel_base_path. Maybe not the prettiest solution, but it looks like it is working for now.

Please consider some solution (probably not mine) to this problem.

EDIT: Same goes for dd()

@GrahamCampbell
Copy link
Member

That would go against the whole point of these functions, sorry. They need to be easy to use in views, like the trans function. We can't namespace them.

@rossedman
Copy link

@CarstenHoyer how did you work around this and change this variable when working in Drupal sites?

@CarstenHoyer
Copy link
Author

@rossedman I didn´t. I started using Homestead for Laravel and VDD for Drupal. Much better solution.

@rossedman
Copy link

@CarstenHoyer Thats what I was considering. Thanks so much for responding.

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

4 participants