Skip to content

Commit 4d1a331

Browse files
Merge pull request #8 from cleverage/prepare-release
Prepare release v2.0
2 parents 8b31587 + 4bf118a commit 4d1a331

Some content is hidden

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

51 files changed

+1230
-333
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-doctrine-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

.github/ISSUE_TEMPLATE.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Description
2+
3+
<!-- Please describe the issue here -->
4+
5+
## Requirements
6+
7+
* Documentation updates
8+
- [ ] Reference
9+
- [ ] Changelog
10+
* [ ] Unit tests
11+
12+
## Breaking changes
13+
14+
<!-- Please list here every breaking changes this might induce with minor/major labels -->

.github/PULL_REQUEST_TEMPLATE.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Description
2+
3+
<!-- Please describe the PR purpose, with references to the issues -->
4+
5+
## Requirements
6+
7+
* Documentation updates
8+
- [ ] Reference
9+
- [ ] Changelog
10+
* [ ] Unit tests
11+
12+
## Breaking changes
13+
14+
<!-- Please list here every breaking changes this PR might induce with minor/major labels -->

.github/workflows/notifications.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Rocket chat notifications
2+
3+
# Controls when the action will run.
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
notification:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Get the tag short reference
15+
id: get_tag
16+
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
17+
18+
- name: Rocket.Chat Notification
19+
uses: madalozzo/Rocket.Chat.GitHub.Action.Notification@master
20+
with:
21+
type: success
22+
job_name: "[cleverage/doctrine-process-bundle](https://github.com/cleverage/doctrine-process-bundle) : ${{ steps.get_tag.outputs.TAG }} has been released"
23+
url: ${{ secrets.CLEVER_AGE_ROCKET_CHAT_WEBOOK_URL }}

.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

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/composer.lock
22
/vendor
3+
.env
4+
.idea
5+
/phpunit.xml
6+
.phpunit.result.cache
7+
.phpunit.cache
38
.php-cs-fixer.cache
4-
.idea
9+
coverage-report

.php-cs-fixer.dist.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the CleverAge/DoctrineProcessBundle package.
55
*
6-
* Copyright (c) 2017-2023 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,30 +14,34 @@
1414
}
1515

1616
$fileHeaderComment = <<<'EOF'
17-
This file is part of the CleverAge/DoctrineProcessBundle package.
17+
This file is part of the CleverAge/DoctrineProcessBundle package.
1818
19-
Copyright (c) 2017-2023 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,
32+
'@DoctrineAnnotation' => true,
3133
'protected_to_private' => false,
3234
'native_constant_invocation' => ['strict' => false],
3335
'header_comment' => ['header' => $fileHeaderComment],
3436
'modernize_strpos' => true,
3537
'get_class_to_class_keyword' => true,
38+
'phpdoc_to_comment' => ['ignored_tags' => ['var']], // Fix issue on initializeStatement method $params variable
3639
])
3740
->setRiskyAllowed(true)
3841
->setFinder(
3942
(new PhpCsFixer\Finder())
4043
->in(__DIR__.'/src')
44+
->in(__DIR__.'/tests')
4145
->append([__FILE__])
4246
)
4347
->setCacheFile('.php-cs-fixer.cache')

CHANGELOG.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
v2.0
2+
------
3+
4+
## BC breaks
5+
6+
* [#6](https://github.com/cleverage/doctrine-process-bundle/issues/6) Update services according to Symfony best practices.
7+
Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
8+
Services must be prefixed with the bundle alias instead of using fully qualified class names => `cleverage_doctrine_process`
9+
* [#5](https://github.com/cleverage/doctrine-process-bundle/issues/5) Bump "doctrine/doctrine-bundle": "^2.5" according to Symfony versions supported by `cleverage/process-bundle`
10+
* [#4](https://github.com/cleverage/doctrine-process-bundle/issues/4) Allow installing "doctrine/orm": ^3.0 using at least require "doctrine/orm": "^2.9 || ^3.0".
11+
Forbid "doctrine/dbal" 4 for now (as on "symfony/orm-pack" - symfony/orm-pack@266bae0#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R7 ) using "doctrine/dbal": "^2.9 || ^3.0".
12+
Add "doctrine/common": "^3.0" and "doctrine/doctrine-migrations-bundle": "^3.2"
13+
* [#4](https://github.com/cleverage/doctrine-process-bundle/issues/4) Remove DoctrineWriterTask option `global_flush`
14+
due to removing [partially flush ability](https://github.com/doctrine/orm/blob/3.0.x/UPGRADE.md#bc-break-removed-ability-to-partially-flushcommit-entity-manager-and-unit-of-work) on `doctrine/orm` 3.*
15+
* [#12](https://github.com/cleverage/doctrine-process-bundle/issues/12) Remove PurgeDoctrineCacheTask
16+
17+
18+
### Changes
19+
20+
* [#3](https://github.com/cleverage/doctrine-process-bundle/issues/3) Add Makefile & .docker for local standalone usage
21+
* [#3](https://github.com/cleverage/doctrine-process-bundle/issues/3) Add rector, phpstan & php-cs-fixer configurations & apply it
22+
23+
### Fixes
24+
25+
v2.0-RC1
26+
------
27+
28+
### Changes
29+
30+
* Miscellaneous changes, show full diff : https://github.com/cleverage/doctrine-process-bundle/compare/v1.0.6...v2.0-RC1
31+
32+
v1.0.6
33+
------
34+
35+
### Changes
36+
37+
* Removing `sidus/base-bundle` dependency
38+
39+
### Fixes
40+
41+
* Fixing services.yaml after refactoring
42+
43+
v1.0.5
44+
------
45+
46+
### Changes
47+
48+
* Fixed dependencies after removing `sidus/base-bundle` from the base process bundle
49+
50+
v1.0.4
51+
------
52+
53+
### Fixes
54+
55+
* Fixed OptionsResolver needing "null" instead of "NULL"
56+
* Fixed backward compatibility break after protected function removal
57+
58+
v1.0.3
59+
------
60+
61+
### Fixes
62+
63+
* Fixing update task and allowing to input params properly to both reader and updater tasks
64+
65+
v1.0.2
66+
------
67+
68+
### Changes
69+
70+
* Add DoctrineRefresherTask
71+
72+
v1.0.1
73+
------
74+
75+
### Changes
76+
77+
* Add "doctrine/doctrine-bundle": "~2.0" dependency
78+
79+
v1.0.0
80+
------
81+
82+
* Initial release

0 commit comments

Comments
 (0)