Skip to content

Commit

Permalink
Merge pull request #2 from Micro-PHP/1.6.1
Browse files Browse the repository at this point in the history
WIP: v1.6.1
  • Loading branch information
Asisyas authored Jan 21, 2023
2 parents 35cf5b3 + 2f10470 commit 4bec7ea
Show file tree
Hide file tree
Showing 27 changed files with 689 additions and 134 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.github export-ignore
/tests export-ignore
/phpunit.xml.dist export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/psalm.xml export-ignore

*.php diff=php
2 changes: 2 additions & 0 deletions .github/workflows/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[{*.yaml,*.yml}]
indent_size = 2
52 changes: 52 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Plugin CI
on:
push:
branches: [ 'master' ]
pull_request:

env:
PHP_CS_FIXER_IGNORE_ENV: 1
XDEBUG_MODE: coverage

jobs:
tests:
name: "Tests ${{ matrix.php-version }} deps ${{ matrix.dependency-versions }}"
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
# normal, highest, non-dev installs
php-version: [ '8.2' ]
dependency-versions: [ 'highest' ]
include:
# testing lowest PHP version with the lowest dependencies
# - php-version: '8.2'
# dependency-versions: 'lowest'

# testing dev versions with the highest PHP
- php-version: '8.2'
dependency-versions: 'highest'

steps:
- name: "Checkout code"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: Set composer root version
run: "export COMPOSER_ROOT_VERSION=1.9"

- name: "Composer install"
uses: "ramsey/composer-install@v2"
env:
COMPOSER_ROOT_VERSION: 1.9
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"

- name: Run tests
run: composer run test
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
vendor/
composer.lock
.idea
vendor
composer.lock
.phpunit.result.cache
.php-cs-fixer.cache
test-coverage-report
phpunit.xml
.php-cs-fixer.php
phpstan.neon
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

97 changes: 97 additions & 0 deletions .idea/PluginLocator.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

109 changes: 109 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

if (!file_exists(__DIR__.'/src')) {
exit(0);
}

$finder = (new PhpCsFixer\Finder())
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
;

return (new PhpCsFixer\Config())
->setRules(array(
'@Symfony' => true,
'@Symfony:risky' => true,
'protected_to_private' => false,
'semicolon_after_instruction' => false,
'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress']],
'header_comment' => [
'header' => <<<EOF
This file is part of the Micro framework package.
(c) Stanislau Komar <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF
]
))
->setRiskyAllowed(true)
->setFinder($finder);
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
![GitHub Workflow Status](https://github.com/Micro-PHP/http-core/actions/workflows/ci.yaml/badge.svg)
Loading

0 comments on commit 4bec7ea

Please sign in to comment.