Skip to content

Commit daf3c9c

Browse files
committed
debug
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
1 parent 1a96e52 commit daf3c9c

3 files changed

Lines changed: 3 additions & 109 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -9,114 +9,6 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
testsuite:
13-
runs-on: ubuntu-22.04
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
php-version: ['8.1', '8.4']
18-
db-type: [sqlite, mysql, pgsql]
19-
prefer-lowest: ['']
20-
include:
21-
- php-version: '8.2'
22-
db-type: mysql
23-
prefer-lowest: ''
24-
- php-version: '8.1'
25-
db-type: sqlite
26-
prefer-lowest: prefer-lowest
27-
28-
steps:
29-
- name: Setup MySQL latest
30-
if: matrix.db-type == 'mysql' && matrix.php-version == '8.4'
31-
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:8.4
32-
33-
- name: Setup MySQL 8.0
34-
if: matrix.db-type == 'mysql' && matrix.php-version == '8.2'
35-
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:8.0
36-
37-
- name: Setup MySQL 5.6
38-
if: matrix.db-type == 'mysql' && matrix.php-version == '8.1'
39-
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:5.6 --character-set-server=utf8
40-
41-
- name: Setup PostgreSQL latest
42-
if: matrix.db-type == 'pgsql' && matrix.php-version != '8.1'
43-
run: docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cakephp -p 5432:5432 -d postgres
44-
45-
- name: Setup PostgreSQL 9.4
46-
if: matrix.db-type == 'pgsql' && matrix.php-version == '8.1'
47-
run: docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cakephp -p 5432:5432 -d postgres:9.4
48-
49-
- uses: actions/checkout@v5
50-
51-
- name: Setup PHP
52-
uses: shivammathur/setup-php@v2
53-
with:
54-
php-version: ${{ matrix.php-version }}
55-
coverage: pcov
56-
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
57-
58-
- name: Get composer cache directory
59-
id: composer-cache
60-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
61-
62-
- name: Get date part for cache key
63-
id: key-date
64-
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
65-
66-
- name: Cache composer dependencies
67-
uses: actions/cache@v4
68-
with:
69-
path: ${{ steps.composer-cache.outputs.dir }}
70-
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}
71-
72-
- name: Composer install
73-
run: |
74-
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
75-
composer update --prefer-lowest --prefer-stable
76-
else
77-
composer install
78-
fi
79-
80-
- name: Setup problem matchers for PHPUnit
81-
if: matrix.php-version == '8.1' && matrix.db-type == 'mysql'
82-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
83-
84-
- name: Setup Database
85-
run: |
86-
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then
87-
n=0
88-
until [ "$n" -ge 5 ]
89-
do
90-
mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE phinx;' && break || :
91-
n=$((n+1))
92-
sleep 2
93-
done
94-
mysql -h 127.0.0.1 -u root -proot -D phinx -e 'SELECT 1'
95-
fi
96-
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then psql -c 'CREATE DATABASE phinx;' postgresql://postgres:postgres@127.0.0.1; fi
97-
98-
- name: Run PHPUnit
99-
run: |
100-
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export SQLITE_DSN='sqlite:///phinx'; fi
101-
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export MYSQL_DSN='mysql://root:root@127.0.0.1/phinx'; fi
102-
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export PGSQL_DSN='pgsql://postgres:postgres@127.0.0.1/phinx'; fi
103-
104-
if [[ ${{ matrix.prefer-lowest != 'prefer-lowest' }} ]]; then
105-
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=coverage.xml
106-
else
107-
vendor/bin/phpunit
108-
fi
109-
110-
- name: Prefer lowest check
111-
if: matrix.prefer-lowest == 'prefer-lowest'
112-
run: composer require --dev dereuromark/composer-prefer-lowest && vendor/bin/validate-prefer-lowest -m
113-
114-
- name: Submit code coverage
115-
if: ${{ matrix.prefer-lowest != 'prefer-lowest' }}
116-
uses: codecov/codecov-action@v5
117-
with:
118-
token: ${{ secrets.CODECOV_TOKEN }}
119-
12012
testsuite-windows:
12113
runs-on: windows-2022
12214
name: Windows - PHP 8.1 & SQL Server
@@ -180,7 +72,7 @@ jobs:
18072
SQLSRV_DSN: 'sqlsrv://(localdb)\MSSQLLocalDB/phinx'
18173
CODECOVERAGE: 1
18274
run: |
183-
vendor/bin/phpunit --coverage-clover=coverage.xml
75+
vendor/bin/phpunit --coverage-clover=coverage.xml --filter 'testChangeColumnDefaultStringBoolean'
18476
18577
- name: Submit code coverage
18678
uses: codecov/codecov-action@v5

src/Phinx/Db/Adapter/PdoAdapter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ abstract public function disconnect(): void;
200200
public function execute(string $sql, array $params = []): int
201201
{
202202
$sql = rtrim($sql, "; \t\n\r\0\x0B");
203+
var_dump($sql);
203204
$this->verboseLog($sql . ';');
204205

205206
if ($this->isDryRunEnabled()) {

tests/Phinx/Db/Adapter/SqlServerAdapterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ public function testChangeColumnDefaultStringBoolean(): void
687687
$table->addColumn('column1', 'boolean', ['default' => 'true'])
688688
->save();
689689
$columns = $this->adapter->getColumns('t');
690+
var_dump($columns);
690691
$this->assertSame(true, $columns['column1']->getDefault());
691692
$newColumn1 = new Column();
692693
$newColumn1

0 commit comments

Comments
 (0)