Den søn. 6. jun. 2021 kl. 00.09 skrev Ayesh Karunaratne <ayesh@php.watch>: > > Hi Ben, > Thank you for opening this PR and the discussion. With the wide > availability of AVIF/AV1 support in browsers, I think this will fit > nicely. > > We have the Namespaces in Bundled Extensions RFC > (https://wiki.php.net/rfc/namespaces_in_bundled_extensions) passed, so > perhaps, the new functions are probably better in the `Gd` namespace? > This would mean the new functions would be `\Gd\imagecreatefromavif` > and `\Gd\imageavif`. They are inconsistent with the existing functions > of course, but I thought to mention it because it's a recent proposal > and I don't think we added new functions after that RFC. Some examples > are recently renamed PHP classes in IMAP, Pgsql, LDAP, and FTP > extensions to follow this new proposal.
I don't think it makes much sense to do that for a single function, because it makes the API cluttered, as why would I call `\Gd\imagecreatefromavif` when everything else is in the global namespace? That is a poor design, while I understand the intentions behind it is good. I think this needs to be well thoughtout in a topic on its own rather than off topicing it here, so I will leave it at that. Overall, +1 for adding this -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php