Raise supported PHP version to 8.0 and related updates#25
Raise supported PHP version to 8.0 and related updates#25reedy wants to merge 1 commit intothecodedrift:mainfrom
Conversation
|
Basically zero functional changes... Does help not having to worry about testing on ancient PHP versions... Still supported (by this library): 8.1 - 31 Dec 2025 8.0 - 26 Nov 2023 Dropped: 7.4 - 28 Nov 2022 7.3 - 6 Dec 2021 7.2 - 30 Nov 2020 https://www.php.net/supported-versions.php 8.2 is out of active support (31 Dec 2024), and security support drops on 31 Dec 2026 8.3 is also out of active support (31 Dec 2025), but security support has a bit longer left (31 Dec 2027) |
| * @return HOTPResult[] | ||
| */ | ||
| public static function generateByTimeWindow(string $key, int $window, int $min = -1, int $max = 1, $timestamp = false): array | ||
| public static function generateByTimeWindow(string $key, int $window, int $min = -1, int $max = 1, int|false $timestamp = false): array |
There was a problem hiding this comment.
Quick check. Would this typing change also result in older versions no longer being able to run the library (and would we bump major to do this)?
There was a problem hiding this comment.
So yeah, to the first part.
In theory composer should take notice of that PHP requirement, and wouldn't let it be installed on an incompatible environment. Obviously, if they run it with --ignore-platform-reqs well that's on them!
Regarding the second part, that seems to be a case of "depends who you ask".
Bumping the major definitely makes it easier and cleaner, and I did do that in https://github.com/thecodedrift/hotp-php/releases/tag/v2.0.0 but I haven't looked what else may have changed between that and the previous reelase.
But some people do argue that because of the version checking in composer, it shouldn't install an incompatible version, and we're not actually doing an api breaking change (I think) which would usually necessitate doing a major version bump.
I'm certainly in no rush for this to be merged and/or released, it was double checking if/what could change if we dropped those older PHP versions.
There was a problem hiding this comment.
I think I'm just very used to the node approach to semver, where we bump semver-major whenever we remove engine versions. But, unlike composer, node's engine field is loosely enforced.
I'm comfortable with just bumping minor if the PHP requirement gets enforced.
Fixes #19