swagger-php
swagger-php copied to clipboard
[v6] Bump PHP deps to 8.1 (or 8.2?)
Just a place holder and reminder.
Affected user (going to PHP 8.1): v5 -> v6 : 1.7% v4 -> v6 : 5.8%
Affected user (going to PHP 8.2): v5 -> v6 : 6.8% v4 -> v6 : 18.6%
- Bump deps to PHP 8.1
- Refactor
Utilclass into one/more non-static classes- FinderFactory
::finder() - Encoder
refEncode(),refDecode() - Merge
shorten()into a new/simpler logger?
- FinderFactory
- #1678
- #1162
- ~~remove
Generator::getDefaultConfig()~~ - remove other deprecated elements
- deprecate
Generator::scanmethod
I think this can safely be done in v5 since 8.0 and lower is already deprecated
It is, but we are taking things slowly. PHP 7.4 -> PHP 8.0 is still used by ~8% of users of v4.
I would think v6 with min PHP 8.1 will be coming around the middle of 2025.
Having second thoughts about perhaps going to PHP 8.2 directly after all. The latest stats show a lot less impact and seeing that PHP 8.5 will be out soon it feels reasonable.
The types refactor will still land on [v5], so I would think that is going to be the only big change in the near future....
Thoughts?
Having second thoughts about perhaps going to PHP 8.2 directly after all. The latest stats show a lot less impact and seeing that PHP 8.5 will be out soon it feels reasonable.
Maybe you can consider if are you planning on using specific features released in PHP 8.2? That could maybe help make a decision on which version you want.
Back when I was working on version 5 of https://github.com/nelmio/NelmioApiDocBundle I decided to go for 8.1 as my minimum because of the new features that I wanted to use:
- nested attributes (to allow getting rid of https://github.com/doctrine/annotations)
- enums
PHP 8.2 didn't really bring me any features or direct bug fixes that I would want/need to use, so in my opinion it would have brought more harm than good (by making it easier for users to upgrade).
❤️
Thanks for the feedback - nice to know that I am not (always) just talking to myself here :)
I guess dabbling with type-info makes you itch to be able to require it rather than recommend ;)
I think I'll follow you reasoning and stick with 8.1 for now. There isn't anything that would life much easier in 8.2. I guess 8.2+ would be also the time for other bigger changes - dropping annotation support for good, for example. However, that is a lot more than I am willing to consider ATM.
I guess dabbling with type-info makes you itch to be able to require it rather than recommend ;)
That could be a valid reason aswell for php 8.2 haha. I also wanted to make it a hard dependency for the Nelmio bundle, but I also just now ran into the issue that it won't work with PHP 8.1 https://github.com/nelmio/NelmioApiDocBundle/pull/2610 ☹️
Update: After some research and thinking, I will probably drop support for 8.1 in favor of actively supporting symfony/type-info
https://github.com/nelmio/NelmioApiDocBundle/pull/2611
Good point. For v5 users there is not a lot of impact and for lower versions there is no difference anyway. It would be nice to go to 8.2, in particular since I do not have the resources to maintain many different versions... Kinda sold on this now :)
Cut a 5.x branch and did a lot more cleanup on the v6 branch. Going to merge soon, so master will be 6.x soon :)
Hope there will be people testing. Wonder if it is worth creating some RC releases first...