Skip to content

Commit 1767fe2

Browse files
author
Masiukevich Maksim
committed
update framework version
1 parent c0c0424 commit 1767fe2

14 files changed

+298
-215
lines changed

Diff for: .github/CONTRIBUTING.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Contributing
2+
Contributions are welcome. We accept pull requests on [GitHub](https://github.com/php-service-bus/service-bus/issues).
3+
4+
## Workflow
5+
If you have an idea for a new feature, it's a good idea to check out our [issues](https://github.com/php-service-bus/service-bus/issues) or active [pull requests](https://github.com/php-service-bus/service-bus/pulls) first to see if the feature is already being worked on. If not, feel free to submit an issue first, asking whether the feature is beneficial to the project. This will save you from doing a lot of development work only to have your feature rejected. We don't enjoy rejecting your hard work, but some features just don't fit with the goals of the project.
6+
7+
When you do begin working on your feature, here are some guidelines to consider:
8+
* Your pull request description should clearly detail the changes you have made.
9+
* Please write tests for any new features you add.
10+
* Please ensure that tests pass before submitting your pull request.
11+
* Use topic/feature branches. Please do not ask us to pull from your master branch.
12+
* Submit one feature per pull request. If you have multiple features you wish to submit, please break them up into separate pull requests.
13+
* Send coherent history. Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
14+
15+
## Coding Guidelines
16+
This project comes with a configuration file and an executable for php-cs-fixer (.php_cs.dist) that you can use to (re)format your source code for compliance with this project's coding guidelines:
17+
```bash
18+
composer cs-fix
19+
```
20+
For a simple check of the code standard, there is a command:
21+
```bash
22+
composer cs-check
23+
```
24+
## Static analysis
25+
To improve the quality of the code used static analysis (via `psalm` and `phpstan`). You can start it with the command:
26+
```bash
27+
composer psalm && composer phpstan
28+
```
29+
## Running the tests
30+
The following tests must pass before we will accept a pull request. If any of these do not pass, it will result in a complete build failure.
31+
```bash
32+
composer tests
33+
```
34+
## Communication Channels
35+
You can find help and discussion in the following places:
36+
* [Telegram chat (RU)](https://t.me/php_service_bus)
37+
* Create issue [https://github.com/php-service-bus/service-bus/issues](https://github.com/php-service-bus/service-bus/issues)
38+
39+
## Security
40+
If you discover any security related issues, please email [`[email protected]`](mailto:[email protected]) instead of using the issue tracker.
41+
42+
## Reporting issues
43+
* [General problems](https://github.com/php-service-bus/service-bus/issues)
44+
* [Documentation](https://github.com/php-service-bus/documentation/issues)

Diff for: .github/workflows/continuous-integration.yml

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: "Continuous Integration"
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
code-style:
7+
name: Code style
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Install PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: 8.0
17+
coverage: none
18+
tools: composer:v2
19+
20+
- name: Install dependencies with composer
21+
run: composer update --no-ansi --no-interaction --no-progress
22+
23+
- name: Run php-cs-fixer
24+
run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run --using-cache=no --verbose
25+
26+
psalm:
27+
name: Psalm
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- name: Install PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: 8.0
37+
coverage: none
38+
tools: composer:v2
39+
40+
- name: Install dependencies with composer
41+
run: composer update --no-ansi --no-interaction --no-progress
42+
43+
- name: Run vimeo/psalm
44+
run: ./vendor/bin/psalm --config=psalm.xml --shepherd
45+
46+
phpstan:
47+
name: PHPStan
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v2
52+
53+
- name: Install PHP
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: 8.0
57+
coverage: none
58+
tools: composer:v2
59+
60+
- name: Install dependencies with composer
61+
run: composer update --no-ansi --no-interaction --no-progress
62+
63+
- name: Run phpstan/phpstan
64+
run: ./vendor/bin/phpstan analyse src --level 7
65+
66+
phpunit:
67+
name: PHPUnit
68+
69+
runs-on: ubuntu-latest
70+
services:
71+
rabbitmq:
72+
image: rabbitmq:alpine
73+
ports:
74+
- 5672:5672
75+
env:
76+
RABBITMQ_DEFAULT_USER: guest
77+
RABBITMQ_DEFAULT_PASS: guest
78+
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
79+
postgres:
80+
image: postgres:13
81+
env:
82+
POSTGRES_USER: test
83+
POSTGRES_PASSWORD: 123456789
84+
POSTGRES_DB: test
85+
ports:
86+
- 5432:5432
87+
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
88+
89+
env:
90+
PHP_EXTENSIONS: bstring, dom, intl, json, libxml, xml, xmlwriter, sockets
91+
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
92+
93+
steps:
94+
- name: Checkout
95+
uses: actions/checkout@v2
96+
97+
- name: Override PHP ini values for JIT compiler
98+
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=32M" >> $GITHUB_ENV
99+
100+
- name: Install PHP with extensions
101+
uses: shivammathur/setup-php@v2
102+
with:
103+
php-version: 8.0
104+
extensions: ${{ env.PHP_EXTENSIONS }}
105+
ini-values: ${{ env.PHP_INI_VALUES }}
106+
tools: composer:v2
107+
108+
- name: Start Redis
109+
uses: supercharge/[email protected]
110+
with:
111+
redis-version: 6
112+
113+
- name: Install dependencies
114+
run: composer update --no-ansi --no-interaction --no-progress
115+
116+
- name: Await
117+
uses: jakejarvis/wait-action@master
118+
119+
- name: Run tests with phpunit
120+
run: XDEBUG_MODE=coverage php ./vendor/bin/phpunit --configuration ./phpunit.xml --debug --coverage-clover=coverage.xml
121+
122+
- name: Send code coverage report to Codecov.io
123+
uses: codecov/codecov-action@v1
124+
with:
125+
token: ${{ secrets.CODECOV_TOKEN }}

Diff for: .scrutinizer.yml

-69
This file was deleted.

Diff for: .travis.yml

-33
This file was deleted.

Diff for: app/AppExtension.php

-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99

1010
final class AppExtension extends Extension
1111
{
12-
/**
13-
* {@inheritdoc}
14-
*
15-
* @throws \Exception
16-
*/
1712
public function load(array $configs, ContainerBuilder $container): void
1813
{
1914
$loader = new YamlFileLoader($container, new FileLocator());

0 commit comments

Comments
 (0)