-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Closed
Copy link
Labels
Description
- Laravel Version: 5.8.13
- PHP Version: 7.2.15
- Database Driver & Version: none
Description:
You can't run composer update
and call artisan
commands if add Schema::defaultStringLength
calling to AppServiceProvider
and you have doctrine/dbal
package.
On running composer require doctrine/dbal
:
In PDOConnection.php line 31:
SQLSTATE[HY000] [2002] Connection refused
In PDOConnection.php line 27:
SQLSTATE[HY000] [2002] Connection refused
On 5.8.12 works fine.
Steps To Reproduce:
- Create new project:
composer create-project --prefer-dist laravel/laravel blog
- Fix
1071 Specified key was too long
error:
Using official documentation: https://laravel.com/docs/5.8/migrations#indexes
Add Schema::defaultStringLength
calling to AppServiceProvider
use Illuminate\Support\Facades\Schema;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
- Try to install
doctrine/dbal
package:
composer require doctrine/dbal
You will get error:
In PDOConnection.php line 31:
SQLSTATE[HY000] [2002] Connection refused
In PDOConnection.php line 27:
SQLSTATE[HY000] [2002] Connection refused
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
JexPY and shqear-mawdoo3