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.
- Loading branch information
1 parent
b1028ae
commit 3302d22
Showing
22 changed files
with
264 additions
and
2,460 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 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
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 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,40 +1,45 @@ | ||
{ | ||
"name": "tenantcloud/data-transfer-objects", | ||
"description": "PHP data transfer objects", | ||
"minimum-stability": "stable", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Team Tenantcloud", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.4 || ^8.0", | ||
"ext-json": "*", | ||
"illuminate/support": "^8.0 || ^9.0", | ||
"spatie/macroable": "1.0.1", | ||
"tenantcloud/php-standard": "1.2 || ^1.4 || ^2.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.0", | ||
"orchestra/testbench": "^6.0 || ^7.0", | ||
"friendsofphp/php-cs-fixer": "~2.18.2", | ||
"tenantcloud/php-cs-fixer-rule-sets": "~1.1.0" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "vendor/bin/phpunit", | ||
"cs-fix": "./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix -v --show-progress=estimating", | ||
"phpstan": "./tools/phpstan/vendor/bin/phpstan analyse" | ||
} | ||
"name": "tenantcloud/data-transfer-objects", | ||
"description": "PHP data transfer objects", | ||
"license": "MIT", | ||
"require": { | ||
"php": ">=8.1", | ||
"ext-json": "*", | ||
"illuminate/support": "^9.0|^10.0", | ||
"spatie/macroable": "1.0.1", | ||
"tenantcloud/php-standard": "1.2 || ^1.4 || ^2.0" | ||
}, | ||
"require-dev": { | ||
"pestphp/pest": "^1.0|^2.8", | ||
"orchestra/testbench": "^7.0|^8.5", | ||
"php-cs-fixer/shim": "~3.19.2", | ||
"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" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"TenantCloud\\DataTransferObjects\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests/" | ||
} | ||
}, | ||
"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" | ||
}, | ||
"minimum-stability": "stable", | ||
"prefer-stable": true, | ||
"config": { | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": 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
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,17 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" | ||
colors="true" | ||
> | ||
cacheDirectory=".phpunit.cache"> | ||
<testsuites> | ||
<testsuite name="Test Suite"> | ||
<directory suffix="Test.php">./tests</directory> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage processUncoveredFiles="true"> | ||
<coverage/> | ||
<source> | ||
<include> | ||
<directory suffix=".php">./src</directory> | ||
</include> | ||
</coverage> | ||
</source> | ||
</phpunit> |
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
File renamed without changes.
Oops, something went wrong.