Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests for MySQL 8.4 #2281

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2']
php-version: ['8.1', '8.2', '8.3']
db-type: [sqlite, mysql, pgsql]
prefer-lowest: ['']
include:
Expand All @@ -27,8 +27,12 @@ jobs:

steps:
- name: Setup MySQL latest
if: matrix.db-type == 'mysql' && matrix.php-version != '8.1'
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:8.3
if: matrix.db-type == 'mysql' && matrix.php-version == '8.3'
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:8.4

- name: Setup MySQL 8.0
if: matrix.db-type == 'mysql' && matrix.php-version == '8.2'
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:8.0

- name: Setup MySQL 5.6
if: matrix.db-type == 'mysql' && matrix.php-version == '8.1'
Expand Down
4 changes: 2 additions & 2 deletions tests/Phinx/Db/Adapter/MysqlAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ public function testDropForeignKeyByNonExistentKeyColumns(array $columns)
$refTable = new Table('ref_table', [], $this->adapter);
$refTable
->addColumn('field1', 'string', ['limit' => 8])
->addIndex(['id', 'field1'])
->addIndex(['id', 'field1'], ['unique' => true])
->save();

$table = new Table('table', [], $this->adapter);
Expand Down Expand Up @@ -1897,7 +1897,7 @@ public function testDropForeignKeyAsString()
public function testHasForeignKey($tableDef, $key, $exp)
{
$conn = $this->adapter->getConnection();
$conn->exec('CREATE TABLE other(a int, b int, c int, key(a), key(b), key(a,b), key(a,b,c));');
$conn->exec('CREATE TABLE other(a int, b int, c int, unique key(a), unique key(b), unique key(a,b), unique key(a,b,c));');
$conn->exec($tableDef);
$this->assertSame($exp, $this->adapter->hasForeignKey('t', $key));
}
Expand Down
Loading