generated from tenantcloud/php-package-skeleton
-
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.
* refactor: Merge upstream * refactor: Merge upstream * fix: Tests on Laravel 10
- Loading branch information
1 parent
20229b3
commit d768688
Showing
59 changed files
with
232 additions
and
2,354 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,14 @@ | ||
/.github export-ignore | ||
/art export-ignore | ||
/docs export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.php-cs-fixer.dist.php export-ignore | ||
/.releaserc.yml export-ignore | ||
/CONTRIBUTING.md export-ignore | ||
/phpstan.neon export-ignore | ||
/phpunit.xml export-ignore | ||
/README.md export-ignore | ||
/UPGRADING.md export-ignore |
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,34 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Tests"] | ||
types: | ||
- completed | ||
branches: | ||
- master | ||
- next | ||
- next-major | ||
- beta | ||
- alpha | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create a release | ||
uses: cycjimmy/semantic-release-action@v3 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/changelog | ||
@semantic-release/git | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
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,16 +1,18 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in('src') | ||
->in('tests') | ||
require __DIR__ . '/vendor/kubawerlos/php-cs-fixer-custom-fixers/bootstrap.php'; | ||
require __DIR__ . '/vendor/tenantcloud/php-cs-fixer-rule-sets/bootstrap.php'; | ||
|
||
use PhpCsFixer\Finder; | ||
use TenantCloud\PhpCsFixer\Config; | ||
|
||
$finder = Finder::create() | ||
->in(__DIR__) | ||
->exclude('build') | ||
->exclude('tmp') | ||
->exclude('vendor') | ||
->name('*.php') | ||
->notName('_*.php') | ||
->ignoreVCS(true); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setFinder($finder) | ||
->setRiskyAllowed(true) | ||
->setIndent("\t") | ||
->setRules([ | ||
'@TenantCloud' => true, | ||
]); | ||
return Config::make()->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,6 @@ | ||
plugins: | ||
- '@semantic-release/commit-analyzer' | ||
- '@semantic-release/release-notes-generator' | ||
- '@semantic-release/changelog' | ||
- '@semantic-release/git' | ||
- '@semantic-release/github' |
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,7 @@ | ||
# Commands | ||
|
||
Here are some of the commands that you'll need: | ||
- install dependencies: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer install` | ||
- run tests with phpunit: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer test` | ||
- reformat using php-cs-fixer: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer cs-fix` | ||
- analyse with phpstan: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer phpstan` |
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,60 +1,68 @@ | ||
{ | ||
"name": "tenantcloud/php-json-api", | ||
"description": "A template for composer packages", | ||
"minimum-stability": "dev", | ||
"license": "MIT", | ||
"require": { | ||
"php": ">=7.4 || ^8.0", | ||
"tenantcloud/php-standard": "^2.0", | ||
"illuminate/support": "^8.0 || ^9.0", | ||
"spatie/laravel-fractal": "^5.4 || ^6.0", | ||
"tenantcloud/data-transfer-objects": "^1.0", | ||
"tenantcloud/laravel-api-versioning": "v1.0.0-alpha.1" | ||
}, | ||
"require-dev": { | ||
"pestphp/pest": "^1.0", | ||
"phpunit/phpunit": "^9.5", | ||
"orchestra/testbench": "^6.22 || ^7.0", | ||
"php-cs-fixer/shim": "^3.6.0", | ||
"tenantcloud/php-cs-fixer-rule-sets": "~2.0.0" | ||
}, | ||
"conflict": { | ||
"league/fractal": "<0.20" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"": "src/" | ||
}, | ||
"files": [ | ||
"src/TenantCloud/JsonApi/functions.php" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests/" | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/tenantcloud/laravel-api-versioning" | ||
} | ||
], | ||
"scripts": { | ||
"test": "./vendor/bin/pest", | ||
"cs-fix": "./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix -v --show-progress=dots", | ||
"phpstan": "./tools/phpstan/vendor/bin/phpstan analyse" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"TenantCloud\\JsonApi\\JsonApiServiceProvider" | ||
] | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": true | ||
} | ||
} | ||
"name": "tenantcloud/php-json-api", | ||
"description": "A template for composer packages", | ||
"license": "MIT", | ||
"require": { | ||
"php": ">=8.1", | ||
"tenantcloud/php-standard": "^2.0", | ||
"illuminate/support": "^9.0 || ^10.0", | ||
"spatie/laravel-fractal": "^5.4 || ^6.0", | ||
"tenantcloud/data-transfer-objects": "^1.0", | ||
"tenantcloud/laravel-api-versioning": "v1.0.0-alpha.1 || v1.0.0-alpha.2", | ||
"illuminate/contracts": "^9.0|^10.0" | ||
}, | ||
"require-dev": { | ||
"pestphp/pest": "^1.0|^2.8", | ||
"orchestra/testbench": "^7.0|^8.5", | ||
"php-cs-fixer/shim": "3.19.1", | ||
"tenantcloud/php-cs-fixer-rule-sets": "~3.0.0", | ||
"phpstan/phpstan": "~1.10.21", | ||
"phpstan/phpstan-phpunit": "^1.3", | ||
"phpstan/phpstan-webmozart-assert": "^1.2", | ||
"phpstan/phpstan-mockery": "^1.1", | ||
"nunomaduro/larastan": "^2.6" | ||
}, | ||
"conflict": { | ||
"league/fractal": "<0.20" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"TenantCloud\\JsonApi\\": "src/" | ||
}, | ||
"files": [ | ||
"src/functions.php" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests/" | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/tenantcloud/laravel-api-versioning" | ||
} | ||
], | ||
"scripts": { | ||
"test": "vendor/bin/pest", | ||
"coverage": "XDEBUG_MODE=coverage vendor/bin/pest --coverage-html coverage", | ||
"cs-fix": "vendor/bin/php-cs-fixer fix -v --show-progress=dots", | ||
"phpstan": "vendor/bin/phpstan analyse --memory-limit=2G", | ||
"testbench": "vendor/bin/testbench" | ||
}, | ||
"minimum-stability": "alpha", | ||
"prefer-stable": true, | ||
"config": { | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": true | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"TenantCloud\\JsonApi\\JsonApiServiceProvider" | ||
] | ||
} | ||
} | ||
} |
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.