Fatal error: Cannot redeclare assetic_init()
I use assetic with symfony2, but when i install symfony, then spring up this error:
Fatal error: Cannot redeclare assetic_init() (previously declared in D:\site\gsc.local\vendor\kriswallsmith\assetic\src\functions.php:24) in D:\site\service.ru\vendor\kriswallsmith\assetic\src\functions.php on line 30
Please help me. I use windows 7 and apache. What could be the problem?
Aren't you including /vendor/autoload.php from both Global and Local Composer installations? Maybe both have Assetic installed.
Yea, i including this file in php.ini auto_prepend_file directive. It's necessary for vardumper. Whether it is possible do so, that autoload.php was included and worked assetic?
@combatx007 loading the autoloading for global packages will break if you have some packages defining functions. I suggest you to use an install with only var_dumper in it for the auto_prepend_file instead of a setup with many packages.
Seems like you ran into the same bug assetic has, that i ran into: https://github.com/kriswallsmith/assetic/pull/770
Multiple inclusion of assetic is bogus atm due to an errourness usage of function_exists.