Skip to content

Commit 8b29dac

Browse files
committed
Init project
0 parents  commit 8b29dac

File tree

10 files changed

+224
-0
lines changed

10 files changed

+224
-0
lines changed

.github/dependabot.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'composer'
4+
directory: '/'
5+
schedule:
6+
interval: 'daily'
7+
- package-ecosystem: 'github-actions'
8+
directory: '/'
9+
schedule:
10+
interval: 'daily'

.github/workflows/test.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request: ~
8+
9+
jobs:
10+
test:
11+
name: Test
12+
strategy:
13+
matrix:
14+
php-version: ['8.3']
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-version }}
24+
tools: composer
25+
26+
- name: Install composer dependencies
27+
run: composer install --prefer-dist --no-progress
28+
29+
- name: Run tests
30+
run: composer test

.gitignore

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

.php-cs-fixer.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$finder = (new PhpCsFixer\Finder())
6+
->in(['src', 'tests']);
7+
8+
return (new PhpCsFixer\Config())
9+
->setCacheFile('var/.php-cs-fixer.cache')
10+
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
11+
->setRiskyAllowed(true)
12+
->setRules([
13+
'@PhpCsFixer' => true,
14+
'@Symfony' => true,
15+
'@PER-CS2.0' => true,
16+
'binary_operator_spaces' => false,
17+
'cast_spaces' => true,
18+
'concat_space' => ['spacing' => 'one'],
19+
'declare_strict_types' => true,
20+
'global_namespace_import' => [
21+
'import_classes' => true,
22+
'import_constants' => null,
23+
'import_functions' => null,
24+
],
25+
'multiline_whitespace_before_semicolons' => false,
26+
'phpdoc_align' => ['align' => 'left'],
27+
'phpdoc_order' => true,
28+
'phpdoc_to_comment' => false,
29+
'php_unit_test_class_requires_covers' => false,
30+
'single_line_throw' => false,
31+
'trailing_comma_in_multiline' => [
32+
'elements' => ['arrays', 'arguments', 'parameters'],
33+
],
34+
'void_return' => true,
35+
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
36+
])
37+
->setFinder($finder);

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 Gember
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 🫚 Gember File reflector: Symfony Finder
2+
Gember File finder ([gember/event-sourcing](https://github.com/GemberPHP/event-sourcing)) implementation based on [symfony/finder](https://github.com/symfony/finder).

captainhook.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"pre-push": {
3+
"enabled": true,
4+
"actions": [
5+
{
6+
"action": "composer cs"
7+
},
8+
{
9+
"action": "composer phpstan"
10+
},
11+
{
12+
"action": "composer dependency-analyser"
13+
},
14+
{
15+
"action": "composer phpunit"
16+
},
17+
{
18+
"action": "composer coverage"
19+
}
20+
]
21+
}
22+
}

composer.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "gember/file-finder-symfony",
3+
"description": "Gember File finder (gember/event-sourcing) implementation based on symfony/finder",
4+
"license": "MIT",
5+
"type": "library",
6+
"keywords": [
7+
"gember",
8+
"event-sourcing",
9+
"ddd",
10+
"domain-driven-design",
11+
"cqrs",
12+
"file-finder",
13+
"symfony",
14+
"finder"
15+
],
16+
"authors": [
17+
{
18+
"name": "Jeroen de Graaf",
19+
"email": "[email protected]",
20+
"homepage": "https://jero.work"
21+
}
22+
],
23+
"require": {
24+
"php": "^8.3",
25+
"gember/event-sourcing": "dev-main",
26+
"symfony/finder": "^7.1"
27+
},
28+
"require-dev": {
29+
"captainhook/captainhook": "^5.23",
30+
"friendsofphp/php-cs-fixer": "^3.58",
31+
"phpstan/phpstan": "^1.11",
32+
"phpunit/phpunit": "^11.1",
33+
"rregeer/phpunit-coverage-check": "^0.3.1",
34+
"shipmonk/composer-dependency-analyser": "^1.5",
35+
"symfony/property-access": "^7.0"
36+
},
37+
"autoload": {
38+
"psr-4": {
39+
"Gember\\FileFinderSymfony\\": "src/"
40+
}
41+
},
42+
"autoload-dev": {
43+
"psr-4": {
44+
"Gember\\FileFinderSymfony\\Test\\": "tests/"
45+
}
46+
},
47+
"config": {
48+
"sort-packages": true
49+
},
50+
"scripts": {
51+
"coverage": "vendor/bin/coverage-check var/coverage/clover.xml 95",
52+
"cs": "vendor/bin/php-cs-fixer fix --diff --dry-run --config=.php-cs-fixer.php",
53+
"cs:fix": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php",
54+
"dependency-analyser": "vendor/bin/composer-dependency-analyser",
55+
"phpstan": "vendor/bin/phpstan analyse -c phpstan.neon",
56+
"phpunit": "XDEBUG_MODE=coverage vendor/bin/phpunit",
57+
"test": [
58+
"@cs",
59+
"@dependency-analyser",
60+
"@phpstan",
61+
"@phpunit",
62+
"@coverage"
63+
]
64+
}
65+
}

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
level: max
3+
paths:
4+
- src/
5+
- tests/

phpunit.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.1/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheDirectory="var/.phpunit.cache"
6+
colors="true"
7+
executionOrder="depends,defects"
8+
requireCoverageMetadata="false"
9+
beStrictAboutCoverageMetadata="false"
10+
beStrictAboutOutputDuringTests="true"
11+
failOnRisky="true"
12+
failOnWarning="true">
13+
<testsuites>
14+
<testsuite name="default">
15+
<directory>tests</directory>
16+
</testsuite>
17+
</testsuites>
18+
<coverage includeUncoveredFiles="true">
19+
<report>
20+
<clover outputFile="var/coverage/clover.xml"/>
21+
<html outputDirectory="var/coverage/html-coverage"/>
22+
</report>
23+
</coverage>
24+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
25+
<include>
26+
<directory>src</directory>
27+
</include>
28+
</source>
29+
</phpunit>

0 commit comments

Comments
 (0)