Skip to content

Commit

Permalink
Merge pull request #69: Call the method only if there are additional …
Browse files Browse the repository at this point in the history
…options
  • Loading branch information
roxblnfk authored Dec 22, 2023
2 parents 7f2f426 + 6c0f4fb commit 6cbdc76
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 16 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci-mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
- php: '8.1'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2019-latest'
- php: '8.2'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2019-latest'
- php: '8.3'
extensions: pdo, pdo_sqlsrv
mssql: 'server:2019-latest'

services:
mssql:
Expand Down Expand Up @@ -69,11 +75,11 @@ jobs:
run: composer self-update

- name: Install dependencies with composer
if: matrix.php != '8.2'
if: matrix.php != '8.3'
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Install dependencies with composer php 8.2
if: matrix.php == '8.2'
- name: Install dependencies with composer php 8.3
if: matrix.php == '8.3'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run tests with phpunit without coverage
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

mysql-version:
- "5.7"
Expand Down Expand Up @@ -82,11 +84,11 @@ jobs:
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: Install dependencies with composer
if: matrix.php-version != '8.2'
if: matrix.php-version != '8.3'
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Install dependencies with composer php 8.2
if: matrix.php-version == '8.2'
- name: Install dependencies with composer php 8.3
if: matrix.php-version == '8.3'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run mysql tests with phpunit
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ci-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

pgsql-version:
- "10"
Expand Down Expand Up @@ -83,11 +85,11 @@ jobs:
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: Install dependencies with composer
if: matrix.php-version != '8.2'
if: matrix.php-version != '8.3'
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Install dependencies with composer php 8.2
if: matrix.php-version == '8.2'
- name: Install dependencies with composer php 8.3
if: matrix.php-version == '8.3'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run pgsql tests with phpunit
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1']
php-versions: ['8.0', '8.1', '8.2', '8.3']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -40,10 +40,10 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies with composer
if: matrix.php-versions != '8.2'
if: matrix.php-versions != '8.3'
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Install dependencies with composer php 8.2
if: matrix.php-versions == '8.2'
- name: Install dependencies with composer php 8.3
if: matrix.php-versions == '8.3'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Execute Tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.2']
['8.3']
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"require": {
"php": ">=8.0",
"cycle/orm": "^2.0",
"cycle/database": "^2.5",
"cycle/database": "^2.7.1",
"yiisoft/friendly-exception": "^1.1"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Table/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function render(AbstractColumn $column): void

try {
// bypassing call to AbstractColumn->type method (or specialized column method)
if (\method_exists($column, $this->type)) {
if (\method_exists($column, $this->type) && $this->typeOptions !== []) {
call_user_func_array([$column, $this->type], $this->typeOptions);
} else {
call_user_func_array([$column, 'type'], \array_merge([$this->type], $this->typeOptions));
Expand Down

0 comments on commit 6cbdc76

Please sign in to comment.