Creation of dynamic property `Laravel\Socialite\SocialiteManager::$app` is deprecated
flexchar opened this issue · comments
- Socialite Version: 5.6.0
- Laravel Version: 9.48.0
- PHP Version: 8.2.0
Description:
Going through the logs I've noticed a spam of deprecation warnings
local.WARNING: Creation of dynamic property Laravel\Socialite\SocialiteManager::$app is deprecated in /var/www/vendor/laravel/socialite/src/SocialiteManager.php on line 214
The PHP code surrounding the issue
/**
* Set the container instance used by the manager.
*
* @param \Illuminate\Contracts\Container\Container $container
* @return $this
*/
public function setContainer($container)
{
$this->app = $container;
$this->container = $container;
return $this;
}
It seems to me that the package misuses $container
and $app
interchangeably whilst referring to the same actual value. Purging/updating all references to $this->container
might be all that's missing. :-)
If you agree, @driesvints, I'd gladly submit a PR tomorrow (CET).
Steps To Reproduce:
laravel new app
composer require laravel/socialite
- Run the web server (I'm using octane)
Thanks for reporting! It's best that we add the property instead as some people might still rely on it. I've sent in a PR: #621