-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel 6 and Sentinel 3 Installation #520
Comments
@nejimz Does this happen only when you run the I don't have a Windows machine to test at the moment, but on Mac, kinda the same PHP version, i haven't detected any problem :, but seems that Laravel can't read or parse the Sentinel config file properly. |
@brunogaspar it happen when I run composer require. Thank you for response. Don't have any idea to fix this but currently I created another project that using laravel 5.8 and using sentinel 2 so that I can move on to my project. |
This is a cache + permissions issue, what I do was remove the sentinel package, then change the I hope can help |
@Salamand3r thank you for giving time on giving information. I'll give update once I try this steps but currently I'm using windows. Thank you, |
@meekahCodes I had the same error as you, I went into my .yaml file and specifiied php version 7.2 for my project and that fixed it for me. |
** PROBLEM NOT SOLVED *** I get this error in Laravel 7. Help please. Argument 1 passed to Cartalyst\Sentinel\Activations\IlluminateActivationRepository::__construct() must be of the type string, null given, called in /home/vagrant/ego/vendor/cartalyst/sentinel/src/Laravel/SentinelServiceProvider.php on line 243 |
Unfortunatly I don't have the time to rewrite the code and change this but here is a quick fix which worked for me: Open up SentinelServiceProvider.php Open up ServiceProvider.php (The class extended in SentinelServiceProvider) Change this:
To this:
Just run the command again and it should work now.
Don't forget to reset this code change afterwards! Basically you just remove the if statement temporary because that statement evaluates to false, which is why the config is never set. Hope it helps! |
Ok, so this issue will hunt you down at runtime too. So the only "quick" solution would be to remove that if statement. I might look into this further tonight EDIT: It's still a hack but I removed the if-statement temporary and executed After that, I undid the change and it worked. So what you could do is, before you install Sentinel, cache your configuration and install it afterwards. Let me know if it worked for you guys |
This problem also happened to me when installing on laravel 8, if it gives the composer dump-autoload issue when installing the sentienl, what i did that go to cartalyst/sentinel/src/Laravel/SentinelServiceProvider and apply the one conditions anywhere where the issue. Apply below steps
protected function setOverrides()
} |
Thank you so much , it's work for my when i change it like this ❤️ |
Hi Guys,
I'm kinda stuck installing Sentinel in my fresh Laravel 6 project. When I install this in my last Laravel 5.8 project and Sentinel 2 no problems encountered.
Your Environment
Expected behaviour
I follow the installation process in Cartalyst/Sentinel
Actual behaviour
When running composer require cartalyst/sentinel "^3.0" an error has occur.
[2019-12-03 09:42:44] local.ERROR: Argument 1 passed to Cartalyst\Sentinel\Activations\IlluminateActivationRepository::__construct() must be of the type string, null given, called in C:\laragon\www\pse\vendor\cartalyst\sentinel\src\Laravel\SentinelServiceProvider.php on line 243 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Argument 1 passed to Cartalyst\Sentinel\Activations\IlluminateActivationRepository::__construct() must be of the type string, null given, called in C:\laragon\www\pse\vendor\cartalyst\sentinel\src\Laravel\SentinelServiceProvider.php on line 243 at C:\laragon\www\pse\vendor\cartalyst\sentinel\src\Activations\IlluminateActivationRepository.php:54)
[stacktrace]
#0 C:\laragon\www\pse\vendor\cartalyst\sentinel\src\Laravel\SentinelServiceProvider.php(243): Cartalyst\Sentinel\Activations\IlluminateActivationRepository->__construct(NULL, NULL)
#1 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\Container.php(800): Cartalyst\Sentinel\Laravel\SentinelServiceProvider->Cartalyst\Sentinel\Laravel\{closure}(Object(Illuminate\Foundation\Application), Array)
#2 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\Container.php(682): Illuminate\Container\Container->build(Object(Closure))
#3 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\Container.php(630): Illuminate\Container\Container->resolve('sentinel.activa...', Array)
#4 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(768): Illuminate\Container\Container->make('sentinel.activa...', Array)
#5 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\Container.php(1246): Illuminate\Foundation\Application->make('sentinel.activa...')
#6 C:\laragon\www\pse\vendor\cartalyst\sentinel\src\Laravel\SentinelServiceProvider.php(394): Illuminate\Container\Container->offsetGet('sentinel.activa...')
#7 C:\laragon\www\pse\vendor\cartalyst\sentinel\src\Laravel\SentinelServiceProvider.php(48): Cartalyst\Sentinel\Laravel\SentinelServiceProvider->garbageCollect()
#8 [internal function]: Cartalyst\Sentinel\Laravel\SentinelServiceProvider->boot()
#9 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(32): call_user_func_array(Array, Array)
#10 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(90): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#11 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#12 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Container\Container.php(591): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#13 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(828): Illuminate\Container\Container->call(Array)
#14 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(811): Illuminate\Foundation\Application->bootProvider(Object(Cartalyst\Sentinel\Laravel\SentinelServiceProvider))
#15 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(Cartalyst\Sentinel\Laravel\SentinelServiceProvider), 14)
#16 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(812): array_walk(Array, Object(Closure))
#17 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\BootProviders.php(17): Illuminate\Foundation\Application->boot()
#18 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(211): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#19 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith(Array)
#20 C:\laragon\www\pse\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
#21 C:\laragon\www\pse\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 {main}
"}
Steps to reproduce
Running command composer require cartalyst/sentinel "^3.0"
Thank you in advance,
The text was updated successfully, but these errors were encountered: