-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from cleverage/prepare-release
Prepare release v2.0
- Loading branch information
Showing
41 changed files
with
1,149 additions
and
626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-rest-process-bundle | ||
|
||
services: | ||
php: | ||
build: | ||
context: php | ||
args: | ||
<<: *build-args | ||
volumes: | ||
- ../:/var/www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/rest-process-bundle](https://github.com/cleverage/rest-process-bundle) : ${{ steps.get_tag.outputs.TAG }} has been released" | ||
url: ${{ secrets.CLEVER_AGE_ROCKET_CHAT_WEBOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
/composer.lock | ||
/vendor | ||
.env | ||
.idea | ||
/phpunit.xml | ||
.phpunit.result.cache | ||
.phpunit.cache | ||
.php-cs-fixer.cache | ||
coverage-report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the CleverAge/RestProcessBundle package. | ||
* | ||
* Copyright (c) Clever-Age | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
if (!file_exists(__DIR__.'/src')) { | ||
exit(0); | ||
} | ||
|
||
$fileHeaderComment = <<<'EOF' | ||
This file is part of the CleverAge/RestProcessBundle package. | ||
Copyright (c) Clever-Age | ||
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, | ||
'protected_to_private' => false, | ||
'native_constant_invocation' => ['strict' => false], | ||
'header_comment' => ['header' => $fileHeaderComment], | ||
'modernize_strpos' => true, | ||
'get_class_to_class_keyword' => true, | ||
]) | ||
->setRiskyAllowed(true) | ||
->setFinder( | ||
(new PhpCsFixer\Finder()) | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/tests') | ||
->append([__FILE__]) | ||
) | ||
->setCacheFile('.php-cs-fixer.cache') | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
v2.0 | ||
------ | ||
|
||
## BC breaks | ||
|
||
* [#3](https://github.com/cleverage/rest-process-bundle/issues/3) Replace `nategood/httpful` dependency by `symfony/http-client` | ||
* [#3](https://github.com/cleverage/rest-process-bundle/issues/5) Update Tasks for "symfony/http-client": "^6.4|^7.1" | ||
* [#4](https://github.com/cleverage/rest-process-bundle/issues/4) 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_rest_process` | ||
* RequestTask : `query_parameters` option is deprecated, use `data` instead | ||
* Remove RequestTransformer, use RequestTask instead. | ||
|
||
### Changes | ||
|
||
* [#1](https://github.com/cleverage/rest-process-bundle/issues/1) Add Makefile & .docker for local standalone usage | ||
* [#1](https://github.com/cleverage/rest-process-bundle/issues/1) Add rector, phpstan & php-cs-fixer configurations & apply it | ||
* [#2](https://github.com/cleverage/rest-process-bundle/issues/2) Remove `sidus/base-bundle` dependency | ||
|
||
### Fixes | ||
|
||
v1.0.4 | ||
------ | ||
|
||
### Changes | ||
|
||
* Fixed dependencies after removing sidus/base-bundle from the base process bundle | ||
|
||
v1.0.3 | ||
------ | ||
|
||
### Changes | ||
|
||
* Minor refactoring in RequestTask to allow override of options more easily | ||
|
||
v1.0.2 | ||
------ | ||
|
||
### Fixes | ||
|
||
* Fixing trailing '?'/'&' in request uri | ||
|
||
v1.0.1 | ||
------ | ||
|
||
### Changes | ||
|
||
* Adding debug information in RequestTask | ||
|
||
v1.0.0 | ||
------ | ||
|
||
* Initial release |
Oops, something went wrong.