codestudiohq / laravel-totem

Manage Your Laravel Schedule From A Web Dashboard
MIT License
1.8k stars 224 forks source link

Typo in service provider #133

Closed Insolita closed 5 years ago

Insolita commented 5 years ago

https://github.com/codestudiohq/laravel-totem/blob/cd6a3db56c4ba9a4d37455090c969045e71ce7e4/src/Providers/TotemServiceProvider.php#L67

seems it should be

define(
  'TOTEM_DATABASE_CONNECTION', 
   config('totem.database_connection') ?? Schema::getConnection()->getName()
);

because third parameter of define function must be boolean, and it deprecated in latest php versions, that raise exception

roshangautam commented 5 years ago

What version of PHP are you using?

Insolita commented 5 years ago

7.3

roshangautam commented 5 years ago

Thanks. Does Laravel officially support 7.3 already?

Insolita commented 5 years ago

But real reason not in my php version, see define function signature http://php.net/manual/ru/function.define.php you doesn't have errors because third param was recognized as boolean true

Insolita commented 5 years ago

I`m only in local enviroment use it with 7.3 as a fact it has some problem with opcache, i disable it https://github.com/laravel/framework/issues/27052

fititnt commented 5 years ago

@Insolita try PHP 7.3.1 stable. xdebug and opcache should be working on.

vesper8 commented 5 years ago

Also having this issue since upgrading to PHP 7.3

Laravel Valet now defaults to PHP 7.3

In any case, this is clearly a typo. You meant to set the default connection name if one is not provided, define() method does not accept a 3rd parameter for this purpose.

https://secure.php.net/manual/en/function.define.php