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

Prepare release v2.0 #8

Merged
merged 33 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d3ed860
Set dependency "cleverage/process-bundle": "dev-prepare-release"
njoubert-cleverage Oct 21, 2024
7cda8ef
#3 Update README. Add docs, CHANGELOG & CONTRIBUTING.
njoubert-cleverage Oct 23, 2024
5bda802
#3 Add Makefile & .docker for local standalone usage. Update rector, …
njoubert-cleverage Oct 23, 2024
83f39fb
#3 Update directory structure
njoubert-cleverage Oct 23, 2024
64d5462
#3 Apply rector, phpstan & php-cs-fixer
njoubert-cleverage Oct 23, 2024
4ac0464
#6 Update services according to Symfony best practices. Services shou…
njoubert-cleverage Oct 23, 2024
0647542
#5 Bump "doctrine/doctrine-bundle": "^2.5" according to Symfony versi…
njoubert-cleverage Oct 23, 2024
7c796e0
#4 Allow installing "doctrine/orm": ^3.0 using at least require "doct…
njoubert-cleverage Oct 23, 2024
a5acb3b
#4 Remove DoctrineWriterTask option `global_flush` due to removing pa…
njoubert-cleverage Oct 23, 2024
5131156
Minor doc fix
njoubert-cleverage Oct 24, 2024
5fc18e9
#3 Add Doctrine rules on php-cs-fixer & rector
njoubert-cleverage Oct 28, 2024
ed1f2be
#3 Apply <10.0 restriction on phpunit/phpunit since configuration fil…
njoubert-cleverage Oct 29, 2024
44c3561
#9 Aliasing Transformers & Tasks with FQCN to maintain old release co…
njoubert-cleverage Nov 21, 2024
afaa94e
cleverage/process-bundle-demo#3 Rename process-bundle-ui-demo to proc…
njoubert-cleverage Nov 22, 2024
69e457c
#10 replace uniqid with bin2hex(random_bytes(4)) (like Symfony does)
Dec 10, 2024
9c8feb9
phpcs
Dec 10, 2024
3eb7b53
#4 Fix $iterator on DoctrineReaderTask that doesn't work with iterable
njoubert-cleverage Dec 11, 2024
7fb7c40
#12 Delete the PurgeDoctrineCacheTask task
Dec 12, 2024
82fe912
#11 Push to phpstan level 8
Dec 12, 2024
1e00c81
#11 Push to phpstan level 10
njoubert-cleverage Dec 13, 2024
481881f
#12 add BC break
Dec 13, 2024
4cc53e5
#13 add DatabaseReaderTask documentation
Dec 16, 2024
a3dd81c
#13 add DatabaseUpdaterTask documentation
Dec 16, 2024
ab4194c
#13 add ClearEntityManagerTask documentation
Dec 16, 2024
a79f242
#13 add DoctrineBatchWriterTask documentation
Dec 16, 2024
ce20c9e
#13 add DoctrineCleanerTask documentation
Dec 16, 2024
3520d2a
#13 add DoctrineRefresherTask, DoctrineDetacherTask and DoctrineRemov…
Dec 16, 2024
751f49a
#13 add DoctrineReaderTask documentation
Dec 16, 2024
8927ce7
#11 tweak doc
Dec 16, 2024
c9501d3
#11 tweak doc
Dec 16, 2024
51d9bac
#11 tweak doc
Dec 16, 2024
c0a6a14
#11 fix typo
Dec 16, 2024
4bf118a
#7 Bump dependency "cleverage/process-bundle": "^4.0"
njoubert-cleverage Dec 17, 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-doctrine-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
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Description

<!-- Please describe the issue here -->

## Requirements

* Documentation updates
- [ ] Reference
- [ ] Changelog
* [ ] Unit tests

## Breaking changes

<!-- Please list here every breaking changes this might induce with minor/major labels -->
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Description

<!-- Please describe the PR purpose, with references to the issues -->

## Requirements

* Documentation updates
- [ ] Reference
- [ ] Changelog
* [ ] Unit tests

## Breaking changes

<!-- Please list here every breaking changes this PR might induce with minor/major labels -->
23 changes: 23 additions & 0 deletions .github/workflows/notifications.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Rocket chat notifications

# Controls when the action will run.
on:
push:
tags:
- '*'

jobs:
notification:
runs-on: ubuntu-latest

steps:
- name: Get the tag short reference
id: get_tag
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Rocket.Chat Notification
uses: madalozzo/Rocket.Chat.GitHub.Action.Notification@master
with:
type: success
job_name: "[cleverage/doctrine-process-bundle](https://github.com/cleverage/doctrine-process-bundle) : ${{ steps.get_tag.outputs.TAG }} has been released"
url: ${{ secrets.CLEVER_AGE_ROCKET_CHAT_WEBOOK_URL }}
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/composer.lock
/vendor
.env
.idea
/phpunit.xml
.phpunit.result.cache
.phpunit.cache
.php-cs-fixer.cache
.idea
coverage-report
16 changes: 10 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/DoctrineProcessBundle package.
*
* Copyright (c) 2017-2023 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,30 +14,34 @@
}

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

Copyright (c) 2017-2023 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,
'@DoctrineAnnotation' => true,
'protected_to_private' => false,
'native_constant_invocation' => ['strict' => false],
'header_comment' => ['header' => $fileHeaderComment],
'modernize_strpos' => true,
'get_class_to_class_keyword' => true,
'phpdoc_to_comment' => ['ignored_tags' => ['var']], // Fix issue on initializeStatement method $params variable
])
->setRiskyAllowed(true)
->setFinder(
(new PhpCsFixer\Finder())
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->append([__FILE__])
)
->setCacheFile('.php-cs-fixer.cache')
Expand Down
82 changes: 82 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
v2.0
------

## BC breaks

* [#6](https://github.com/cleverage/doctrine-process-bundle/issues/6) Update services 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_doctrine_process`
* [#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`
* [#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".
Forbid "doctrine/dbal" 4 for now (as on "symfony/orm-pack" - symfony/orm-pack@266bae0#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R7 ) using "doctrine/dbal": "^2.9 || ^3.0".
Add "doctrine/common": "^3.0" and "doctrine/doctrine-migrations-bundle": "^3.2"
* [#4](https://github.com/cleverage/doctrine-process-bundle/issues/4) Remove DoctrineWriterTask option `global_flush`
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.*
* [#12](https://github.com/cleverage/doctrine-process-bundle/issues/12) Remove PurgeDoctrineCacheTask


### Changes

* [#3](https://github.com/cleverage/doctrine-process-bundle/issues/3) Add Makefile & .docker for local standalone usage
* [#3](https://github.com/cleverage/doctrine-process-bundle/issues/3) Add rector, phpstan & php-cs-fixer configurations & apply it

### Fixes

v2.0-RC1
------

### Changes

* Miscellaneous changes, show full diff : https://github.com/cleverage/doctrine-process-bundle/compare/v1.0.6...v2.0-RC1

v1.0.6
------

### Changes

* Removing `sidus/base-bundle` dependency

### Fixes

* Fixing services.yaml after refactoring

v1.0.5
------

### Changes

* Fixed dependencies after removing `sidus/base-bundle` from the base process bundle

v1.0.4
------

### Fixes

* Fixed OptionsResolver needing "null" instead of "NULL"
* Fixed backward compatibility break after protected function removal

v1.0.3
------

### Fixes

* Fixing update task and allowing to input params properly to both reader and updater tasks

v1.0.2
------

### Changes

* Add DoctrineRefresherTask

v1.0.1
------

### Changes

* Add "doctrine/doctrine-bundle": "~2.0" dependency

v1.0.0
------

* Initial release
Loading
Loading