In Illuminate\Support\ServiceProvider the method mergeConfigFrom() simply requires the given $path. I think the framework should check before if the given path exists and is a valid file.
On one of my servers the PHP function realpath is not working as expected and therefore returns false instead of a valid path. I used the package https://github.com/HTMLMin/Laravel-HTMLMin there, and this package uses realpath() in its ServiceProvider.
This results in a FatalErrorException:
Obviously it is the responsibility of the package to provide a real path, but i think it may be a good idea to validate the $path in mergeConfigFrom before requiring it.
Description:
In
Illuminate\Support\ServiceProvider the method mergeConfigFrom()
simply requires the given$path
. I think the framework should check before if the given path exists and is a valid file.On one of my servers the PHP function
realpath
is not working as expected and therefore returns false instead of a valid path. I used the package https://github.com/HTMLMin/Laravel-HTMLMin there, and this package uses realpath() in its ServiceProvider. This results in aFatalErrorException
:Obviously it is the responsibility of the package to provide a real path, but i think it may be a good idea to validate the
$path
inmergeConfigFrom
before requiring it.