Skip to content

[13.x] Fix StartSession docblock#60375

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
oliverquynh:fix-docblock
Jun 4, 2026
Merged

[13.x] Fix StartSession docblock#60375
taylorotwell merged 1 commit into
laravel:13.xfrom
oliverquynh:fix-docblock

Conversation

@oliverquynh
Copy link
Copy Markdown
Contributor

Let's look at StartSession::cache method, its return docblock is invalid because \Illuminate\Cache\Store doesn't exist.

Actually, in runtime, call_user_func($this->cacheFactoryResolver) must return an instance of CacheManager, so the expected returned value must be an implementation of \Illuminate\Contracts\Cache\Repository interface.

/**
 * Resolve the given cache driver.
 *
 * @param  string  $driver
 * @return \Illuminate\Contracts\Cache\Repository
 */
protected function cache($driver)
{
    // call_user_func($this->cacheFactoryResolver) returns an instance of CacheManager
    // CacheManager::driver() returns an implementation of \Illuminate\Contracts\Cache\Repository interface
    return call_user_func($this->cacheFactoryResolver)->driver($driver);
}

@taylorotwell taylorotwell merged commit da9b7b7 into laravel:13.x Jun 4, 2026
54 checks passed
@oliverquynh oliverquynh deleted the fix-docblock branch June 4, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants