Skip to content

Conversation

@LordSimal
Copy link
Contributor

No description provided.

@LordSimal LordSimal added this to the 5.x milestone Nov 17, 2024
public function shutdown(EventInterface $event): void
{
/** @var \Cake\Controller\Controller|null $controller */
$controller = $event->getSubject();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line either must return the controller object or throws an exception, if no subject is present. Therefore the whole nullable checks are not needed anymore.

$connection->configName() === 'debug_kit'
|| !$connection instanceof ConnectionInterface
) {
if ($connection->configName() === 'debug_kit') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. 4.x allowed the ConnectionManager to hold connection instances which did not implement ConnectionInterface, for e.g. https://github.com/UseMuffin/Webservice/blob/6376dc722529d888c4750793f0b286a8acd9fd71/src/Datasource/Connection.php#L19.

Guess we killed that in 5.0 by adding ConnnectionInterface as return type for ConnectionManager::get().

@markstory markstory merged commit bf377ad into 5.x Nov 18, 2024
7 of 9 checks passed
@markstory markstory deleted the 5.x-update-stan branch November 18, 2024 02:34
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.

4 participants