-
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
0 parents
commit f05be6c
Showing
22 changed files
with
1,823 additions
and
0 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,28 @@ | ||
{ | ||
"name": "syntatis/php-utils", | ||
"image": "ghcr.io/syntatis/php:7.4-fpm", | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"php.validate.executablePath": "/usr/local/bin/php", | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/bin/bash", | ||
"args": [ | ||
"-l" | ||
] | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "bash" | ||
}, | ||
"extensions": [ | ||
"bmewburn.vscode-intelephense-client", | ||
"christian-kohler.path-intellisense", | ||
"editorConfig.editorConfig", | ||
"neilbrayfield.php-docblocker", | ||
"SanderRonde.phpstan-vscode", | ||
"wongjn.php-sniffer" | ||
] | ||
} | ||
} | ||
} |
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,17 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{json,neon,neon.dist,yml,md}] | ||
indent_size = 2 | ||
|
||
[*.{yml,md,neon,neon.dist}] | ||
indent_style = space |
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,11 @@ | ||
/.devcontainer export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.github export-ignore | ||
/.gitignore export-ignore | ||
/.vscode export-ignore | ||
/docs export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpcs.xml.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests 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,24 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "composer" | ||
versioning-strategy: increase | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "sunday" | ||
groups: | ||
composer-require: | ||
dependency-type: "production" | ||
update-types: | ||
- "minor" | ||
- "patch" | ||
composer-require-dev: | ||
dependency-type: "development" | ||
update-types: | ||
- "minor" | ||
- "patch" |
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,84 @@ | ||
name: php | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/php.yml" | ||
- "**.php" | ||
- "composer.json" | ||
- "composer.lock" | ||
- "phpcs.xml.dist" | ||
- "phpstan.neon.dist" | ||
- "phpunit.xml.dist" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/php.yml" | ||
- "**.php" | ||
- "composer.json" | ||
- "composer.lock" | ||
- "phpcs.xml.dist" | ||
- "phpstan.neon.dist" | ||
- "phpunit.xml.dist" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-ansi --no-interaction --no-progress | ||
|
||
- name: Run linter | ||
run: composer phpcs | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
version: [7.4, 8.0, 8.1, 8.2] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Setup Composer cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: composer-${{ matrix.version }}-${{ hashFiles('**/composer.json') }} | ||
restore-keys: php-${{ matrix.version }}-composer- | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.version }} | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-dist --no-ansi --no-interaction --no-progress | ||
|
||
- name: Run test | ||
run: | | ||
composer phpstan | ||
vendor/bin/phpunit --testdox --coverage-clover coverage.xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#OS | ||
.DS_* | ||
|
||
# Composer | ||
/vendor | ||
composer.lock | ||
auth.json | ||
|
||
# Log, cache, and tmp files | ||
*.cache | ||
*.log | ||
*.meta | ||
tmp/ | ||
|
||
# Dotenv | ||
.env.* | ||
!.env | ||
|
||
# Tests # | ||
############# | ||
artifacts/ | ||
phpunit.xml | ||
phpstan.neon | ||
phpcs.xml | ||
|
||
# Docker | ||
docker-composer.override.yml |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"bmewburn.vscode-intelephense-client", | ||
"christian-kohler.path-intellisense", | ||
"editorconfig.editorconfig", | ||
"kasik96.latte", | ||
"mikestead.dotenv", | ||
"ms-vscode-remote.remote-containers", | ||
"neilbrayfield.php-docblocker", | ||
"sanderronde.phpstan-vscode", | ||
"wmaurer.change-case", | ||
"dotjoshjohnson.xml" | ||
] | ||
} |
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,103 @@ | ||
{ | ||
"intelephense.stubs": [ | ||
"apache", | ||
"bcmath", | ||
"bz2", | ||
"calendar", | ||
"com_dotnet", | ||
"Core", | ||
"ctype", | ||
"curl", | ||
"date", | ||
"dba", | ||
"dom", | ||
"enchant", | ||
"exif", | ||
"FFI", | ||
"fileinfo", | ||
"filter", | ||
"fpm", | ||
"ftp", | ||
"gd", | ||
"gettext", | ||
"gmp", | ||
"hash", | ||
"iconv", | ||
"imap", | ||
"intl", | ||
"json", | ||
"ldap", | ||
"libxml", | ||
"mbstring", | ||
"meta", | ||
"mysqli", | ||
"oci8", | ||
"odbc", | ||
"openssl", | ||
"pcntl", | ||
"pcre", | ||
"pdo_ibm", | ||
"pdo_mysql", | ||
"pdo_pgsql", | ||
"pdo_sqlite", | ||
"PDO", | ||
"pgsql", | ||
"Phar", | ||
"posix", | ||
"pspell", | ||
"readline", | ||
"redis", | ||
"Reflection", | ||
"session", | ||
"shmop", | ||
"SimpleXML", | ||
"snmp", | ||
"soap", | ||
"sockets", | ||
"sodium", | ||
"SPL", | ||
"sqlite3", | ||
"standard", | ||
"superglobals", | ||
"sysvmsg", | ||
"sysvsem", | ||
"sysvshm", | ||
"tidy", | ||
"tokenizer", | ||
"wordpress", | ||
"xml", | ||
"xmlreader", | ||
"xmlrpc", | ||
"xmlwriter", | ||
"xsl", | ||
"Zend OPcache", | ||
"zip", | ||
"zlib" | ||
], | ||
"[json]": { | ||
"editor.defaultFormatter": "vscode.json-language-features" | ||
}, | ||
"[php]": { | ||
"editor.defaultFormatter": "wongjn.php-sniffer" | ||
}, | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true | ||
}, | ||
"search.exclude": { | ||
"**/dist": true | ||
}, | ||
"intelephense.files.exclude": [ | ||
"**/.git/**", | ||
"**/.svn/**", | ||
"**/.hg/**", | ||
"**/.DS_Store/**", | ||
"**/.history/**", | ||
"**/CVS/**" | ||
], | ||
"phpSniffer.autoDetect": true, | ||
"phpSniffer.run": "onSave" | ||
} |
Oops, something went wrong.