Skip to content

Commit

Permalink
Merge with last master content and fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
edusca committed Feb 4, 2025
2 parents 5dbffe2 + 854813c commit d3f7ed8
Show file tree
Hide file tree
Showing 177 changed files with 3,113 additions and 4,775 deletions.
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']

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
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/
21 changes: 21 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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

0 comments on commit d3f7ed8

Please sign in to comment.