This is a duplicate of my pull at https://github.com/laravel/framework/pull/4311.