Skip to content

Commit

Permalink
Add initial sources
Browse files Browse the repository at this point in the history
  • Loading branch information
kavw committed Sep 11, 2023
0 parents commit a7ca6d4
Show file tree
Hide file tree
Showing 24 changed files with 5,139 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8

[*.{md,yaml,yml,json}]
indent_size = 2

[Makefile]
indent_style = tab
30 changes: 30 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
* text=auto eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ahk text eol=crlf


*.gitattributes text
.gitignore text
.editorconfig text
*.md text diff=markdown

#
# Exclude files from exporting
#

/.gitattributes export-ignore
/.gitignore export-ignore
/.editorconfig export-ignore
/.github/ export-ignore
/tests/ export-ignore
/var/ export-ignore
/composer.lock export-ignore
/phpunit.xml export-ignore
/psalm.xml export-ignore
/phpstan.neon export-ignore

#
# Enable syntax highlighting for files with `.gitattributes` extensions.
#
*.gitattributes linguist-language=gitattributes
57 changes: 57 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Continuous Integration

on:
pull_request: ~
push:
branches: ['master']

permissions:
contents: read

jobs:
composer-validate:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.2]
steps:
- uses: actions/checkout@v3.3.0
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- run: composer validate --strict --ansi

composer-normalize:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.2]
steps:
- uses: actions/checkout@v3.3.0
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- uses: ramsey/composer-install@v2
with:
composer-options: --optimize-autoloader
- run: composer normalize --dry-run --diff --ansi

check:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.2]
steps:
- uses: actions/checkout@v3.3.0
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
- uses: ramsey/composer-install@v2
with:
composer-options: --optimize-autoloader
- run: composer check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor
/var
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Introduction

This package implements the PSR-15 [`MiddlewareInterface`](https://www.php-fig.org/psr/psr-15/#22-psrhttpservermiddlewareinterface)
67 changes: 67 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "kavw/psr15-middleware",
"description": "The PSR-15 middleware implementation",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Anton Kurnosov",
"email": "kavww@proton.me"
}
],
"require": {
"php": "^8.2",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.36",
"nyholm/psr7": "^1.8",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.3",
"squizlabs/php_codesniffer": "^3.7",
"vimeo/psalm": "^5.15"
},
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"Kavw\\Psr15Middleware\\": "src/",
"Kavw\\Psr15Middleware\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"ergebnis/composer-normalize": true
},
"sort-packages": true
},
"scripts": {
"check": [
"@cs",
"@stan",
"@psalm",
"@test"
],
"cs": [
"Composer\\Config::disableProcessTimeout",
"phpcs"
],
"cs-fix": [
"Composer\\Config::disableProcessTimeout",
"phpcbf ./src"
],
"psalm": [
"Composer\\Config::disableProcessTimeout",
"psalm"
],
"stan": [
"Composer\\Config::disableProcessTimeout",
"phpstan"
],
"test": [
"Composer\\Config::disableProcessTimeout",
"phpunit"
]
}
}
Loading

0 comments on commit a7ca6d4

Please sign in to comment.