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

Add support for CakePHP 5 #5

Merged
merged 14 commits into from
Oct 15, 2023
18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:

jobs:
testsuite:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['7.4', '8.0']
php-version: ['8.1']
name: PHP ${{ matrix.php-version }}

steps:
Expand All @@ -29,27 +29,23 @@ jobs:

- name: Composer install
run: |
if [[ ${{ matrix.php-version }} == '8.0' ]]; then
composer install --ignore-platform-reqs
else
composer install
fi

- name: Run PHPUnit
run: |
vendor/bin/phpunit

coding-standard:
name: Coding Standard
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.1'
extensions: mbstring
coverage: none

Expand All @@ -61,20 +57,20 @@ jobs:

static-analysis:
name: Static Analysis
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.1'
extensions: mbstring
coverage: none

- name: Composer install
run: composer require --dev phpstan/phpstan:^0.12
run: composer require --dev phpstan/phpstan:^1.9

- name: Run phpstan
run: vendor/bin/phpstan.phar analyse
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/composer.phar
/phpunit.xml
/.phpunit.result.cache
/.phpunit.cache
/phpunit.phar
/config/Migrations/schema-dump-default.lock
/vendor/
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Output methods:
* Log file
* Mail

Works with:
Type | Version
---- | ----
CakePHP | 4.2
PHP | 7.4
## Version map:
| Plugin | Branch | Cake | PHP |
|--------|--------|------|--------------|
| 2.x | main | 5.x | ^8.1 |
| 1.x | 1.x | 4.x | ^7.4 \| ^8.0 |

## Installation
`composer require avolle/cakephp-deadlinks`
Expand Down
17 changes: 12 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
}
],
"require": {
"php": ">=7.4",
"cakephp/cakephp": "^4.0",
"php": "^8.1",
"cakephp/cakephp": "^5.0.0",
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"cakephp/cakephp-codesniffer": "~4.1.0",
"phpstan/phpstan": "^0.12"
"phpunit/phpunit": "^10.0.0",
"cakephp/cakephp-codesniffer": "^5.0",
"phpstan/phpstan": "^1.9"
},
"autoload": {
"psr-4": {
Expand All @@ -40,5 +40,12 @@
"cs-fix": "phpcbf ./src ./tests",
"stan": "phpstan analyze",
"test": "phpunit --colors=always"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading
Loading