Skip to content

Commit af946bb

Browse files
cnizzardiniMasaKniChris Nizzardini
authored
MixerAPI v2.0.0 - CakePHP 5 support (#141)
* cleaing up deprecations, wip * cakephp5 compatibility * Ci updates with plugin tests (#137) - Now runs each plugin individually to catch any issues in the plugins composer.json - Moves coverage report into its own jobs * Require php81 cakephp44 (#138) * Require PHP 8.1 and CakePHP 4.4 * Require php 8.1 and cakephp 4.4 (#139) * Upgrade to CakePHP 5 * Update github actions * Get mixerapi/jwt-auth passing * composer changes for jwt-auth * Various fixes to JsonLdView and Core plugins for cake 5 * cake 5 * tests * update depedencies * fix bake test * fix collection-view * fix crud * remove grump * update plugin composers to cake 5 stable packages * ignore phpunit cache * remove debug code * fix bad merge on collection-view * remove phpunit cache * update plugin composers to cake 5 stable packages * downgrade phpmd to php 8.1 compatibility * fix failing jsonld test * fix failing jsonld test * appease the static analyzers * bounds test for php versions * remove grump package for plugin composer deps * debugging pipeline * fix coverage reporting * only run php 8.1 action once but do so with coverage reporting * split out mixerapi/core to avoid circular dependency problem * remove lock * split out mixerapi/core to avoid circular dependency problem * split out mixerapi/core to avoid circular dependency problem * min stability dev to pull in mixerapi/core * fix depedencies * fix composer * replace dev core package with stable one * update to latest swagger bake with cakephp 5 support * Handle non-named arg deprecations in Crud plugin * phpcs * mark test incomplete due to issue in MixerApi/Core NamespaceUtility --------- Co-authored-by: Masa Koni <[email protected]> Co-authored-by: Chris Nizzardini <[email protected]>
1 parent 39576a8 commit af946bb

File tree

223 files changed

+1101
-16145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+1101
-16145
lines changed

.github/workflows/master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
php-versions: ['8.0']
12+
php-versions: ['8.1']
1313

1414
name: Upload coverage report
1515
steps:
@@ -38,5 +38,5 @@ jobs:
3838
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3939
run: |
4040
composer global require php-coveralls/php-coveralls
41-
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=clover.xml
41+
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=clover.xml
4242
php-coveralls --coverage_clover=clover.xml -v

.github/workflows/pull-request.yml

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ on:
55

66
jobs:
77
build:
8+
name: PHP ${{ matrix.php-versions }}
89
runs-on: ubuntu-latest
910
strategy:
1011
matrix:
11-
php-versions: ['8.0', '8.1', '8.2']
12-
13-
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
12+
php-versions: ['8.3']
1413
steps:
1514
- name: Checkout
1615
uses: actions/checkout@v2
@@ -21,7 +20,6 @@ jobs:
2120
php-version: ${{ matrix.php-versions }}
2221
extensions: mbstring, intl, sqlite3, xml, simplexml, mysqli
2322
tools: composer:v2
24-
coverage: xdebug
2523

2624
- name: Matrix PHP Version
2725
run: |
@@ -34,54 +32,86 @@ jobs:
3432
- name: Install
3533
run: |
3634
composer install --prefer-dist --no-interaction --no-progress
35+
composer update
3736
cp config/.env.example config/.env
3837
cp config/app_local.example.php config/app_local.php
3938
40-
- name: Test Suite + Static Analysis (PHP 8.0)
41-
if: ${{ matrix.php-versions == '8.0' }}
39+
- name: Test Suite + Static Analysis
40+
if: ${{ matrix.php-versions}}
4241
run: |
4342
composer analyze
4443
45-
- name: Upload coverage results to Coveralls (PHP 8.0)
46-
if: ${{ matrix.php-versions == '8.0' }}
44+
coverage:
45+
name: PHP ${{ matrix.php-versions }} w/ Coverage Report
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
php-versions: ['8.1']
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v2
53+
54+
- name: Setup PHP
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: ${{ matrix.php-versions }}
58+
extensions: mbstring, intl, sqlite3, xml, simplexml, mysqli
59+
tools: composer:v2
60+
coverage: xdebug
61+
62+
- name: Composer Check
63+
run: composer validate
64+
65+
- name: Install
66+
run: |
67+
composer install --prefer-dist --no-interaction --no-progress
68+
composer update
69+
cp config/.env.example config/.env
70+
cp config/app_local.example.php config/app_local.php
71+
72+
- name: Coverage Report
4773
env:
4874
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4975
run: |
5076
composer global require php-coveralls/php-coveralls
51-
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=clover.xml
77+
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=clover.xml
5278
php-coveralls --coverage_clover=clover.xml -v
5379
54-
- name: Test Suite (PHP 8.1)
55-
if: ${{ matrix.php-versions == '8.1' }}
56-
run: |
57-
composer test
58-
5980
#
60-
# CakePHP version compatability
81+
# Test plugins individually
6182
#
62-
compatibility:
83+
plugins:
84+
name: ${{ matrix.plugin }}
6385
runs-on: ubuntu-latest
6486
strategy:
87+
fail-fast: false
6588
matrix:
66-
version: ['~4.2.0', '~4.3.0', '^4.4']
89+
plugin: [
90+
'bake',
91+
'collection-view',
92+
'crud',
93+
'exception-render',
94+
'hal-view',
95+
'json-ld-view',
96+
'jwt-auth'
97+
]
6798
steps:
6899
- name: Checkout
69100
uses: actions/checkout@v2
70101

71102
- name: Setup PHP
72103
uses: shivammathur/setup-php@v2
73104
with:
74-
php-version: '8.0'
105+
php-version: '8.1'
75106
extensions: mbstring, intl, sqlite3, xml, simplexml, mysqli
76107

77108
- name: PHP Version
78109
run: php -v
79110

80-
- name: CakePHP ${{matrix.version}} Compatability
111+
- name: ${{matrix.plugin}} tests
81112
run: |
82113
cp config/.env.example config/.env
83-
composer self-update
114+
cp plugins/${{matrix.plugin}}/composer.json .
84115
rm -rf composer.lock
85-
composer require cakephp/cakephp:${{matrix.version}} --no-update
86-
composer install --prefer-dist --no-progress
87-
composer test
116+
composer install
117+
vendor/bin/phpunit plugins/${{matrix.plugin}}

.gitignore

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,21 @@ Thumbs.db
2525

2626
# Tool specific files #
2727
#######################
28-
# PHPUnit
2928
.phpunit.result.cache
30-
# vim
3129
*~
3230
*.swp
3331
*.swo
34-
# sublime text & textmate
3532
*.sublime-*
3633
*.stTheme.cache
3734
*.tmlanguage.cache
3835
*.tmPreferences.cache
39-
# Eclipse
4036
.settings/*
41-
# JetBrains, aka PHPStorm, IntelliJ IDEA
4237
.idea/*
43-
# NetBeans
4438
nbproject/*
45-
# Visual Studio Code
4639
.vscode
47-
# Sass preprocessor
4840
.sass-cache/
41+
.phpunit.cache/
42+
/composer.lock
4943

5044
# MIXERAPI #
5145
##########################

composer.json

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,35 @@
55
"type": "project",
66
"license": "MIT",
77
"require": {
8-
"php": "^8.0",
9-
"ext-json": "*",
8+
"php": "^8.1",
109
"ext-openssl": "*",
1110
"ext-simplexml": "*",
1211
"ext-xml": "*",
1312
"adbario/php-dot-notation": "^2.3",
14-
"cakephp/cakephp": "^4.2",
15-
"cakephp/migrations": "^3.0",
13+
"cakephp/cakephp": "^5.0",
14+
"cakephp/migrations": "^4.0",
1615
"cakephp/plugin-installer": "^1.3",
17-
"cnizzardini/cakephp-swagger-bake": "^2.1",
18-
"friendsofcake/search": "^6.0",
16+
"cnizzardini/cakephp-swagger-bake": "^3.0",
17+
"kcs/class-finder": "^0.3",
18+
"mixerapi/core": "^2.0",
1919
"mobiledetect/mobiledetectlib": "^2.8"
2020
},
2121
"require-dev": {
2222
"ext-mysqli": "*",
2323
"ext-sqlite3": "*",
24-
"cakephp/authentication": "2.9.*",
25-
"cakephp/bake": "^2.0.3",
24+
"cakephp/authentication": "^3.0",
25+
"cakephp/bake": "^3.0",
2626
"cakephp/cakephp-codesniffer": "^4.2",
27-
"cakephp/debug_kit": "^4.1",
28-
"dereuromark/cakephp-ide-helper": "^1.10",
29-
"firebase/php-jwt": "^5.5",
27+
"cakephp/debug_kit": "5.x-dev",
28+
"dereuromark/cakephp-ide-helper": "^2.0",
29+
"firebase/php-jwt": "^6.2",
30+
"friendsofcake/search": "^7.0",
3031
"josegonzalez/dotenv": "^3.2",
31-
"phpmd/phpmd": "^2.10",
32-
"phpro/grumphp": "^1.3",
33-
"phpstan/phpstan": "^0.12.64",
34-
"phpunit/phpunit": "^9.0",
32+
"phpmd/phpmd": "~2.10.0",
33+
"phpstan/phpstan": "^1.8.5",
34+
"phpunit/phpunit": "^10.0",
3535
"psy/psysh": "@stable"
3636
},
37-
"replace": {
38-
"mixerapi/core": "^1.0"
39-
},
4037
"suggest": {
4138
"markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
4239
"dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan/Psalm compatibility.",
@@ -48,13 +45,11 @@
4845
"MixerApi\\": "plugins/mixerapi/src/",
4946
"MixerApi\\Bake\\": "plugins/bake/src/",
5047
"MixerApi\\CollectionView\\": "plugins/collection-view/src/",
51-
"MixerApi\\Core\\": "plugins/core/src/",
5248
"MixerApi\\Crud\\": "plugins/crud/src/",
5349
"MixerApi\\ExceptionRender\\": "plugins/exception-render/src/",
5450
"MixerApi\\HalView\\": "plugins/hal-view/src/",
5551
"MixerApi\\JsonLdView\\": "plugins/json-ld-view/src/",
56-
"MixerApi\\JwtAuth\\": "plugins/jwt-auth/src/",
57-
"MixerApi\\Rest\\": "plugins/rest/src/"
52+
"MixerApi\\JwtAuth\\": "plugins/jwt-auth/src/"
5853
}
5954
},
6055
"autoload-dev": {
@@ -65,23 +60,18 @@
6560
"MixerApi\\Bake\\Test\\App\\": "plugins/bake/tests/test_app/src/",
6661
"MixerApi\\CollectionView\\Test\\": "plugins/collection-view/tests/",
6762
"MixerApi\\CollectionView\\Test\\App\\": "plugins/collection-view/tests/test_app/src/",
68-
"MixerApi\\Core\\Test\\": "plugins/core/tests/",
69-
"MixerApi\\Core\\Test\\App\\": "plugins/core/tests/test_app/src/",
7063
"MixerApi\\Crud\\Test\\": "plugins/crud/tests/",
7164
"MixerApi\\Crud\\Test\\App\\": "plugins/crud/tests/test_app/src/",
7265
"MixerApi\\ExceptionRender\\Test\\": "plugins/exception-render/tests/",
7366
"MixerApi\\ExceptionRender\\Test\\App\\": "plugins/exception-render/tests/test_app/src/",
7467
"MixerApi\\HalView\\Test\\": "plugins/hal-view/tests/",
7568
"MixerApi\\HalView\\Test\\App\\": "plugins/hal-view/tests/test_app/src/",
76-
"MixerApi\\JwtAuth\\Test\\": "plugins/jwt-auth/tests/",
77-
"MixerApi\\JwtAuth\\Test\\App\\": "plugins/jwt-auth/tests/test_app/src/",
7869
"MixerApi\\JsonLdView\\Test\\": "plugins/json-ld-view/tests/",
7970
"MixerApi\\JsonLdView\\Test\\App\\": "plugins/json-ld-view/tests/test_app/src/",
71+
"MixerApi\\JwtAuth\\Test\\": "plugins/jwt-auth/tests/",
72+
"MixerApi\\JwtAuth\\Test\\App\\": "plugins/jwt-auth/tests/test_app/src/",
8073
"MixerApi\\Test\\": "plugins/mixerapi/tests/",
81-
"MixerApi\\Test\\App\\": "plugins/mixerapi/tests/test_app/src/",
82-
"MixerApi\\Rest\\Test\\": "plugins/rest/tests/",
83-
"MixerApi\\Rest\\Test\\App\\": "plugins/rest/tests/test_app/src/",
84-
"MixerApi\\Rest\\Test\\MyPlugin\\": "plugins/rest/tests/plugins/MyPlugin/"
74+
"MixerApi\\Test\\App\\": "plugins/mixerapi/tests/test_app/src/"
8575
}
8676
},
8777
"scripts": {
@@ -123,17 +113,7 @@
123113
"sort-packages": true,
124114
"allow-plugins": {
125115
"dealerdirect/phpcodesniffer-composer-installer": true,
126-
"cakephp/plugin-installer": true,
127-
"phpro/grumphp": true
128-
}
129-
},
130-
"repositories": [
131-
{
132-
"type": "path",
133-
"url": "./plugins/core",
134-
"options": {
135-
"symlink": true
136-
}
116+
"cakephp/plugin-installer": true
137117
}
138-
]
118+
}
139119
}

0 commit comments

Comments
 (0)