Skip to content

Commit 31feeb9

Browse files
Initial commit
0 parents  commit 31feeb9

21 files changed

+3905
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.bat]
14+
end_of_line = crlf
15+
16+
[*.yml]
17+
indent_style = space
18+
indent_size = 4

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
testsuite:
7+
name: Unittests
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php-version: ['8.1', '8.2', '8.3']
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-version }}
23+
tools: pecl
24+
coverage: pcov
25+
26+
- name: Composer install
27+
run: |
28+
if [[ ${{ matrix.prefer-lowest == '8.1' }} ]]; then
29+
composer update --prefer-lowest --prefer-stable
30+
else
31+
composer install
32+
fi
33+
- name: Run PHPUnit
34+
run: |
35+
if [[ ${{ matrix.php-version }} == '8.3' ]]; then
36+
bin/phpunit --coverage-clover=coverage.xml
37+
else
38+
bin/phpunit
39+
fi
40+
- name: Code Coverage Report
41+
if: success() && matrix.php-version == '8.3'
42+
uses: codecov/codecov-action@v4
43+
44+
validation:
45+
name: Coding Standard & Static Analysis
46+
runs-on: ubuntu-20.04
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
with:
51+
fetch-depth: 1
52+
53+
- name: Setup PHP
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: '8.3'
57+
coverage: none
58+
tools: pecl
59+
60+
- name: Composer install
61+
run: composer update --prefer-stable
62+
63+
- name: Run phpcs
64+
run: bin/phpcs --version && bin/phpcs --report=checkstyle --standard=phpcs.xml src/ tests/
65+
66+
- name: Run phpstan
67+
run: bin/phpstan -V && bin/phpstan analyse -c phpstan.neon --error-format=github

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/vendor/
2+
/tools/
3+
/bin/
4+
composer.lock

.phive/phars.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="grumphp" version="^2.5.0" installed="2.5.0" location="./tools/grumphp" copy="false"/>
4+
</phive>

.phpunit.cache/test-results

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":{"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":7,"Phauthentic\\CorrelationIdBundle\\TestsEventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":8,"Phauthentic\\CorrelationIdBundle\\TestsEventSubscriber\\CorrelationIdSubscriberTest::testOnKernelRequest":8,"Phauthentic\\CorrelationIdBundle\\TestsEventSubscriber\\CorrelationIdSubscriberTest::testOnKernelResponse":8},"times":{"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelRequest":0.013,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelResponse":0.004,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":0.009,"Phauthentic\\CorrelationIdBundle\\TestsEventSubscriber\\CorrelationIdSubscriberTest::testOnKernelRequest":0.014,"Phauthentic\\CorrelationIdBundle\\TestsEventSubscriber\\CorrelationIdSubscriberTest::testOnKernelResponse":0.004,"Phauthentic\\CorrelationIdBundle\\TestsEventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":0.004}}

.phpunit.result.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":{"Tests\\Phauthentic\\CorrelationIdBundle\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelRequest":4,"Tests\\Phauthentic\\CorrelationIdBundle\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelResponse":4,"Tests\\Phauthentic\\CorrelationIdBundle\\EventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":4,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelRequest":4,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelResponse":4,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":4},"times":{"Tests\\Phauthentic\\CorrelationIdBundle\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelRequest":0.046,"Tests\\Phauthentic\\CorrelationIdBundle\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelResponse":0.009,"Tests\\Phauthentic\\CorrelationIdBundle\\EventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":0.002,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelRequest":0.013,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testOnKernelResponse":0.004,"Phauthentic\\CorrelationIdBundle\\Tests\\EventSubscriber\\CorrelationIdSubscriberTest::testGetSubscribedEvents":0.005}}

.scrutinizer.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
build:
2+
image: default-bionic
3+
nodes:
4+
analysis:
5+
environment:
6+
php:
7+
version: 8.3.3
8+
project_setup:
9+
override:
10+
- 'true'
11+
tests:
12+
override:
13+
- php-scrutinizer-run
14+
php83:
15+
environment:
16+
php:
17+
version: 8.3.3
18+
filter:
19+
excluded_paths:
20+
- 'tests/*'
21+
checks:
22+
php: true
23+
coding_style:
24+
php: { }
25+
tools:
26+
php_code_coverage: true

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [2024] [Florian Krämer]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Correlation ID Symfony Bundle
2+
3+
![PHP >= 8.1](https://img.shields.io/static/v1?label=PHP&message=^8.1&color=787CB5&style=for-the-badge&logo=php)
4+
![phpstan Level 8](https://img.shields.io/static/v1?label=phpstan&message=Level%208&color=%3CCOLOR%3E&style=for-the-badge)
5+
![License: MIT](https://img.shields.io/static/v1?label=License&message=MIT&color=%3CCOLOR%3E&style=for-the-badge)
6+
[![Code Quality](https://img.shields.io/scrutinizer/g/Phauthentic/correlation-id-symfony-bundle/master.svg?style=for-the-badge)](https://scrutinizer-ci.com/g/Phauthentic/correlation-id-symfony-bundle/)
7+
<!--[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/Phauthentic/correlation-id-symfony-bundle/master.svg?style=for-the-badge)](https://scrutinizer-ci.com/g/Phauthentic/correlation-id-symfony-bundle/)-->
8+
9+
10+
This is a Symfony bridge for the framework agnostic [Correlation ID library](https://github.com/Phauthentic/correlation-id).
11+
12+
> A Correlation ID, also known as a Transit ID, is a unique identifier value that is attached to requests and messages that allow reference to a particular transaction or event chain. The Correlation Pattern, which depends on the use of Correlation ID is a well documented Enterprise Integration Pattern.
13+
14+
* [The value of a correlation ID](https://blog.rapid7.com/2016/12/23/the-value-of-correlation-ids/)
15+
* [Identity Correlation on Wikipedia](https://en.wikipedia.org/wiki/Identity_correlation)
16+
17+
## Copyright & License
18+
19+
Licensed under the [MIT license](LICENSE).
20+
21+
Copyright (c) [Phauthentic](https://github.com/Phauthentic) / Florian Krämer

composer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "phauthentic/correlation-id-symfony-bundle",
3+
"type": "library",
4+
"require": {
5+
"phauthentic/correlation-id": "^2.0",
6+
"symfony/http-kernel": "^6.0||^7.0"
7+
},
8+
"require-dev": {
9+
"phpstan/phpstan": "^1.10",
10+
"phpunit/phpunit": "^10.5.15",
11+
"squizlabs/php_codesniffer": "^3.9",
12+
"symfony/config": "^6.0||^7.0",
13+
"symfony/dependency-injection": "^6.0||^7.0",
14+
"symfony/phpunit-bridge": "^6.0||^7.0"
15+
},
16+
"license": "MIT",
17+
"autoload": {
18+
"psr-4": {
19+
"Phauthentic\\CorrelationIdBundle\\": "src/"
20+
}
21+
},
22+
"autoload-dev": {
23+
"psr-4": {
24+
"Phauthentic\\CorrelationIdBundle\\Tests\\": "tests/"
25+
}
26+
},
27+
"config": {
28+
"sort-packages": true,
29+
"optimize-autoloader": true,
30+
"bin-dir": "bin"
31+
},
32+
"scripts": {
33+
"cs": "phpcs",
34+
"cs-fix": "phpcbf",
35+
"test": "phpunit --coverage-tex",
36+
"stan": "phpstan"
37+
}
38+
}

0 commit comments

Comments
 (0)