antonioribeiro / ia-collection

Laravel Illuminate Agnostic Collection
MIT License
46 stars 23 forks source link

Overrides Laravel helper functions #3

Open hackel opened 6 years ago

hackel commented 6 years ago

The helpers.php file in this package is being loaded before Laravel's. This is causing a conflict, e.g. with the "with" function. Laravel's version includes a second callback parameter. This one does not. I haven't checked the other functions to make sure they are identical, so there could be other issues.

I believe the design of this package is broken, if it depends on you keeping it in-sync with Laravel upstream manually. Remarkably, there doesn't appear to be a way to tell composer which autoload_files to load first. It's clearly not using the order of dependencies in my composer.json.

FYI—the function in question was changed 9 months ago: https://github.com/laravel/framework/pull/21445

Tarpsvo commented 5 years ago

Having the same conflict. Also when using with($value, callable $callback = null) function.