Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
de8c42b
#139 Remove unused ecs.php
njoubert-cleverage Oct 16, 2024
1c33118
#140 Move ISSUE_TEMPLATE & PULL_REQUEST_TEMPLATE to proper .github di…
njoubert-cleverage Oct 17, 2024
c725b10
#138 Update README & CONTRIBUTING
njoubert-cleverage Oct 17, 2024
57dd03f
#139 Update Makefile & .docker for local standalone usage
njoubert-cleverage Oct 16, 2024
eae6e14
#139 Update rector configuration & apply it.
njoubert-cleverage Oct 17, 2024
d8eb15f
#139 #130 Update phpstan configuration & apply it :
njoubert-cleverage Oct 17, 2024
29fac79
#139 Update php-cs-fixer configuration & apply it.
njoubert-cleverage Oct 17, 2024
76b5894
#129 Remove wrong replace configuration on composer.json. Add missing…
njoubert-cleverage Oct 16, 2024
8d0da4a
#138 Update CHANGELOG with v3.2.9+ versions
njoubert-cleverage Oct 17, 2024
7248fae
#139 Re-apply php-cs-fixer due to previous merge from v3.2-dev branch
njoubert-cleverage Oct 17, 2024
2a91d78
#140 Fix test github workflow
njoubert-cleverage Oct 17, 2024
f19ca0c
#140 Fix notifications github workflow
njoubert-cleverage Oct 17, 2024
28bfd60
#141 Remove FileFetchTask, use cleverage/flysystem-process-bundle ins…
njoubert-cleverage Oct 17, 2024
b7afaab
#142 Refactor :
njoubert-cleverage Oct 18, 2024
7524cf5
#138 Update README with all missing Tasks & Transformers
njoubert-cleverage Oct 18, 2024
49c24c2
Update CHANGELOG with issue links for v4.0
njoubert-cleverage Oct 18, 2024
bdea763
#148 Update directory structure according to Symfony best practices
njoubert-cleverage Oct 21, 2024
fff486e
#148 Update documentation according to Symfony best practices
njoubert-cleverage Oct 21, 2024
719c9ee
#148 Update services (step 1) according to Symfony best practices
njoubert-cleverage Oct 22, 2024
f1d7670
#147 Add missing dependency on "symfony/dotenv": "^6.4|^7.1" and symf…
njoubert-cleverage Oct 22, 2024
dea1bef
#147 Replace `Symfony\Component\Form\Exception\InvalidConfigurationEx…
njoubert-cleverage Oct 22, 2024
45903b0
#147 Remove dependencies on `symfony/form`, `symfony/messenger` & `sy…
njoubert-cleverage Oct 22, 2024
7722734
#148 Fix services prefix using cleverage_process instead of process_b…
njoubert-cleverage Oct 22, 2024
0b40728
#146 eav-process-bundle, enqueue-process-bundle, cache-process-bundle…
njoubert-cleverage Oct 22, 2024
249b716
Fix CONTRIBUTING test rule
njoubert-cleverage Oct 23, 2024
8961591
Add missing project name on docker compose.yaml
njoubert-cleverage Oct 23, 2024
daba339
Minor fix on CHANGELOG
njoubert-cleverage Oct 23, 2024
d14e426
Update doc due to new ui repository
njoubert-cleverage Oct 24, 2024
d3fbee1
#147 composer require symfony/monolog-bridge:"^6.4|^7.1"
njoubert-cleverage Oct 29, 2024
c0a352c
#139 Apply <10.0 restriction on phpunit/phpunit since configuration f…
njoubert-cleverage Oct 29, 2024
3901525
#141 Add a default value to the node "default_error_strategy"
xaviermarchegay Nov 5, 2024
7c2329e
#150 Remove CleverAge\ProcessBundle\Task\Debug\MemInfoDumpTask
xaviermarchegay Nov 5, 2024
f2586cb
#145 Add documentation/examples for Basic and debug tasks
xaviermarchegay Nov 5, 2024
0f8042d
Fix Transformer configuration & add missing aliases on monolog handlers
njoubert-cleverage Nov 21, 2024
eec6b0f
cleverage/process-bundle-demo#3 Rename process-bundle-ui-demo to proc…
njoubert-cleverage Nov 22, 2024
c2b0778
Update composer suggest to cleverage/ui-process-bundle
njoubert-cleverage Nov 22, 2024
653a575
[#151] Replace monolog.logger by logger on CleverAge\ProcessBundle\Lo…
clever-age-gtonon Dec 3, 2024
dafe5b3
#145 add TrimTransformer documentation
xaviermarchegay Dec 3, 2024
eb672f2
Merge pull request #152 from cleverage/fix/monolog-bad-channel
njoubert-cleverage Dec 12, 2024
debeec0
#145 Add/Update docs
njoubert-cleverage Dec 12, 2024
e7f865f
Merge pull request #154 from cleverage/doc
njoubert-cleverage Dec 13, 2024
c8ceda6
Replace deprecated phpstan option checkGenericClassInNonGenericObject…
njoubert-cleverage Dec 13, 2024
8ff0a2e
Merge remote-tracking branch 'origin/prepare-release' into prepare-re…
njoubert-cleverage Dec 13, 2024
0d2cc03
#115 Add BC break for new mandatory configuration `default_error_stra…
njoubert-cleverage Dec 16, 2024
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
14 changes: 14 additions & 0 deletions .docker/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
x-build-args: &build-args
UID: "${UID:-1000}"
GID: "${GID:-1000}"

name: cleverage-process-bundle

services:
php:
build:
context: php
args:
<<: *build-args
volumes:
- ../:/var/www
29 changes: 29 additions & 0 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM php:8.2-fpm-alpine

ARG UID
ARG GID

RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
COPY /conf.d/ "$PHP_INI_DIR/conf.d/"

RUN apk update && apk add \
tzdata \
shadow \
nano \
bash \
icu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl opcache \
&& docker-php-ext-enable opcache

RUN ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime \
&& sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Paris/" $PHP_INI_DIR/php.ini

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

RUN usermod -u $UID www-data \
&& groupmod -g $GID www-data

USER www-data:www-data

WORKDIR /var/www
5 changes: 5 additions & 0 deletions .docker/php/conf.d/dev.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
display_errors = 1
error_reporting = E_ALL

opcache.validate_timestamps = 1
opcache.revalidate_freq = 0
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- name: Get the tag short reference
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Rocket.Chat Notification
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@1.1.1
uses: madalozzo/Rocket.Chat.GitHub.Action.Notification@master
with:
type: success
job_name: "[cleverage/process-bundle](https://github.com/cleverage/process-bundle) : ${{ steps.get_tag.outputs.TAG }} has been released"
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Quality

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
uses: ramsey/composer-install@v3
- name: PHPStan
run: vendor/bin/phpstan --no-progress --memory-limit=1G analyse --error-format=github

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
uses: ramsey/composer-install@v3
- name: PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --diff --dry-run --show-progress=none

rector:
name: Rector
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
uses: ramsey/composer-install@v3
- name: Rector
run: vendor/bin/rector --no-progress-bar --dry-run
74 changes: 74 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Test

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
test:
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allowed-to-fail }}
env:
SYMFONY_REQUIRE: ${{matrix.symfony-require}}

strategy:
matrix:
php-version:
- '8.2'
- '8.3'
dependencies: [highest]
allowed-to-fail: [false]
symfony-require: ['']
variant: [normal]
include:
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.1.*
variant: symfony/symfony:"7.1.*"
- php-version: '8.3'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.3'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.1.*
variant: symfony/symfony:"7.1.*"

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2, flex
- name: Add PHPUnit matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install variant
if: matrix.variant != 'normal' && !startsWith(matrix.variant, 'symfony/symfony')
run: composer require ${{ matrix.variant }} --no-update
- name: Install Composer dependencies (${{ matrix.dependencies }})
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Run Tests with coverage
run: vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
#- name: Send coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# files: build/logs/clover.xml
14 changes: 8 additions & 6 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the CleverAge/ProcessBundle package.
*
* Copyright (c) 2017-2024 Clever-Age
* Copyright (c) Clever-Age
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -14,17 +14,18 @@
}

$fileHeaderComment = <<<'EOF'
This file is part of the CleverAge/ProcessBundle package.
This file is part of the CleverAge/ProcessBundle package.

Copyright (c) 2017-2024 Clever-Age
Copyright (c) Clever-Age

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;

return (new PhpCsFixer\Config())
->setRules([
'@PHP71Migration' => true,
'@PHP82Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
Expand All @@ -38,6 +39,7 @@
->setFinder(
(new PhpCsFixer\Finder())
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->append([__FILE__])
)
->setCacheFile('.php-cs-fixer.cache')
Expand Down
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
v4.0
------

## BC breaks

* [#142](https://github.com/cleverage/process-bundle/issues/142) Remove FileFetchTask, use `cleverage/flysystem-process-bundle` instead.
* [#142](https://github.com/cleverage/process-bundle/issues/142) YamlReaderTask & YamlWriterTask namespaces changed to `CleverAge\ProcessBundle\Task\File\Yaml`
* [#142](https://github.com/cleverage/process-bundle/issues/142) Array***Transformers namespaces changed to `CleverAge\ProcessBundle\Transformer\Array`
* [#142](https://github.com/cleverage/process-bundle/issues/142) NormalizeTransformer & DenormalizeTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\Serialization`
* [#142](https://github.com/cleverage/process-bundle/issues/142) DateFormatTransformer & DateParserTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\Date`
* [#142](https://github.com/cleverage/process-bundle/issues/142) ExplodeTransformer, HashTransformer, ImplodeTransformer, SlugifyTransformer, SprintfTransformer & TrimTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\String`
* [#142](https://github.com/cleverage/process-bundle/issues/142) InstantiateTransformer, PropertyAccessorTransformer RecursivePropertySetterTransformer namespaces changed to `CleverAge\ProcessBundle\Transformer\Object`
* [#147](https://github.com/cleverage/process-bundle/issues/147) Replace `Symfony\Component\Form\Exception\InvalidConfigurationException` by `Symfony\Component\Config\Definition\Exception\InvalidConfigurationException`
* [#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.
Services must be prefixed with the bundle alias instead of using fully qualified class names => `cleverage_process`
* [#150](https://github.com/cleverage/process-bundle/issues/150) The class `\CleverAge\ProcessBundle\Task\Debug\MemInfoDumpTask` has been deleted without suggested replacement
* [#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)
### Changes

* [#139](https://github.com/cleverage/process-bundle/issues/139) Update Makefile & .docker for local standalone usage
* [#139](https://github.com/cleverage/process-bundle/issues/139) Update rector, phpstan & php-cs-fixer configurations & apply it
* [#141](https://github.com/cleverage/process-bundle/issues/141) `league/flysystem-bundle` is not required anymore
* [#130](https://github.com/cleverage/process-bundle/issues/130) EventDispatcherInterface service declaration breaks dependency injection
* [#147](https://github.com/cleverage/process-bundle/issues/147) Add missing dependencies on `symfony/dotenv` and `symfony/runtime`
* [#147](https://github.com/cleverage/process-bundle/issues/147) Remove dependencies on `symfony/form`, `symfony/messenger` & `symfony/scheduler`
* [#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.
* [#141](https://github.com/cleverage/process-bundle/issues/141) Add a default value to the node "default_error_strategy"

### Fixes

* [#129](https://github.com/cleverage/process-bundle/issues/129) Remove wrong replace configuration on composer.json. Add missing suggest
* Miscellaneous fixes, show full diff : https://github.com/cleverage/process-bundle/compare/v4.0.0-rc2...v4.0.0

v4.0-RC2
------

## BC breaks

* Bump php version to >=8.2
* Bump symfony version to ^6.4|^7.1

### Fixes

* Miscellaneous fixes, show full diff : https://github.com/cleverage/process-bundle/compare/v4.0.0-rc1...v4.0.0-rc2

v4.0-RC1
------

## BC breaks

* Bump php version to >=8.1
* Bump symfony version to ^6.3

## Changes
* Add some phpunit tests
* Apply Rector & Phpstan
* Add StopwatchTask
* Change directory structure. Move Symfony code to /src, documentation to /doc, and tests to /tests

### Fixes

* Miscellaneous fixes, show full diff : https://github.com/cleverage/process-bundle/compare/v3.2.9...v4.0.0-rc1

v3.2.9
------

### Fixes

https://github.com/cleverage/process-bundle/compare/v3.2.8...v3.2.9

v3.2.8
------

Expand Down
42 changes: 38 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
Contributing
============

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

Ideally every PR should contain documentation and unit test updates.
Here are a few rules to follow in order to ease code reviews, and discussions before
maintainers accept and merge your work.

You MUST run the quality & test suites.

You SHOULD write (or update) unit tests.

You SHOULD write documentation.

Please, write [commit messages that make sense](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
and [rebase your branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) before submitting your Pull Request.

One may ask you to [squash your commits](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)
too. This is used to "clean" your Pull Request before merging it (we don't want
commits such as `fix tests`, `fix 2`, `fix 3`, etc.).

Thank you!

## Running the quality & test suites

Tests suite uses Docker environments in order to be idempotent to OS's. More than this
PHP version is written inside the Dockerfile; this assures to test the bundle with
the same resources. No need to have PHP installed.

You only need Docker set it up.

To allow testing environments more smooth we implemented **Makefile**.
You have two commands available:

```bash
make quality
```

```bash
make tests
```

## Deprecations notices

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

You can check which deprecation notice is triggered in tests
* `make shell`
* `make bash`
* `SYMFONY_DEPRECATIONS_HELPER=0 ./vendor/bin/phpunit`
Loading
Loading