Skip to content

Commit

Permalink
Bump requirements / deps
Browse files Browse the repository at this point in the history
Also replace psalm with phpstan
  • Loading branch information
christeredvartsen committed Feb 23, 2025
1 parent 6b1b8ca commit 853bc29
Show file tree
Hide file tree
Showing 10 changed files with 2,060 additions and 1,485 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: CI
on: push
jobs:
ci:
runs-on: ${{ matrix.operating-system }}
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: ['ubuntu-22.04']
php-versions: ['8.1', '8.2']
php: ["8.3"]

name: Run CI build

services:
postgresql:
image: postgres
Expand All @@ -18,20 +19,23 @@ jobs:
- 5555:5432

steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: php-cs-fixer
php-version: ${{ matrix.php }}
extensions: imagick

- name: PHP version info
run: |
php -v
php -i
php -m
- name: PHP version
run: php -v

- name: PHP info
run: php -i

- name: PHP modules
run: php -m

- name: Create tables
run: psql postgresql://imbo_test:[email protected]:5555/imbo_test -f ./setup/000-imbo.sql
Expand All @@ -45,12 +49,12 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Install dependencies
run: composer install
Expand All @@ -59,7 +63,7 @@ jobs:
run: vendor/bin/phpunit

- name: Run static code analysis
run: vendor/bin/psalm
run: vendor/bin/phpstan analyse

- name: Check coding standard
run: PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --dry-run --diff
run: PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --diff
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ vendor
phpunit.xml
.psalm
.phpunit.cache
.phpunit.result.cache
.php-cs-fixer.cache
.vscode
.tool-versions
setup.sh
19 changes: 12 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@
}
],
"require": {
"php": ">=8.1",
"php": ">=8.3",
"ext-pdo": "*",
"ext-pdo_pgsql": "*",
"imbo/imbo-pdo-adapters": "dev-main"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.70",
"imbo/imbo": "dev-main",
"imbo/imbo-adapters-sdk": "dev-main",
"imbo/imbo-coding-standard": "^2.0",
"phpunit/phpunit": "^10.0",
"psalm/plugin-phpunit": "^0.18.4",
"vimeo/psalm": "^5.5"
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^12.0"
},
"autoload": {
"psr-4": {
Expand All @@ -42,15 +44,18 @@
"scripts": {
"test": "vendor/bin/phpunit",
"test:coverage": "vendor/bin/phpunit --coverage-html build/coverage --coverage-text",
"sa": "vendor/bin/psalm",
"cs": "php-cs-fixer fix --dry-run --diff",
"sa": "vendor/bin/phpstan analyse",
"cs": "vendor/bin/php-cs-fixer fix --dry-run --diff",
"ci": [
"@sa",
"@test",
"@cs"
]
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
}
}
Loading

0 comments on commit 853bc29

Please sign in to comment.