Conversation
✅ Deploy Preview for selfoss ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
So that we do not have to do the bump at the same time minimum version is raised.
We want to use Tracy debugger, which requires PHP 8.2. This will also allow us to use enumerations, readonly properties, fibers, never return type and first-class callable syntax, among other things. https://www.php.net/releases/8_1_0.php And while we usually follow Debian PHP support, we already dropped Debian 11 Bullseye early in 0932317. Debian 12 Bookworm contains PHP 8.2. https://www.debian.org/releases/ https://wiki.debian.org/PHP But let’s upgrade gradually.
Introduced in PHP 8.1: https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.core.callable-syntax Performed using the following Rector rules: - Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector - Rector\CodingStyle\Rector\FuncCall\ClosureFromCallableToFirstClassCallableRector - Rector\CodingStyle\Rector\FuncCall\FunctionFirstClassCallableRector - Rector\CodingStyle\Rector\Closure\ClosureDelegatingCallToFirstClassCallableRector - Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector
Changelogs summary: - symfony/deprecation-contracts updated from v3.0.2 to v3.6.0 minor See changes: symfony/deprecation-contracts@v3.0.2...v3.6.0 Release notes: https://github.com/symfony/deprecation-contracts/releases/tag/v3.6.0 - symfony/options-resolver updated from v6.0.19 to v6.4.30 minor See changes: symfony/options-resolver@v6.0.19...v6.4.30 Release notes: https://github.com/symfony/options-resolver/releases/tag/v6.4.30 - symfony/finder updated from v6.0.19 to v6.4.27 minor See changes: symfony/finder@v6.0.19...v6.4.27 Release notes: https://github.com/symfony/finder/releases/tag/v6.4.27 - symfony/var-exporter updated from v6.0.19 to v6.4.26 minor See changes: symfony/var-exporter@v6.0.19...v6.4.26 Release notes: https://github.com/symfony/var-exporter/releases/tag/v6.4.26 - symfony/service-contracts updated from v3.0.2 to v3.6.1 minor See changes: symfony/service-contracts@v3.0.2...v3.6.1 Release notes: https://github.com/symfony/service-contracts/releases/tag/v3.6.1 - symfony/cache-contracts updated from v3.0.2 to v3.6.0 minor See changes: symfony/cache-contracts@v3.0.2...v3.6.0 Release notes: https://github.com/symfony/cache-contracts/releases/tag/v3.6.0 - symfony/cache updated from v6.0.19 to v6.4.30 minor See changes: symfony/cache@v6.0.19...v6.4.30 Release notes: https://github.com/symfony/cache/releases/tag/v6.4.30 - symfony/phpunit-bridge updated from v7.3.4 to v7.4.0 minor See changes: symfony/phpunit-bridge@v7.3.4...v7.4.0 Release notes: https://github.com/symfony/phpunit-bridge/releases/tag/v7.4.0 - symfony/phpunit-bridge updated from v7.4.0 to v8.0.0 major See changes: symfony/phpunit-bridge@v7.4.0...v8.0.0 Release notes: https://github.com/symfony/phpunit-bridge/releases/tag/v8.0.0
We want to use Tracy debugger. This will also allow us to use readonly classes, among other things. https://www.php.net/releases/8_2_0.php And while we usually follow Debian PHP support, we already dropped Debian 11 Bullseye early in 0932317. Debian 12 Bookworm contains PHP 8.2. https://www.debian.org/releases/ https://wiki.debian.org/PHP
Changelogs summary: - symfony/options-resolver updated from v6.4.30 to v7.4.0 major See changes: symfony/options-resolver@v6.4.30...v7.4.0 Release notes: https://github.com/symfony/options-resolver/releases/tag/v7.4.0 - symfony/finder updated from v6.4.27 to v7.4.0 major See changes: symfony/finder@v6.4.27...v7.4.0 Release notes: https://github.com/symfony/finder/releases/tag/v7.4.0 - symfony/var-exporter updated from v6.4.26 to v7.4.0 major See changes: symfony/var-exporter@v6.4.26...v7.4.0 Release notes: https://github.com/symfony/var-exporter/releases/tag/v7.4.0 - symfony/cache updated from v6.4.30 to v7.4.1 major See changes: symfony/cache@v6.4.30...v7.4.1 Release notes: https://github.com/symfony/cache/releases/tag/v7.4.1
These would be changed by `Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector` after I mark the classes `final`. Without `final`, Rector considers `void` intentional: https://github.com/rectorphp/rector/blob/d0924cecd248c43fe2726fb4b8fb85a9ff18037e/rules/TypeDeclaration/NodeManipulator/AddNeverReturnType.php#L87-L88
Composition over inheritance as a best practice we should strive to follow: https://en.wikipedia.org/wiki/Composition_over_inheritance It should be fine to do this for controllers and daos since those are entirely internal. There is a slight chance that someone is extending one of the helpers in their spouts but I have not seen that on GitHub so I consider disallowing that acceptable. We will still keep the following non-final: - `daos\mysql\{Items,Sources,Statements,Tags}` because we were too lazy to follow the best practice there. - `helpers\WebClient` because we mock it in tests. - `spouts\spout` and its children because it would be too much of a BC break. Let’s use search and replace and manually skip those that we do not want to finalize.
Using `Rector\Php81\Rector\Property\ReadOnlyPropertyRector` and `Rector\Php82\Rector\Class_\ReadOnlyClassRector`. All controllers should be readonly. `Tags` and `Opml\Import` are an exception, for now, as they are doing weird stateful things. Ideally, spouts and helpers would be too but there are some backwards compatibility concerns.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want to use Tracy debugger, which requires PHP 8.2.
This will also allow us to use enumerations, readonly properties, fibers, never return type and first-class callable syntax, among other things.
https://www.php.net/releases/8_1_0.php
And while we usually follow Debian PHP support, we already dropped Debian 11 Bullseye early in 0932317.
Debian 12 Bookworm contains PHP 8.2.
https://www.debian.org/releases/
https://wiki.debian.org/PHP