Skip to content

Commit 4830adf

Browse files
committed
feat: initial release of aubes/openfeature--bundle
0 parents  commit 4830adf

33 files changed

Lines changed: 2150 additions & 0 deletions

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/.github export-ignore
2+
/app export-ignore
3+
/coverage export-ignore
4+
/tests export-ignore
5+
/.php-cs-fixer.php export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/phpstan.neon export-ignore
10+
/rector.php export-ignore

.github/workflows/php.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
include:
20+
- { php-version: '8.2', symfony-version: '6.4.*' }
21+
- { php-version: '8.3', symfony-version: '7.4.*' }
22+
- { php-version: '8.4', symfony-version: '8.0.*' }
23+
- { php-version: '8.5', symfony-version: '8.0.*' }
24+
fail-fast: false
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Setup PHP version
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php-version }}
33+
34+
- name: Validate composer.json and composer.lock
35+
run: composer validate --strict
36+
37+
- name: Pin Symfony version
38+
run: |
39+
composer require --no-update \
40+
symfony/config:"${{ matrix.symfony-version }}" \
41+
symfony/dependency-injection:"${{ matrix.symfony-version }}" \
42+
symfony/http-kernel:"${{ matrix.symfony-version }}"
43+
44+
- name: Cache Composer packages
45+
id: composer-cache
46+
uses: actions/cache@v4
47+
with:
48+
path: vendor
49+
key: ${{ runner.os }}-php${{ matrix.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('**/composer.json') }}
50+
restore-keys: |
51+
${{ runner.os }}-php${{ matrix.php-version }}-sf${{ matrix.symfony-version }}-
52+
53+
- name: Install dependencies
54+
run: composer update --prefer-dist --no-progress ${{ matrix.composer-flags }}
55+
56+
- name: Security audit
57+
run: composer audit
58+
59+
- name: Run static analysis
60+
run: |
61+
vendor/bin/php-cs-fixer fix --allow-risky=yes --config=.php-cs-fixer.php --dry-run --verbose
62+
vendor/bin/phpstan analyse --memory-limit=512M
63+
64+
- name: Run test suite
65+
run: composer run-script test

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.php-cs-fixer.cache
2+
/.phpunit.result.cache
3+
/phpunit.xml
4+
/vendor
5+
/composer.lock
6+
/coverage

.php-cs-fixer.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
$finder = (new PhpCsFixer\Finder())
4+
->in(__DIR__ . '/src')
5+
->in(__DIR__ . '/tests')
6+
;
7+
8+
return (new PhpCsFixer\Config())
9+
->setRiskyAllowed(true)
10+
->setFinder($finder)
11+
->setCacheFile('.php-cs-fixer.cache')
12+
->setRules(
13+
[
14+
'@Symfony' => true,
15+
'@Symfony:risky' => true,
16+
17+
'concat_space' => ['spacing' => 'one'],
18+
'native_function_invocation' => ['include' => ['@internal', 'str_start_with', 'str_contains']],
19+
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
20+
'declare_strict_types' => true,
21+
22+
'phpdoc_types_order' => true,
23+
'phpdoc_order' => true,
24+
]
25+
)
26+
;

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) 2023 Aurélian Bes
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.

0 commit comments

Comments
 (0)