Skip to content

Fix #4627: Replace deprecated is_integer() calls with is_int() for PHP 8.6 #894

Fix #4627: Replace deprecated is_integer() calls with is_int() for PHP 8.6

Fix #4627: Replace deprecated is_integer() calls with is_int() for PHP 8.6 #894

Workflow file for this run

permissions:
contents: read
on:
- pull_request
- push
name: build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
env:
extensions: curl, cubrid, mbstring, memcached, dom, intl, json, libxml, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, xml, xmlwriter, mcrypt
key-php5: cache-v1
key-php7: cache-v2
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
php:
- "5.3"
- "5.4"
- "5.5"
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
services:
mysql:
image: mysql:5.7@sha256:4bc6bc963e6d8443453676cae56536f4b8156d78bae03c0145cbe47c2aad73bb
env:
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: yii
MYSQL_ROOT_PASSWORD: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:9.6@sha256:caddd35b05cdd56c614ab1f674e63be778e0abdf54e71a7507ff3e28d4902698
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: yii
ports:
- 5432:5432
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:8@sha256:2838d5524559494f6f1cd66e97e76b200d64a633a8614200620755ed395daf32
ports:
- 6379:6379
options:
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install service memcached
uses: niden/actions-memcached@9ff2b102979272958682d09bf262563039bea69c # v8
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup cache environment 5.3 - 5.6
if: matrix.php < '7.0'
id: cache-env-php5
uses: shivammathur/cache-extensions@9b476298b44f2e4d4268dd103ff4c3e216314e27 # v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions-php5 }}
key: ${{ env.key-php5 }}
- name: Setup cache environment 7.0 - 8.0
if: matrix.php >= '7.0'
id: cache-env-php7
uses: shivammathur/cache-extensions@9b476298b44f2e4d4268dd103ff4c3e216314e27 # v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions-php7 }}
key: ${{ env.key-php7 }}
- name: Cache extensions 5.3 - 5.6
if: matrix.php < '7.0'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ steps.cache-env-php5.outputs.dir }}
key: ${{ steps.cache-env-php5.outputs.key }}
restore-keys: ${{ steps.cache-env-php5.outputs.key }}
- name: Cache extensions 7.0 - 8.0
if: matrix.php >= '7.0'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ steps.cache-env-php7.outputs.dir }}
key: ${{ steps.cache-env-php7.outputs.key }}
restore-keys: ${{ steps.cache-env-php7.outputs.key }}
- name: Install PHP with extensions
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-file: development
ini-values: date.timezone='UTC'
coverage: xdebug
tools: composer:v2, pecl
- name: Determine composer cache directory on Linux
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
- name: Determine composer cache directory on Windows
if: matrix.os == 'windows-latest'
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache dependencies installed with composer
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
- name: Install dependencies with composer
run: COMPOSER_NO_SECURITY_BLOCKING=1 composer update --no-interaction --no-progress --optimize-autoloader --ansi
- name: Run tests with phpunit
run: |
cd tests
../vendor/bin/phpunit --verbose --colors=always --no-globals-backup --exclude-group mssql,oci,cubrid framework
env:
# The hostname used to communicate with the Redis service container
REDIS_HOST: localhost
# The default Redis port
REDIS_PORT: 6379