-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from softonic/Allow-null-parameter-values-in-En…
…sureModelExists Allow null parameter values in EnsureModelExists
- Loading branch information
Showing
18 changed files
with
282 additions
and
255 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-php- | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.3' | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
env: | ||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | ||
|
||
- name: Run test suite | ||
run: composer run-script tests |
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,35 +1,36 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__ . '/src') | ||
->in(__DIR__ . '/tests'); | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/tests'); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'new_with_braces' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_comment' => true, | ||
'no_leading_import_slash' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_unused_imports' => true, | ||
'ordered_imports' => ['imports_order' => null, 'sort_algorithm' => 'alpha'], | ||
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], | ||
'phpdoc_align' => true, | ||
'phpdoc_no_empty_return' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_scalar' => true, | ||
'phpdoc_to_comment' => true, | ||
'psr_autoloading' => true, | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'single_blank_line_before_namespace' => true, | ||
'single_quote' => true, | ||
'space_after_semicolon' => true, | ||
'ternary_operator_spaces' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'trim_array_spaces' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'new_with_parentheses' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_comment' => true, | ||
'no_leading_import_slash' => true, | ||
'no_trailing_comma_in_singleline' => true, | ||
'no_unused_imports' => true, | ||
'ordered_imports' => ['imports_order' => null, 'sort_algorithm' => 'alpha'], | ||
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], | ||
'phpdoc_align' => true, | ||
'phpdoc_no_empty_return' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_scalar' => true, | ||
'phpdoc_to_comment' => true, | ||
'psr_autoloading' => true, | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'blank_lines_before_namespace' => true, | ||
'single_quote' => true, | ||
'space_after_semicolon' => true, | ||
'ternary_operator_spaces' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'trim_array_spaces' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
]) | ||
->setFinder($finder); | ||
->setFinder($finder); |
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,30 @@ | ||
language: php | ||
|
||
sudo: false | ||
|
||
matrix: | ||
include: | ||
- php: 8.3 | ||
env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true | ||
- php: master | ||
env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=false | ||
allow_failures: | ||
- php: master | ||
fast_finish: true | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- travis_retry composer self-update | ||
|
||
install: | ||
- travis_retry composer update --no-interaction --prefer-source | ||
|
||
script: | ||
- composer phpunit | ||
|
||
after_script: | ||
- if [ "$COLLECT_COVERAGE" == "true" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/clover.xml; fi | ||
- if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi |
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,7 +1,35 @@ | ||
version: '3.8' | ||
|
||
services: | ||
composer: | ||
php: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
|
||
install: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer install --ignore-platform-req=ext-sockets | ||
|
||
update: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer update --ignore-platform-req=ext-sockets | ||
|
||
phpunit: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer phpunit | ||
|
||
test: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer run tests | ||
|
||
fix-cs: | ||
volumes: | ||
- ./:/app | ||
image: softonic/composer-rector:latest | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer run fix-cs |
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,35 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
displayDetailsOnTestsThatTriggerDeprecations="true" | ||
displayDetailsOnTestsThatTriggerErrors="true" | ||
displayDetailsOnTestsThatTriggerNotices="true" | ||
displayDetailsOnTestsThatTriggerWarnings="true"> | ||
|
||
<testsuites> | ||
<testsuite name="softonic/rest-api-nested-resources"> | ||
<directory>tests</directory> | ||
<testsuite name="All"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
<report> | ||
<clover outputFile="./build/clover.xml"/> | ||
<html outputDirectory="./build/coverage"/> | ||
<text outputFile="./build/coverage.txt" /> | ||
</report> | ||
</coverage> | ||
|
||
<logging> | ||
<junit outputFile="./build/report.junit.xml"/> | ||
</logging> | ||
|
||
</phpunit> | ||
</phpunit> |
Oops, something went wrong.