You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Fatal error: Cannot redeclare" due to simple naming convention.
The
Steps To Reproduce:
try to use a code base (like adminer.php) with function declarations that are defined in helpers.php
Illuminate/Foundation/helpers.php Causes a fatal error
I understand your point, but I don't think abandoning global namespace helpers is something Laravel would do since they're extremely helpful and widely used by developers.
Description:
"Fatal error: Cannot redeclare" due to simple naming convention.
The
Steps To Reproduce:
try to use a code base (like adminer.php) with function declarations that are defined in helpers.php
Illuminate/Foundation/helpers.php Causes a fatal error
Example of one of the collisions in adminer.php
vrana/adminer#220 (comment)
Example of using adminer.php with laravel: https://github.com/leung0826/adminer-for-laravel
Example of forced fix to prevent collisions: https://github.com/leung0826/adminer-for-laravel/blob/master/src/Console/UpdateCommand.php#L120
Suggested Solutions future compatibility
Suggested Solutions 1 (class)
lf helpers class
lf::abort()
lf::abort_if()
lf::abort_unless()
lf::action()
lf::app()
lf::app_path()
lf::asset()
lf::auth()
lf::back()
lf::base_path()
lf::bcrypt()
lf::broadcast()
lf::cache()
lf::config()
lf::config_path()
lf::cookie()
lf::csrf_field()
lf::database_path()
lf::decrypt()
lf::dispatch()
lf::elixir()
lf::encrypt()
lf::event()
lf::factory()
lf::info()
lf::logger()
lf::method_field()
lf::mix()
lf::old()
lf::policy()
lf::path()
lf::public_path()
lf::redirect()
lf::request()
lf::resolve()
lf::resource_path()
lf::response()
lf::route()
lf::secure_asset()
lf::secure_url()
lf::session()
lf::storage_path()
lf::trans()
lf::trans_choice()
lf::__()
lf::url()
lf::validator()
lf::view()
Suggested Solutions 2 (namespace)
lf helper functions in namespace
lf\abort()
lf\abort_if()
lf\abort_unless()
lf\action()
lf\app()
lf\app_path()
lf\asset()
lf\auth()
lf\back()
lf\base_path()
lf\bcrypt()
lf\broadcast()
lf\cache()
lf\config()
lf\config_path()
lf\cookie()
lf\csrf_field()
lf\database_path()
lf\decrypt()
lf\dispatch()
lf\elixir()
lf\encrypt()
lf\event()
lf\factory()
lf\info()
lf\logger()
lf\method_field()
lf\mix()
lf\old()
lf\policy()
lf\path()
lf\public_path()
lf\redirect()
lf\request()
lf\resolve()
lf\resource_path()
lf\response()
lf\route()
lf\secure_asset()
lf\secure_url()
lf\session()
lf\storage_path()
lf\trans()
lf\trans_choice()
lf\__()
lf\url()
lf\validator()
lf\view()
The text was updated successfully, but these errors were encountered: