Skip to content

Conversation

@kamil-tekiela
Copy link

Description
Turning off autocommit and starting a transaction makes very little sense. Unless you expect users to issue manual commit statements, the begin transaction is sufficient. Comparing it to the other Connection classes, only the mysqli one does that, which can be considered a bug. If you would like to allow the user to issue manual commit statements then keep only autocommit and remove begin and commit. Additionally, these functions always return true (because of exception mode) and so the if statements and return statements are not meaningful.

Checklist:

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

@mergeable
Copy link

mergeable bot commented Jan 16, 2026

Hi there, kamil-tekiela! 👋

Thank you for sending this PR!

We expect the following in all Pull Requests (PRs).

Important

We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.

If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work
on the framework than you do. Please make it as painless for your contributions to be included as possible.

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

Sincerely, the mergeable bot 🤖

@ddevsr ddevsr added the refactor Pull requests that refactor code label Jan 16, 2026
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

I had to read up on it, and it looks like you're right. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants