Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
euneuber committed Dec 9, 2024
0 parents commit 29dd64e
Show file tree
Hide file tree
Showing 19 changed files with 11,641 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test

on:
pull_request:
push:
workflow_dispatch:

env:
COMPOSER_CACHE_DIR: /tmp/_composer_cache

jobs:
unit-tests:
name: Tests for php${{ matrix.php-versions }} ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
composer-command: ['install']
include:
- php-versions: '8.1'
composer-command: 'update --prefer-lowest --prefer-dist --prefer-stable --no-interaction'
name: prefer-lowest
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip,gmp
coverage: xdebug
ini-file: development
- name: Checkout code
uses: actions/checkout@v4
- name: Cache composer cache directory
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: composer-cache
- name: Unit tests
run: |
composer ${{ matrix.composer-command }}
composer test
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip,gmp
coverage: xdebug
ini-file: development
- name: Checkout code
uses: actions/checkout@v4
- name: Cache composer cache directory
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: composer-cache
- name: Unit tests
run: |
composer install
result=0
composer run cs || result=1
composer run phpstan || result=1
exit $result
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/vendor
/var
/.php_cs
/.idea
/*.cache
/_coverage
31 changes: 31 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;

$config = new PhpCsFixer\Config();
$config->setRules([
'@Symfony' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@PHP74Migration' => true,
'@PHP80Migration' => true,
'@PHP81Migration' => true,
'@DoctrineAnnotation' => true,
'doctrine_annotation_array_assignment' => ['operator' => '='],
'yoda_style' => false,
'strict_comparison' => true,
'strict_param' => true,
'declare_strict_types' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
'phpdoc_to_comment' => false,
'single_line_throw' => false,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
])
->setRiskyAllowed(true)
->setFinder($finder);

return $config;
20 changes: 20 additions & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": [
"config:base",
"group:allNonMajor",
"schedule:weekends",
":automergePatch"
],
"ignorePresets": [":prHourlyLimit2"],
"rangeStrategy": "update-lockfile",
"lockFileMaintenance": {
"enabled": true
},
"constraintsFiltering": "strict",
"packageRules": [
{
"matchPackageNames": ["api-platform/core"],
"allowedVersions": "<4"
}
]
}
Loading

0 comments on commit 29dd64e

Please sign in to comment.