Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Latest
------

### Changes
* [#35](https://github.com/cleverage/archive-process-bundle/issues/35) Require `symfony/polyfill-php83`, `symfony/polyfill-php84` and `symfony/polyfill-php85` ([cleverage/process-bundle#299](https://github.com/cleverage/process-bundle/issues/299)): the functions of PHP 8.3 to 8.5 can be used while supporting PHP 8.2. Rector targets PHP 8.2 (`withPhpVersion()`, `withPhpSets()` read from `composer.json`) and applies the rules using a newer function when its polyfill is required (no change in the current code).
* [#31](https://github.com/cleverage/archive-process-bundle/issues/31) Give a code to the tasks ([cleverage/process-bundle#91](https://github.com/cleverage/process-bundle/issues/91)): `archive_zip` and `archive_unzip` (`task: archive_zip`, with `cleverage/process-bundle` 5.4 or later, referencing them by `service` being deprecated there). The tasks have their class name as service id; fetching them directly from the service container is deprecated (`container.private`), they will be private in 3.0. The former ids `cleverage_archive_process.task.zip` / `cleverage_archive_process.task.unzip` are deprecated aliases, removed in 3.0. Update documentation, add tests.
* [#29](https://github.com/cleverage/archive-process-bundle/issues/29) CI: test the lowest versions allowed by `composer.json` (`--prefer-lowest`, PHP 8.2).
* [#27](https://github.com/cleverage/archive-process-bundle/issues/27) Add a `.gitattributes`: the development files (`.docker/`, `.github/`, `tests/`, quality tools and PHPUnit configurations, `Makefile`) are no longer part of the archive installed by Composer (`dist`).
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ make quality
make tests
```

## PHP version

The bundle supports PHP 8.2 and later: do not use a syntax introduced by a later version (typed class constants,
property hooks, pipe operator...). The functions of PHP 8.3 to 8.5 (`json_validate()`, `array_find()`, `array_any()`,
`mb_trim()`, `array_first()`...) can be used: they are provided by the required `symfony/polyfill-php83`,
`symfony/polyfill-php84` and `symfony/polyfill-php85` packages on the older versions. Rector (`make quality`) is
configured accordingly.

## Deprecations notices

When a feature should be deprecated, or when you have a breaking change for a future version, please :
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
"symfony/dependency-injection": "^6.4|^7.4|^8",
"symfony/finder": "^6.4|^7.4|^8",
"symfony/http-kernel": "^6.4|^7.4|^8",
"symfony/options-resolver": "^6.4|^7.4|^8"
"symfony/options-resolver": "^6.4|^7.4|^8",
"symfony/polyfill-php83": "^1.33",
"symfony/polyfill-php84": "^1.33",
"symfony/polyfill-php85": "^1.33"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
Expand Down
6 changes: 2 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\ValueObject\PhpVersion;

return RectorConfig::configure()
->withPhpVersion(PhpVersion::PHP_85)
->withPhpVersion(PhpVersion::PHP_82)
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
->withPhpSets(php82: true)
->withPhpSets()
// here we can define what prepared sets of rules will be applied
->withComposerBased(phpunit: true, symfony: true)
->withPreparedSets(deadCode: true, codeQuality: true, symfonyCodeQuality: true)
->withAttributesSets(symfony: true)
->withSets([
LevelSetList::UP_TO_PHP_82,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
])
;
Loading