Skip to content

Commit c23a4fc

Browse files
Merge pull request #137 from cleverage/prepare-release
Prepare release v4.0
2 parents 9d8ed54 + 0d2cc03 commit c23a4fc

File tree

260 files changed

+1930
-1287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+1930
-1287
lines changed

.docker/compose.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
x-build-args: &build-args
2+
UID: "${UID:-1000}"
3+
GID: "${GID:-1000}"
4+
5+
name: cleverage-process-bundle
6+
7+
services:
8+
php:
9+
build:
10+
context: php
11+
args:
12+
<<: *build-args
13+
volumes:
14+
- ../:/var/www

.docker/php/Dockerfile

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM php:8.2-fpm-alpine
2+
3+
ARG UID
4+
ARG GID
5+
6+
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
7+
COPY /conf.d/ "$PHP_INI_DIR/conf.d/"
8+
9+
RUN apk update && apk add \
10+
tzdata \
11+
shadow \
12+
nano \
13+
bash \
14+
icu-dev \
15+
&& docker-php-ext-configure intl \
16+
&& docker-php-ext-install intl opcache \
17+
&& docker-php-ext-enable opcache
18+
19+
RUN ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime \
20+
&& sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Paris/" $PHP_INI_DIR/php.ini
21+
22+
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
23+
24+
RUN usermod -u $UID www-data \
25+
&& groupmod -g $GID www-data
26+
27+
USER www-data:www-data
28+
29+
WORKDIR /var/www

.docker/php/conf.d/dev.ini

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
display_errors = 1
2+
error_reporting = E_ALL
3+
4+
opcache.validate_timestamps = 1
5+
opcache.revalidate_freq = 0
File renamed without changes.
File renamed without changes.

.github/workflows/notifications.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- name: Get the tag short reference
1515
id: get_tag
16-
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
16+
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
1717

1818
- name: Rocket.Chat Notification
19-
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@1.1.1
19+
uses: madalozzo/Rocket.Chat.GitHub.Action.Notification@master
2020
with:
2121
type: success
2222
job_name: "[cleverage/process-bundle](https://github.com/cleverage/process-bundle) : ${{ steps.get_tag.outputs.TAG }} has been released"

.github/workflows/quality.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
phpstan:
14+
name: PHPStan
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Install PHP with extensions
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: '8.2'
23+
coverage: none
24+
tools: composer:v2
25+
- name: Install Composer dependencies (locked)
26+
uses: ramsey/composer-install@v3
27+
- name: PHPStan
28+
run: vendor/bin/phpstan --no-progress --memory-limit=1G analyse --error-format=github
29+
30+
php-cs-fixer:
31+
name: PHP-CS-Fixer
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Install PHP with extensions
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: '8.2'
40+
coverage: none
41+
tools: composer:v2
42+
- name: Install Composer dependencies (locked)
43+
uses: ramsey/composer-install@v3
44+
- name: PHP-CS-Fixer
45+
run: vendor/bin/php-cs-fixer fix --diff --dry-run --show-progress=none
46+
47+
rector:
48+
name: Rector
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v4
53+
- name: Install PHP with extensions
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: '8.2'
57+
coverage: none
58+
tools: composer:v2
59+
- name: Install Composer dependencies (locked)
60+
uses: ramsey/composer-install@v3
61+
- name: Rector
62+
run: vendor/bin/rector --no-progress-bar --dry-run

.github/workflows/test.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }}
15+
runs-on: ubuntu-latest
16+
continue-on-error: ${{ matrix.allowed-to-fail }}
17+
env:
18+
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
19+
20+
strategy:
21+
matrix:
22+
php-version:
23+
- '8.2'
24+
- '8.3'
25+
dependencies: [highest]
26+
allowed-to-fail: [false]
27+
symfony-require: ['']
28+
variant: [normal]
29+
include:
30+
- php-version: '8.2'
31+
dependencies: highest
32+
allowed-to-fail: false
33+
symfony-require: 6.4.*
34+
variant: symfony/symfony:"6.4.*"
35+
- php-version: '8.2'
36+
dependencies: highest
37+
allowed-to-fail: false
38+
symfony-require: 7.1.*
39+
variant: symfony/symfony:"7.1.*"
40+
- php-version: '8.3'
41+
dependencies: highest
42+
allowed-to-fail: false
43+
symfony-require: 6.4.*
44+
variant: symfony/symfony:"6.4.*"
45+
- php-version: '8.3'
46+
dependencies: highest
47+
allowed-to-fail: false
48+
symfony-require: 7.1.*
49+
variant: symfony/symfony:"7.1.*"
50+
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
- name: Install PHP with extensions
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: ${{ matrix.php-version }}
58+
coverage: pcov
59+
tools: composer:v2, flex
60+
- name: Add PHPUnit matcher
61+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
62+
- name: Install variant
63+
if: matrix.variant != 'normal' && !startsWith(matrix.variant, 'symfony/symfony')
64+
run: composer require ${{ matrix.variant }} --no-update
65+
- name: Install Composer dependencies (${{ matrix.dependencies }})
66+
uses: ramsey/composer-install@v3
67+
with:
68+
dependency-versions: ${{ matrix.dependencies }}
69+
- name: Run Tests with coverage
70+
run: vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
71+
#- name: Send coverage to Codecov
72+
# uses: codecov/codecov-action@v4
73+
# with:
74+
# files: build/logs/clover.xml

.php-cs-fixer.dist.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the CleverAge/ProcessBundle package.
55
*
6-
* Copyright (c) 2017-2024 Clever-Age
6+
* Copyright (c) Clever-Age
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -14,17 +14,18 @@
1414
}
1515

1616
$fileHeaderComment = <<<'EOF'
17-
This file is part of the CleverAge/ProcessBundle package.
17+
This file is part of the CleverAge/ProcessBundle package.
1818
19-
Copyright (c) 2017-2024 Clever-Age
19+
Copyright (c) Clever-Age
2020
21-
For the full copyright and license information, please view the LICENSE
22-
file that was distributed with this source code.
23-
EOF;
21+
For the full copyright and license information, please view the LICENSE
22+
file that was distributed with this source code.
23+
EOF;
2424

2525
return (new PhpCsFixer\Config())
2626
->setRules([
2727
'@PHP71Migration' => true,
28+
'@PHP82Migration' => true,
2829
'@PHPUnit75Migration:risky' => true,
2930
'@Symfony' => true,
3031
'@Symfony:risky' => true,
@@ -38,6 +39,7 @@
3839
->setFinder(
3940
(new PhpCsFixer\Finder())
4041
->in(__DIR__.'/src')
42+
->in(__DIR__.'/tests')
4143
->append([__FILE__])
4244
)
4345
->setCacheFile('.php-cs-fixer.cache')

CHANGELOG.md

+70
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1+
v4.0
2+
------
3+
4+
## BC breaks
5+
6+
* [#142](https://github.com/cleverage/process-bundle/issues/142) Remove FileFetchTask, use `cleverage/flysystem-process-bundle` instead.
7+
* [#142](https://github.com/cleverage/process-bundle/issues/142) YamlReaderTask & YamlWriterTask namespaces changed to `CleverAge\ProcessBundle\Task\File\Yaml`
8+
* [#142](https://github.com/cleverage/process-bundle/issues/142) Array***Transformers namespaces changed to `CleverAge\ProcessBundle\Transformer\Array`
9+
* [#142](https://github.com/cleverage/process-bundle/issues/142) NormalizeTransformer & DenormalizeTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\Serialization`
10+
* [#142](https://github.com/cleverage/process-bundle/issues/142) DateFormatTransformer & DateParserTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\Date`
11+
* [#142](https://github.com/cleverage/process-bundle/issues/142) ExplodeTransformer, HashTransformer, ImplodeTransformer, SlugifyTransformer, SprintfTransformer & TrimTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\String`
12+
* [#142](https://github.com/cleverage/process-bundle/issues/142) InstantiateTransformer, PropertyAccessorTransformer RecursivePropertySetterTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\Object`
13+
* [#147](https://github.com/cleverage/process-bundle/issues/147) Replace `Symfony\Component\Form\Exception\InvalidConfigurationException` by `Symfony\Component\Config\Definition\Exception\InvalidConfigurationException`
14+
* [#148](https://github.com/cleverage/process-bundle/issues/148) Update services (step 1) according to Symfony best practices. Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
15+
Services must be prefixed with the bundle alias instead of using fully qualified class names => `cleverage_process`
16+
* [#150](https://github.com/cleverage/process-bundle/issues/150) The class `\CleverAge\ProcessBundle\Task\Debug\MemInfoDumpTask` has been deleted without suggested replacement
17+
* [#115](https://github.com/cleverage/process-bundle/issues/115) New mandatory configuration `default_error_strategy` on `clever_age_process` level. See [Quick Start/Global configuration](docs/01-quick_start.md#global-configuration)
18+
### Changes
19+
20+
* [#139](https://github.com/cleverage/process-bundle/issues/139) Update Makefile & .docker for local standalone usage
21+
* [#139](https://github.com/cleverage/process-bundle/issues/139) Update rector, phpstan & php-cs-fixer configurations & apply it
22+
* [#141](https://github.com/cleverage/process-bundle/issues/141) `league/flysystem-bundle` is not required anymore
23+
* [#130](https://github.com/cleverage/process-bundle/issues/130) EventDispatcherInterface service declaration breaks dependency injection
24+
* [#147](https://github.com/cleverage/process-bundle/issues/147) Add missing dependencies on `symfony/dotenv` and `symfony/runtime`
25+
* [#147](https://github.com/cleverage/process-bundle/issues/147) Remove dependencies on `symfony/form`, `symfony/messenger` & `symfony/scheduler`
26+
* [#146](https://github.com/cleverage/process-bundle/issues/146) eav-process-bundle, enqueue-process-bundle, cache-process-bundle and process-soap-bundle were deprecated / archived.
27+
* [#141](https://github.com/cleverage/process-bundle/issues/141) Add a default value to the node "default_error_strategy"
28+
29+
### Fixes
30+
31+
* [#129](https://github.com/cleverage/process-bundle/issues/129) Remove wrong replace configuration on composer.json. Add missing suggest
32+
* Miscellaneous fixes, show full diff : https://github.com/cleverage/process-bundle/compare/v4.0.0-rc2...v4.0.0
33+
34+
v4.0-RC2
35+
------
36+
37+
## BC breaks
38+
39+
* Bump php version to >=8.2
40+
* Bump symfony version to ^6.4|^7.1
41+
42+
### Fixes
43+
44+
* Miscellaneous fixes, show full diff : https://github.com/cleverage/process-bundle/compare/v4.0.0-rc1...v4.0.0-rc2
45+
46+
v4.0-RC1
47+
------
48+
49+
## BC breaks
50+
51+
* Bump php version to >=8.1
52+
* Bump symfony version to ^6.3
53+
54+
## Changes
55+
* Add some phpunit tests
56+
* Apply Rector & Phpstan
57+
* Add StopwatchTask
58+
* Change directory structure. Move Symfony code to /src, documentation to /doc, and tests to /tests
59+
60+
### Fixes
61+
62+
* Miscellaneous fixes, show full diff : https://github.com/cleverage/process-bundle/compare/v3.2.9...v4.0.0-rc1
63+
64+
v3.2.9
65+
------
66+
67+
### Fixes
68+
69+
https://github.com/cleverage/process-bundle/compare/v3.2.8...v3.2.9
70+
171
v3.2.8
272
------
373

CONTRIBUTING.md

+38-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,44 @@
11
Contributing
22
============
33

4-
Every contributions are welcomed. This bundle aims to provide a standalone set of generic component.
5-
If a contribution is too specific or requires dependencies, it might be put in a separated sub-bundle.
4+
First of all, **thank you** for contributing, **you are awesome**!
65

7-
Ideally every PR should contain documentation and unit test updates.
6+
Here are a few rules to follow in order to ease code reviews, and discussions before
7+
maintainers accept and merge your work.
8+
9+
You MUST run the quality & test suites.
10+
11+
You SHOULD write (or update) unit tests.
12+
13+
You SHOULD write documentation.
14+
15+
Please, write [commit messages that make sense](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
16+
and [rebase your branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) before submitting your Pull Request.
17+
18+
One may ask you to [squash your commits](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)
19+
too. This is used to "clean" your Pull Request before merging it (we don't want
20+
commits such as `fix tests`, `fix 2`, `fix 3`, etc.).
21+
22+
Thank you!
23+
24+
## Running the quality & test suites
25+
26+
Tests suite uses Docker environments in order to be idempotent to OS's. More than this
27+
PHP version is written inside the Dockerfile; this assures to test the bundle with
28+
the same resources. No need to have PHP installed.
29+
30+
You only need Docker set it up.
31+
32+
To allow testing environments more smooth we implemented **Makefile**.
33+
You have two commands available:
34+
35+
```bash
36+
make quality
37+
```
38+
39+
```bash
40+
make tests
41+
```
842

943
## Deprecations notices
1044

@@ -14,5 +48,5 @@ When a feature should be deprecated, or when you have a breaking change for a fu
1448
* Trigger a deprecation error: `@trigger_error('This feature will be deprecated in v4.0', E_USER_DEPRECATED);`
1549

1650
You can check which deprecation notice is triggered in tests
17-
* `make shell`
51+
* `make bash`
1852
* `SYMFONY_DEPRECATIONS_HELPER=0 ./vendor/bin/phpunit`

0 commit comments

Comments
 (0)