-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
1,394 additions
and
1,217 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
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,52 @@ | ||
name: static analysis | ||
|
||
on: | ||
pull_request: | ||
push: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
mutation: | ||
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
php: | ||
- "8.0" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php }}" | ||
tools: composer:v2, cs2pr | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Static analysis | ||
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize |
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
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,25 +1,37 @@ | ||
{ | ||
"name": "cycle/schema-renderer", | ||
"type": "library", | ||
"license": "MIT", | ||
"description": "Utils for Cycle Schema rendering", | ||
"require": { | ||
"php": ">=7.4", | ||
"cycle/orm": "^1.5|2.0.x-dev" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.5", | ||
"spiral/code-style": "^1.0", | ||
"vimeo/psalm": "^4.9" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Cycle\\Schema\\Renderer\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Cycle\\Schema\\Renderer\\Tests\\": "tests/Schema/Renderer/" | ||
} | ||
} | ||
"name": "cycle/schema-renderer", | ||
"type": "library", | ||
"license": "MIT", | ||
"description": "Utils for Cycle ORM Schema rendering", | ||
"require": { | ||
"php": ">=7.4", | ||
"cycle/orm": "1.2 - 2" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.5", | ||
"spiral/code-style": "^1.0", | ||
"vimeo/psalm": "^4.10" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Cycle\\Schema\\Renderer\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Cycle\\Schema\\Renderer\\Tests\\": "tests/Schema/Renderer/" | ||
} | ||
}, | ||
"scripts": { | ||
"test": [ | ||
"phpcs --standard=phpcs.xml", | ||
"psalm --no-cache", | ||
"phpunit" | ||
] | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": 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,45 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Spiral Framework Code Style Ruleset"> | ||
<!-- config --> | ||
<rule ref="vendor/spiral/code-style/config/ruleset.xml" /> | ||
|
||
<rule ref="Generic.PHP.ForbiddenFunctions"> | ||
<properties> | ||
<property name="forbiddenFunctions" type="array" extend="true"> | ||
<!-- deprecated/aliased functions --> | ||
<element key="join" value="implode" /> | ||
<element key="chop" value="rtrim" /> | ||
<element key="strchr" value="strstr" /> | ||
<element key="show_source" value="highlight_file" /> | ||
<element key="ini_alter" value="ini_set" /> | ||
<element key="dns_check_record" value="checkdnsrr" /> | ||
<element key="dns_get_mx" value="getmxrr" /> | ||
<element key="doubleval" value="floatval" /> | ||
<element key="is_long" value="is_int" /> | ||
<element key="is_integer" value="is_int" /> | ||
<element key="is_double" value="is_float" /> | ||
<element key="is_real" value="is_float" /> | ||
<element key="fputs" value="fwrite" /> | ||
<element key="set_file_buffer" value="stream_set_write_buffer" /> | ||
<element key="set_socket_blocking" value="stream_set_blocking" /> | ||
<element key="socket_set_blocking" value="stream_set_blocking" /> | ||
<element key="stream_register_wrapper" value="stream_wrapper_register" /> | ||
<element key="socket_set_timeout" value="stream_set_timeout" /> | ||
<element key="socket_get_status" value="stream_get_meta_data" /> | ||
<element key="is_writeable" value="is_writable" /> | ||
<element key="pos" value="current" /> | ||
<element key="sizeof" value="count" /> | ||
|
||
<!-- deprecated/aliased operators --> | ||
<element key="delete" value="unset" /> | ||
<element key="print" value="echo" /> | ||
<element key="create_function" value="null" /> | ||
</property> | ||
</properties> | ||
</rule> | ||
|
||
<arg name="colors"/> | ||
|
||
<!-- includes --> | ||
<file>./src</file> | ||
</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
Oops, something went wrong.