Skip to content

Commit 53c66c8

Browse files
committed
0 parents  commit 53c66c8

32 files changed

+1208
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = space
6+
charset = utf-8
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{php, neon}]
11+
indent_size = 4
12+
13+
[{Makefile,**.mk}]
14+
indent_style = tab

.gitignore

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

.php_cs.dist

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
$header = <<<EOF
4+
This file is part of the Thunder micro CLI framework.
5+
(c) Jérémy Marodon <[email protected]>
6+
For the full copyright and license information, please view the LICENSE
7+
file that was distributed with this source code.
8+
EOF;
9+
10+
$finder = PhpCsFixer\Finder::create()
11+
->in([
12+
__DIR__.'/src',
13+
])
14+
;
15+
16+
return PhpCsFixer\Config::create()
17+
->setRiskyAllowed(true)
18+
->setRules([
19+
'@Symfony' => true,
20+
'array_syntax' => ['syntax' => 'short'],
21+
'header_comment' => ['header' => $header],
22+
'ordered_imports' => true,
23+
'no_alternative_syntax' => true,
24+
'no_binary_string' => true,
25+
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
26+
'no_null_property_initialization' => true,
27+
'no_short_echo_tag' => true,
28+
'no_superfluous_elseif' => true,
29+
'no_unneeded_curly_braces' => true,
30+
'no_unneeded_final_method' => true,
31+
'no_unreachable_default_argument_value' => true,
32+
'no_unset_on_property' => true,
33+
'no_useless_else' => true,
34+
'no_useless_return' => true,
35+
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],
36+
])
37+
->setFinder($finder)
38+
;

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Jérémy Marodon
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
13+
all 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
21+
THE SOFTWARE.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cs:
2+
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v
3+
4+
cs_dry_run:
5+
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run
6+
7+
analyse:
8+
vendor/bin/phpstan analyse -l 7 src

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<p align="center"><img src="./resources/thunder-logo.svg"></p>
2+
3+
<p align="center">
4+
<a href="https://packagist.org/packages/th3mouk/thunder"><img src="https://poser.pugx.org/th3mouk/thunder/v/stable.svg" alt="Latest Stable Version"></a>
5+
<a href="https://packagist.org/packages/th3mouk/thunder"><img src="https://poser.pugx.org/th3mouk/thunder/d/total.svg" alt="Total Downloads"></a>
6+
<a href="https://packagist.org/packages/th3mouk/thunder"><img src="https://poser.pugx.org/th3mouk/thunder/license.svg" alt="License"></a>
7+
</p>
8+
9+
## About Thunder
10+
11+
This repository is the core library of the Thunder micro CLI framework.
12+
13+
The aims is to provide a simple extensible kernel with DI.
14+
15+
## Todos
16+
- [X] Add Eventstore persistent subcription console
17+
- [X] Add RabbitMq console
18+
- [ ] Add CRON console
19+
- [ ] Add Eventstore projection creation command
20+
- [ ] Add Eventstore persistent subscription creation command
21+
- [ ] Add auto creation/binding queue rabbit at start
22+
- [ ] Implement an extension/plugin system
23+
- [ ] Extract EventStore code into a plugin
24+
- [ ] Extract RabbitMQ code into a plugin
25+
- [ ] Extract CRON console code into a plugin
26+
- [ ] Make AbstractSubject optional in the router

composer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "th3mouk/thunder",
3+
"description": "Event driven micro CLI framework with Reactive Programming flavors",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Jérémy Marodon",
8+
"email": "[email protected]"
9+
}
10+
],
11+
"require": {
12+
"php": "^7.2",
13+
"ext-json": "*",
14+
"mnapoli/silly": "^1.7",
15+
"symfony/config": "^4.1",
16+
"symfony/dependency-injection": "^4.1",
17+
"symfony/dotenv": "^4.1",
18+
"symfony/routing": "^4.1",
19+
"justinrainbow/json-schema": "^5.2",
20+
"rxnet/eventstore-client": "dev-master",
21+
"rxnet/rabbitmq": "^0.1.0"
22+
},
23+
"require-dev": {
24+
"phpstan/phpstan": "^0.10",
25+
"friendsofphp/php-cs-fixer": "^2.12"
26+
},
27+
"autoload": {
28+
"psr-4": {
29+
"Th3Mouk\\Thunder\\": "src/"
30+
}
31+
},
32+
"bin": ["thunder"]
33+
}

config/console.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
use Symfony\Component\DependencyInjection\Definition;
4+
use Th3Mouk\Thunder\Console\AbstractConsole;
5+
6+
$definition = new Definition();
7+
$definition->setPublic(true);
8+
$definition->setAutowired(true);
9+
10+
$container->registerForAutoconfiguration(AbstractConsole::class)
11+
->addTag('console');
12+
13+
$this->registerClasses($definition, 'Th3Mouk\\Thunder\\Console\\', '../src/Console', '../src/Console/{Application.php}');

config/container.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
use Symfony\Component\DependencyInjection\Definition;
4+
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBag;
5+
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
6+
use Symfony\Component\DependencyInjection\Reference;
7+
8+
$definition = new Definition();
9+
$definition->setPublic(false);
10+
$definition->setAutowired(true);
11+
12+
$container
13+
->autowire(ContainerBag::class, ContainerBag::class)
14+
->addArgument(new Reference(\Psr\Container\ContainerInterface::class));
15+
16+
$container->setAlias(ParameterBagInterface::class, ContainerBag::class);

config/eventstore.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
use Rxnet\EventStore\EventStore;
4+
5+
$container->autowire(EventStore::class, EventStore::class);

0 commit comments

Comments
 (0)