Wikimate icon indicating copy to clipboard operation
Wikimate copied to clipboard

Explicitly declare supported PHP versions

Open waldyrious opened this issue 2 years ago • 5 comments

In this edit to the Wikipedia:PHP bot framework table page, it was pointed out that while we purportedly support PHP v5.3+, there are no guarantees of the upper bound of that range specification. We should encode this explicitly. That was already done in that table, but the information should be included in this repository.

If that is something that, say, composer.json, or some other metadata file, supports, then we should add the info there; otherwise, we should expand the information in the README from "It requires PHP v5.3 or newer" to something indicating the upper bound we have tested Wikimate to work with.

~~That said, I suspect PHP version upgrades might retain backward compatibility with older code, which would make such an explicit upper bound redundant (though maybe still worth indicating). Do you know if that's the case, @Xymph?~~ Edit: Nevermind, I didn't think about language deprecations.

waldyrious avatar Jul 31 '23 07:07 waldyrious

/cc @NovemLinguae :wave:

waldyrious avatar Jul 31 '23 07:07 waldyrious

Thanks for the ping. Do any of the maintainers use this on Toolforge? If so and you've found it to be free of PHP errors and exceptions, maybe check what version of PHP your Toolforge is running, then add that to the table. For example, PHP 5.3 can be changed to PHP 5.3, 7.4

The motivation for my edit was avoiding unmaintained libraries from claiming to be compatible with the latest versions of PHP, when a deprecation or something could break it. Hope this helps.

NovemLinguae avatar Jul 31 '23 07:07 NovemLinguae

Not familiar with Toolforge. I started working with and developing Wikimate with my home system still on v5.6, and continued through 7.2/7.4 and now 8.2. The code uses no language constructs introduced in later versions, and I believe also no constructs deprecated since earlier versions. Hence the plus in v5.3+ actually applies.

But of course, automated testing is better than one developer's limited experience. :smiley:

Xymph avatar Jul 31 '23 09:07 Xymph

Hence the plus in v5.3+ actually applies.

That confirms what I had in mind. Can you address the second paragraph in the opening comment above? I.e. what do you think would be the best way to indicate this within the project itself?

waldyrious avatar Jul 31 '23 09:07 waldyrious

That confirms what I had in mind. Can you address the second paragraph in the opening comment above? I.e. what do you think would be the best way to indicate this within the project itself?

Not familiar (enough) with composer or other GitHub metafiles to propose something there. I don't have any better idea than perhaps to more explicitly define the range of versions in the README.

Xymph avatar Jul 31 '23 09:07 Xymph