-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from cnizzardini/cakephp-5
Cakephp 5 support
- Loading branch information
Showing
25 changed files
with
573 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Attachments** | ||
If applicable, add screenshots or swagger.json | ||
|
||
**Version and Platform (please complete the following information):** | ||
- OS/Platform: [e.g. Linux] | ||
- CakePHP: [e.g. 4.0.4] | ||
- SwaggerBake Version: | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Merge Master | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: ['8.1'] | ||
|
||
name: Upload coverage report | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, intl, xdebug | ||
tools: composer:v2 | ||
coverage: xdebug | ||
|
||
- name: Composer Check | ||
run: composer validate | ||
|
||
- name: Install | ||
run: | | ||
composer install --prefer-dist --no-interaction --no-progress | ||
cp config/.env.example config/.env | ||
cp config/app_local.example.php config/app_local.php | ||
- name: Coverage Report | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer global require php-coveralls/php-coveralls | ||
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=clover.xml | ||
php-coveralls --coverage_clover=clover.xml -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
analyze: | ||
name: PHP 8.1 Test / Analysis / Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
extensions: mbstring, intl, xdebug, sqlite3 | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: Install dependencies | ||
if: steps.composer-cache.outputs.cache-hit != 'true' | ||
run: | | ||
composer self-update | ||
composer validate | ||
composer install --prefer-dist --no-progress | ||
- name: Static Analysis | ||
run: composer analyze | ||
- name: Coverage Report | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer global require php-coveralls/php-coveralls | ||
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=clover.xml | ||
php-coveralls --coverage_clover=clover.xml -v | ||
test: | ||
name: PHP 8.3 Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.3' | ||
extensions: mbstring, intl, xdebug, sqlite3 | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: Install dependencies | ||
if: steps.composer-cache.outputs.cache-hit != 'true' | ||
run: | | ||
composer self-update | ||
composer validate | ||
composer install --prefer-dist --no-progress | ||
- name: Test Suite | ||
run: | | ||
composer test | ||
# | ||
# CakePHP version compatability | ||
# | ||
cakephp_version_compatibility: | ||
name: CakePHP ${{ matrix.version }} Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
version: ['~5.0'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
extensions: mbstring, intl, sqlite3 | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: CakePHP ${{matrix.version}} Compatability | ||
run: | | ||
composer self-update | ||
rm -rf composer.lock | ||
composer require cakephp/cakephp:${{matrix.version}} --no-update | ||
composer install --prefer-dist --no-progress | ||
composer test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,57 @@ | ||
{ | ||
"name": "mixerapi/core", | ||
"description": "MixerAPI Core libraries", | ||
"type": "library", | ||
"type": "cakephp-plugin", | ||
"license": "MIT", | ||
"keywords": ["mixerapi","cakephp"], | ||
"require": { | ||
"php": "^8.0", | ||
"cakephp/cakephp": "^4.2", | ||
"thecodingmachine/class-explorer": "^1.1" | ||
"php": "^8.1", | ||
"cakephp/cakephp": "^5.0", | ||
"kcs/class-finder": "^0.3" | ||
}, | ||
"require-dev": { | ||
"cakephp/cakephp-codesniffer": "^5.0", | ||
"phpmd/phpmd": "^2.10", | ||
"phpstan/phpstan": "^1.8.5", | ||
"phpunit/phpunit": "^10" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"MixerApi\\Core\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"MixerApi\\Core\\Test\\": "tests/", | ||
"MixerApi\\Core\\Test\\App\\": "tests/test_app/src/" | ||
} | ||
}, | ||
"support": { | ||
"issues": "https://github.com/mixerapi/mixerapi-dev/issues", | ||
"issues": "https://github.com/mixerapi/core/issues", | ||
"source": "https://github.com/mixerapi/core" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "MixerApi", | ||
"role": "Organization" | ||
} | ||
] | ||
], | ||
"scripts": { | ||
"analyze": [ | ||
"@phpcs", | ||
"@phpstan", | ||
"@phpmd" | ||
], | ||
"phpcs": "phpcs --colors -p --standard=phpcs.xml src/", | ||
"phpcbf": "phpcbf --colors --standard=phpcs.xml src/", | ||
"phpstan": "phpstan analyse src/", | ||
"test": "phpunit --colors=always", | ||
"phpmd": "phpmd src/ ansi phpmd.xml", | ||
"coverage": "phpunit --coverage-html coverage-reports/" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="App"> | ||
<config name="installed_paths" value="../../cakephp/cakephp-codesniffer" /> | ||
<rule ref="CakePHP"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
|
||
<description>SwaggerBake Ruleset</description> | ||
<!-- Warnings may be suppressed using the @SuppressWarning(PHPMD) annotation --> | ||
<!-- Rues are imported individually to allow for easy configuration --> | ||
<!-- Property names and values can be found here: http://phpmd.org/rules/index.html --> | ||
|
||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"> | ||
<properties> | ||
<property name="ignore-whitespace" value="true" /> | ||
<property name="minimum" value="100" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="rulesets/controversial.xml/Superglobals" /> | ||
|
||
<rule ref="rulesets/design.xml/CouplingBetweenObjects"> | ||
<properties> | ||
<property name="maximum" value="25" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/design.xml/DepthOfInheritance" /> | ||
<rule ref="rulesets/design.xml/EvalExpression" /> | ||
<rule ref="rulesets/design.xml/ExitExpression" /> | ||
<rule ref="rulesets/design.xml/GotoStatement" /> | ||
<rule ref="rulesets/design.xml/NumberOfChildren" /> | ||
|
||
<rule ref="rulesets/naming.xml/BooleanGetMethodName"> | ||
<properties> | ||
<property name="checkParameterizedMethods" value="true" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/naming.xml/ConstantNamingConventions" /> | ||
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass" /> | ||
<rule ref="rulesets/naming.xml/LongVariable"> | ||
<properties> | ||
<property name="maximum" value="64" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/naming.xml/ShortMethodName" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseParameterName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseMethodName" /> | ||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"> | ||
<properties> | ||
<property name="reportLevel" value="12" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity" /> <!-- phpmd default is max: 50 --> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"> | ||
<properties> | ||
<property name="minimum" value="500" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/TooManyMethods" /> | ||
<rule ref="rulesets/codesize.xml/NPathComplexity" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseClassName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCasePropertyName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseVariableName" /> | ||
|
||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList" /> | ||
<rule ref="rulesets/codesize.xml/ExcessivePublicCount" /> | ||
<rule ref="rulesets/codesize.xml/TooManyFields" /> | ||
|
||
<!-- | ||
Removed for CakePHPs sake: | ||
--> | ||
<!-- Causes issues where arguments must be accepted, such as in Command classes --> | ||
<!--<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter" />--> | ||
<!-- Causes issues where arguments must be accepted, such as in Command classes --> | ||
<!--<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable" />--> | ||
|
||
<!-- | ||
Suppressed: | ||
--> | ||
<!-- <rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" /> --> | ||
<!-- <rule ref="rulesets/cleancode.xml/ElseExpression" /> --> | ||
<!-- | ||
<rule ref="rulesets/naming.xml/ShortVariable" > | ||
<properties> | ||
<property name="minimum" value="2" /> | ||
<property name="exceptions" value="e" /> | ||
</properties> | ||
</rule> | ||
--> | ||
<!-- <rule ref="rulesets/cleancode.xml/StaticAccess" /> --> | ||
<!-- <rule ref="rulesets/codesize.xml/TooManyFields" /> --> | ||
|
||
</ruleset> |
Oops, something went wrong.