Skip to content

Conversation

@michalsn
Copy link
Member

Description
This PR fixes a bug where non-shared database instances were incorrectly stored in the shared instances cache, causing modifications to non-shared instances to affect subsequent shared connections.

Fixes #9678

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the bug Verified issues on the current code behavior or pull requests that will fix them label Aug 12, 2025
Copy link
Contributor

@neznaika0 neznaika0 left a comment

Choose a reason for hiding this comment

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

It's been wrong for so long...

Copy link
Member

@paulbalandan paulbalandan left a comment

Choose a reason for hiding this comment

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

I think this bug is one of the reasons why we cannot randomize the tests.

@michalsn michalsn merged commit 103f1a9 into codeigniter4:develop Aug 13, 2025
50 checks passed
@michalsn
Copy link
Member Author

Thank you @paulbalandan and @neznaika0

@michalsn michalsn deleted the fix/connection-share branch August 13, 2025 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Unshared DB instance affects subsequent shared DB instances

3 participants