Skip to content

Comments

chore: bump mssql image to 2025#9987

Open
paulbalandan wants to merge 2 commits intocodeigniter4:developfrom
paulbalandan:bump-mssql-image
Open

chore: bump mssql image to 2025#9987
paulbalandan wants to merge 2 commits intocodeigniter4:developfrom
paulbalandan:bump-mssql-image

Conversation

@paulbalandan
Copy link
Member

Description
This tries to fix #9980 by bumping mssql image to 2025 and using the latest ubuntu runner.

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

@paulbalandan paulbalandan force-pushed the bump-mssql-image branch 3 times, most recently from 85bec24 to f3f2aa0 Compare February 22, 2026 18:49
@paulbalandan
Copy link
Member Author

I am stumped at why SQLSRV fails for only PHP 8.2 to 8.4 but not 8.5.

@michalsn
Copy link
Member

PHP 8.5 is failing too. I guess we still allow it to fail without consequences.

Hmm... something had to change in connection state tracking in the new version of mssql.

Based on this: https://stackoverflow.com/questions/7469130/cannot-drop-database-because-it-is-currently-in-use

We can try adding this to SQLSR/Forge.php

public function dropDatabase(string $dbName): bool
{
    try {
        $this->db->query(sprintf(
            'ALTER DATABASE %s SET SINGLE_USER WITH ROLLBACK IMMEDIATE',
            $this->db->escapeIdentifier($dbName),
        ));
    } catch (DatabaseException) {}

    return parent::dropDatabase($dbName);
}

Co-authored-by: michalsn <michal@sniatala.pl>
@paulbalandan
Copy link
Member Author

Thanks. I saw that StackOverflow post earlier and did not realize that was the solution. 🤦‍♂️

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.

Bug: mssql docker pull fails every now and then

2 participants