Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade event dispatcher #8

Open
wants to merge 140 commits into
base: workana
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
e704da3
Fix FlatFileDriver does not notice new messages
ackintosh Sep 26, 2017
777e16b
Add a test which reproduce #330
ackintosh Nov 6, 2017
6e7d758
Fix test fails with `--prefer-lowest` and hhvm
ackintosh Nov 6, 2017
fde500e
Tweak skip message
ackintosh Nov 6, 2017
6e6ad0f
Ignore .idea
ackintosh Nov 12, 2017
7d7dd03
Improve make the dependencies minimum
ackintosh Nov 12, 2017
7c819f1
Remove ignores which is not project specific
ackintosh Nov 13, 2017
828920b
Relocate drivers (#337)
sagikazarmark Feb 14, 2018
37a182a
Massive coding style fixes
sagikazarmark Feb 14, 2018
0e90500
Merge pull request #356 from bernardphp/coding_style
sagikazarmark Feb 14, 2018
ea91a0b
Fix typo
sagikazarmark Feb 14, 2018
83d0fa5
Improve readme
sagikazarmark Feb 15, 2018
0923203
Merge pull request #359 from bernardphp/readme
sagikazarmark Feb 15, 2018
cc27d05
Remove HHVM build
sagikazarmark Feb 15, 2018
5834433
Add builds for PHP 7.x
sagikazarmark Feb 15, 2018
366faa0
Improve CI and testing
sagikazarmark Feb 15, 2018
1750e72
Improve existing specs
sagikazarmark Feb 15, 2018
d507c52
Fix PHP 7.2 count issues
sagikazarmark Feb 15, 2018
3dcc74d
Fix phpspec
sagikazarmark Feb 15, 2018
2ed6c4f
Fix spec coverage
sagikazarmark Feb 15, 2018
0b9b1b4
Fix phpspec config
sagikazarmark Feb 15, 2018
f9b38c9
Remove deprecated DefaultMessage
sagikazarmark Feb 15, 2018
961650b
Replace the abstract message with traits, closes #362
sagikazarmark Feb 15, 2018
d8d543d
Improve the plain message
sagikazarmark Feb 15, 2018
7b5aa6f
Make envelope final
sagikazarmark Feb 15, 2018
c12ec8f
Improve EnvelopeNormalizer
sagikazarmark Feb 15, 2018
62e7c8b
Handle exceptions properly in PlainMessageNormalizer
sagikazarmark Feb 15, 2018
7022edc
Fix specs
sagikazarmark Feb 15, 2018
cf94233
Improve specs
sagikazarmark Feb 16, 2018
aac4f45
Merge pull request #363 from bernardphp/message_refactor
sagikazarmark Feb 16, 2018
c0b8102
Add PSR-11 container router
sagikazarmark Feb 16, 2018
d7d858b
Remove Symfony container router
sagikazarmark Feb 16, 2018
b5191f7
Remove League container router
sagikazarmark Feb 16, 2018
601b616
Remove Pimple container router
sagikazarmark Feb 16, 2018
3ab457e
Move Exception marker interface to the root package
sagikazarmark Feb 16, 2018
c554419
Fix circular dependency in the example
sagikazarmark Feb 16, 2018
16a5e2c
Add missing case for SqsClient queue creation
elazar Dec 6, 2017
9a8d074
Merge pull request #369 from bernardphp/hotfix/sqs-create-queue-failure
sagikazarmark Feb 16, 2018
fa1ad43
Merge pull request #366 from bernardphp/365-psr-container
sagikazarmark Feb 16, 2018
6edbd78
Merge pull request #368 from bernardphp/367-move-exception-marker-int…
sagikazarmark Feb 16, 2018
2dca202
Remove unused invalid argument exception
sagikazarmark Feb 18, 2018
4c9f0c3
Improve invalid operation exception
sagikazarmark Feb 18, 2018
d5066f2
Improve not implemented exception
sagikazarmark Feb 18, 2018
15b440f
Remove unused queue not found exception
sagikazarmark Feb 18, 2018
f36eefa
Improve receiver not found exception
sagikazarmark Feb 18, 2018
b65824a
Improve service unavailable exception
sagikazarmark Feb 18, 2018
c1588fd
Remove unused exception test
sagikazarmark Feb 18, 2018
4db2026
Fix unimported exception
sagikazarmark Feb 18, 2018
4343c06
Add receiver interface
sagikazarmark Feb 18, 2018
fa4b9c5
Make SimpleRouter immutable
sagikazarmark Feb 18, 2018
bee3b97
Improve the class name router
sagikazarmark Feb 18, 2018
0764ccf
Add ReceiverResolver concept, replace container router
sagikazarmark Feb 18, 2018
2060886
Rename Router::map to Router::route
sagikazarmark Feb 18, 2018
f4c03f7
Fix minimum dev requirement
sagikazarmark Feb 18, 2018
cb89688
Merge pull request #371 from bernardphp/exceptions
sagikazarmark Feb 18, 2018
43f345e
Merge pull request #373 from bernardphp/routers
sagikazarmark Feb 18, 2018
3c1b130
Upgrade symfony
sagikazarmark Feb 18, 2018
c68e043
Upgrade predis
sagikazarmark Feb 18, 2018
344c00e
Upgrade DBAL
sagikazarmark Feb 18, 2018
1611dbd
Upgrade AWS SDK
sagikazarmark Feb 18, 2018
e868b4a
Upgrade version constraints
sagikazarmark Feb 18, 2018
bf40dbb
Merge pull request #374 from bernardphp/dependencies
sagikazarmark Feb 18, 2018
0d100e7
Update package
sagikazarmark Feb 19, 2018
3001336
Merge pull request #375 from bernardphp/package
sagikazarmark Feb 19, 2018
82ef887
Sort packages
sagikazarmark Feb 19, 2018
1d7a5e7
Update phpunit configuration
sagikazarmark Feb 19, 2018
7181d14
Update phpspec config
sagikazarmark Feb 19, 2018
d26bf21
Update PHPUnit config
sagikazarmark Feb 19, 2018
5679a44
Use dedicated PHPUnit assertions
carusogabriel Apr 13, 2018
5093a5e
throw InsufficientPermissionsException if FlatFile driver https://git…
karser May 28, 2018
c07666c
style guide compliance https://github.com/bernardphp/bernard/issues/382
karser May 28, 2018
7b339ad
more style guide compliance https://github.com/bernardphp/bernard/iss…
karser May 29, 2018
099074a
the more meaningful function name https://github.com/bernardphp/berna…
karser May 30, 2018
0722866
A typo is fixed.
medmin Jun 2, 2018
df4b999
Merge branch 'master' into improve-flat-file-driver
ackintosh Jun 16, 2018
29f18cd
Merge remote-tracking branch 'origin/improve-flat-file-driver' into i…
ackintosh Jun 16, 2018
9672398
Merge pull request #384 from medmin/patch-1
sagikazarmark Jun 16, 2018
06466a6
Merge pull request #378 from carusogabriel/assertions
sagikazarmark Jun 24, 2018
4c0493e
Merge pull request #383 from karser/throw-exception-in-flat-file-driver
sagikazarmark Jun 24, 2018
3ff8892
Fix doctrine peek master (#380)
uwej711 Jun 24, 2018
1a0f0fa
allow beberlei/assert 3
bendavies Jul 4, 2018
0923aa3
Merge branch 'master' into improve-flat-file-driver
ackintosh Aug 15, 2018
7d07c17
added test for LoggerSubscriber
Oct 26, 2018
2877e6b
Use PhpRedisDriver in example
Maxim-Mazurok Jun 12, 2019
43d2578
Merge pull request #403 from Maxim-Mazurok/patch-1
sagikazarmark Jun 28, 2019
a2c0466
Merge pull request #390 from ricardofiorani/improve-test-coverage-for…
sagikazarmark Aug 8, 2019
afb5e61
Merge pull request #387 from bendavies/patch-1
sagikazarmark Aug 8, 2019
eab0f25
Merge pull request #330 from ackintosh/improve-flat-file-driver
sagikazarmark Aug 8, 2019
64d4fb1
Increase compatibility with Symfony 4.3 by using proper order of para…
holtkamp Oct 12, 2019
fee4176
Merge pull request #406 from holtkamp/dev-patch-symfony-compatibility
acrobat Oct 20, 2019
41883b9
Add github actions
sagikazarmark Dec 29, 2020
61f0daa
Add github actions badge to readme
sagikazarmark Dec 29, 2020
fb013f3
Remove unused CI files
sagikazarmark Dec 29, 2020
a68cf65
Merge pull request #409 from bernardphp/github-actions
sagikazarmark Dec 29, 2020
a0c8000
Upgrade required PHP version to 7.4
sagikazarmark Dec 29, 2020
f789af2
Upgrade dependencies to work with PHP 8.0
sagikazarmark Dec 29, 2020
bf6d25b
Fix code after dependency upgrade
sagikazarmark Dec 29, 2020
77da90c
Drop PHP 8.1 (nightly) test target for now
sagikazarmark Dec 29, 2020
5e25d64
Add minimum php version badge
sagikazarmark Dec 29, 2020
1f15a9f
Merge pull request #410 from bernardphp/upgrade-php
sagikazarmark Dec 29, 2020
6988c55
Update branch alias
sagikazarmark Dec 29, 2020
21ebde7
Drop relocated drivers
sagikazarmark Dec 29, 2020
6dba97f
Merge pull request #411 from bernardphp/drop-drivers
sagikazarmark Dec 30, 2020
4e9d0ce
fix: php 8.1 Countable::count incompatibilities
alexpozzi Mar 18, 2022
7b9a2d1
Merge pull request #416 from alexpozzi/fix/php-81-issues
acrobat Mar 19, 2022
4bf5746
refactor!: relocate appengine driver to the drivers package
sagikazarmark May 3, 2022
2842a79
Merge pull request #418 from bernardphp/relocate-appengine
sagikazarmark May 3, 2022
8a4dc62
build: add Nix flake
sagikazarmark May 3, 2022
52d3d3b
Merge pull request #419 from bernardphp/flake
sagikazarmark May 3, 2022
84e84b0
chore: update composer.json
sagikazarmark May 3, 2022
dedbcf6
feat!: drop PHP 7 support
sagikazarmark May 3, 2022
f2a1bc9
Merge pull request #421 from bernardphp/php-8-only
sagikazarmark May 4, 2022
7d0590b
feat!: rewrite Driver interface
sagikazarmark May 3, 2022
9c08db9
refactor!: apply Driver changes to AbstractPrefetchDriver
sagikazarmark May 3, 2022
e2ca5ad
refactor!: apply Driver changes to Doctrine
sagikazarmark May 3, 2022
715d130
refactor!: apply Driver changes to FlatFile
sagikazarmark May 3, 2022
9db0076
refactor!: apply Driver changes to InMemory
sagikazarmark May 4, 2022
ac06b83
refactor!: apply Driver changes to MongoDB
sagikazarmark May 4, 2022
9b824f4
refactor!: apply Driver changes to PersistentQueue
sagikazarmark May 4, 2022
2fa6095
Merge pull request #420 from bernardphp/driver-refactor
sagikazarmark May 4, 2022
75f9868
chore: add php-cs-fixer config
sagikazarmark May 4, 2022
877822d
chore: run php cs fixer
sagikazarmark May 4, 2022
52f337d
ci: add php-cs-fixer-check
sagikazarmark May 4, 2022
090e19b
chore: migrate test config
sagikazarmark May 4, 2022
d1868eb
fix: DriverMessage type
sagikazarmark May 4, 2022
5710d88
chore: fix prophecy deprecation
sagikazarmark May 4, 2022
eaed2c8
chore: fix prefetch message cache
sagikazarmark May 4, 2022
d29e64b
Merge pull request #423 from bernardphp/php-updates
sagikazarmark May 4, 2022
b455abf
feat!: relocate DriverMessage to the Driver namespace
sagikazarmark May 4, 2022
854813c
Merge pull request #424 from bernardphp/driver-message
sagikazarmark May 4, 2022
d3f7ed8
Merge with last master content and fix conflicts
edusca Feb 4, 2025
5266e52
Fix some return types
edusca Feb 4, 2025
d9bbdf8
Copy pheanstalk driver for testing
edusca Feb 5, 2025
81f309b
Fixes from uts
edusca Feb 5, 2025
19d648f
Try 8.3
edusca Feb 5, 2025
d362b3a
Fixes php-cs-fixer
edusca Feb 6, 2025
b3d6131
CS fixer
edusca Feb 6, 2025
f24080f
CS fixer
edusca Feb 6, 2025
05a203a
CDTM
edusca Feb 6, 2025
082fe88
Run php-cs-fixer on this two fucking files
edusca Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[composer.json]
indent_style = space
indent_size = 4

[*.php]
indent_style = space
end_of_line = lf
indent_size = 4

[*.yml]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[phpspec.*]
indent_style = space
[*.nix]
indent_size = 2
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.1.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.0/direnvrc" "sha256-FAT2R9yYvVg516v3LiogjIc8YfsbWbMM/itqWsm5xTA="
fi
use flake

export PATH="$PWD/$(composer config vendor-dir)/bin:$PATH"
21 changes: 14 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
/tests export-ignore
/doc export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.editorconfig export-ignore
.travis.yml export-ignore
phpunit.xml.dist export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
/.flintci.yml export-ignore
/.github/ export-ignore
/.php_cs.dist export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/doc/ export-ignore
/phpspec.ci.yml export-ignore
/phpspec.yml.dist export-ignore
/phpunit.xml.dist export-ignore
/spec/ export-ignore
/tests/ export-ignore
2 changes: 2 additions & 0 deletions .github/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.yml]
indent_size = 2
19 changes: 19 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Checks

on:
push:
branches:
- master
pull_request:

jobs:
composer-normalize:
name: Composer Normalize
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Composer normalize
uses: docker://ergebnis/composer-normalize-action
62 changes: 62 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
build-lowest-version:
name: Build lowest version
runs-on: ubuntu-latest

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: none
extensions: mbstring, intl
tools: composer:v2

- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Checkout code
uses: actions/checkout@v2

- name: Download dependencies
run: composer update --no-interaction --prefer-stable --prefer-lowest --prefer-dist

- name: Run tests
run: composer test

build:
name: Build
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
php: [ '8.0', '8.1', '8.3' ]

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mbstring, intl
tools: composer:v2

- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Checkout code
uses: actions/checkout@v2

- name: Download dependencies
run: composer update --no-interaction --prefer-dist

- name: Run tests
run: composer test
35 changes: 0 additions & 35 deletions .github/workflows/php.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Static analysis

on:
push:
branches:
- master
pull_request:

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Nix
uses: cachix/install-nix-action@v17
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}

- name: Download dependencies
run: nix develop -c composer update --no-interaction --no-progress

- name: Run PHP CS Fixer
run: nix develop -c php-cs-fixer fix --diff --dry-run
16 changes: 11 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
composer.lock
vendor
phpunit.xml
coverage
_build
/.direnv/
.php-cs-fixer.php
.php-cs-fixer.cache
.phpunit.result.cache
/_build/
/build/
/composer.lock
/phpspec.yml
/phpunit.xml
/vendor/
.idea/
22 changes: 22 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

$config = (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'yoda_style' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->name('*.php')
);

return $config;

15 changes: 15 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('spec')
->in(__DIR__)
;

return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
])
->setFinder($finder)
;
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

60 changes: 46 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,55 @@
</a>
</p>

Bernard makes it super easy and enjoyable to do background processing in PHP. It does this by utilizing queues and long running processes. It supports normal queueing drivers but also implements simple ones with Redis and Doctrine.
[![Latest Version](https://img.shields.io/github/release/bernardphp/bernard.svg?style=flat-square)](https://github.com/bernardphp/bernard/releases)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg?style=flat-square)](https://php.net/)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/bernardphp/bernard/CI?style=flat-square)](https://github.com/bernardphp/bernard/actions?query=workflow%3ACI)
[![Total Downloads](https://img.shields.io/packagist/dt/bernard/bernard.svg?style=flat-square)](https://packagist.org/packages/bernard/bernard)

Bernard makes it super easy and enjoyable to do background processing in PHP.
It does this by utilizing queues and long running processes.
It supports normal queueing drivers but also implements simple ones with Redis and Doctrine.

Currently these are the supported backends, with more coming with each release:

* Predis / PhpRedis
* Amazon SQS
* Iron MQ
* Doctrine DBAL
* Pheanstalk
* PhpAmqp / RabbitMQ
* Queue interop
- Predis / PhpRedis
- Amazon SQS
- Iron MQ
- Doctrine DBAL
- Pheanstalk
- PhpAmqp / RabbitMQ
- Queue interop


## Install

Via Composer

```bash
$ composer require bernard/bernard
```


## Documentation

Please see the [official documentation](https://bernard.readthedocs.org).


## Testing

We try to follow BDD and TDD, as such we use both [phpspec](http://www.phpspec.net) and [phpunit](https://phpunit.de) to test this library.

```bash
$ composer test
```

You can run the functional tests by executing:

```bash
$ composer test-functional
```

You can learn more on our website about Bernard and its [related projects][website] or just dive directly into [the
documentation][documentation].

[![Build Status](https://travis-ci.org/bernardphp/bernard.png?branch=master)][travis] [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/bernardphp/bernard/badges/quality-score.png?s=f752c78d347624081f5b6d3d818fe14eef0311c2)](https://scrutinizer-ci.com/g/bernardphp/bernard/)
## License

[documentation]: https://bernard.readthedocs.org
[website]: http://bernardphp-com.rtfd.org
[travis]: https://travis-ci.org/bernardphp/bernard
The MIT License (MIT). Please see [License File](LICENSE) for more information.
Loading