Morning,
I propose deprecating two GD functions: imagettftext and imagettfbbox.
The reasons I would like to deprecate them are:
- Their functionality is a subset of imagefttext and imageftbbox
- The imagettf* functions have the same requirements as the imageft* functions
- The imagettf* functions parameters are compatible with the imageft* functions parameters
As far as I can tell the original reason for having both functions was because PHP LIBGD is a custom implementation of LIBGD that had additional functionality from the actual LIBGD. While this is still the case it seems that now the required functions (gdImageStringFT and gdImageStringFTEx) exist in both libraries.
The only difference between imagettf* and imageft* functions is the imagettf* functions do not provide the optional ‘extrainfo’ parameter
The only step to migrate from the imagettf* functions to imageft* functions is to change the function names from ‘imagettf*’ to ‘imageft*'
I would like to create a timeline to deprecate and remove the imagettf* functions. Providing a timeline will allow for:
- Clarity for which PHP functions to use going forward
- Ability to plan a migration to the new PHP functions
- Clarity for which PHP functions to improve in php-src
- Ability to clean up some of the GD code in php-src
I will hold off on proposing an actual timeline for now.
I can implement any coding changes needed.
Please let me know the general thoughts to deprecating these functions. If the reception is positive I would like to create an RFC to discuss this in full and come up with a timeline.
–––
Hakuna Matata!
Lonny Kapelushnik
https://www.lonnylot.com
732.685.9175
On Tue, Jul 22, 2014 at 12:01 PM, Lonny Kapelushnik lonny@lonnylot.com
wrote:
Morning,
I propose deprecating two GD functions: imagettftext and imagettfbbox.
The reasons I would like to deprecate them are:
- Their functionality is a subset of imagefttext and imageftbbox
- The imagettf* functions have the same requirements as the imageft*
functions- The imagettf* functions parameters are compatible with the imageft*
functions parametersAs far as I can tell the original reason for having both functions was
because PHP LIBGD is a custom implementation of LIBGD that had additional
functionality from the actual LIBGD. While this is still the case it seems
that now the required functions (gdImageStringFT and gdImageStringFTEx)
exist in both libraries.The only difference between imagettf* and imageft* functions is the
imagettf* functions do not provide the optional ‘extrainfo’ parameterThe only step to migrate from the imagettf* functions to imageft*
functions is to change the function names from ‘imagettf*’ to ‘imageft*'I would like to create a timeline to deprecate and remove the imagettf*
functions. Providing a timeline will allow for:
- Clarity for which PHP functions to use going forward
- Ability to plan a migration to the new PHP functions
- Clarity for which PHP functions to improve in php-src
- Ability to clean up some of the GD code in php-src
I will hold off on proposing an actual timeline for now.
I can implement any coding changes needed.
Please let me know the general thoughts to deprecating these functions. If
the reception is positive I would like to create an RFC to discuss this in
full and come up with a timeline.–––
Hakuna Matata!
Lonny Kapelushnik
https://www.lonnylot.com
732.685.9175
You've clearly given this some thought, so my suggestion would be that you
go ahead and create the RFC now. Committing yourself to the idea will
probably make people more likely to invest their time in responding to it.
--Kris
Hi Lonny,
On Wed, Jul 23, 2014 at 3:01 AM, Lonny Kapelushnik lonny@lonnylot.com
wrote:
Morning,
I propose deprecating two GD functions: imagettftext and imagettfbbox.
The reasons I would like to deprecate them are:
- Their functionality is a subset of imagefttext and imageftbbox
- The imagettf* functions have the same requirements as the imageft*
functions- The imagettf* functions parameters are compatible with the imageft*
functions parametersAs far as I can tell the original reason for having both functions was
because PHP LIBGD is a custom implementation of LIBGD that had additional
functionality from the actual LIBGD. While this is still the case it seems
that now the required functions (gdImageStringFT and gdImageStringFTEx)
exist in both libraries.The only difference between imagettf* and imageft* functions is the
imagettf* functions do not provide the optional ‘extrainfo’ parameterThe only step to migrate from the imagettf* functions to imageft*
functions is to change the function names from ‘imagettf*’ to ‘imageft*'
I'm glad to see you've taken the time to write this down after our small
discussion on chat the other day :)
According to the release process, an x+1.0.0 release may break API, so that
would technically mean they can be removed for php.next granted an RFC is
submitted and accepted before then. That said, I didn't see any clear
guidelines as to how deprecation periods should be outlined, so I would
expect some discussions to arise from that ..
I would like to create a timeline to deprecate and remove the imagettf*
functions. Providing a timeline will allow for:
- Clarity for which PHP functions to use going forward
- Ability to plan a migration to the new PHP functions
- Clarity for which PHP functions to improve in php-src
- Ability to clean up some of the GD code in php-src
From what I could tell, the clean up will be relatively small because both
functions already call the same underlying php_image*_common() function.
I will hold off on proposing an actual timeline for now.
I can implement any coding changes needed.
Please let me know the general thoughts to deprecating these functions. If
the reception is positive I would like to create an RFC to discuss this in
full and come up with a timeline.
Personally I think, although the current functions are used a lot more
often (~ 3x based on Google results), the simple fix makes it relatively
easy to port existing code.
From what I could tell you don't have a Wiki account yet, so that would be
the first step :)
–––
Hakuna Matata!
Lonny Kapelushnik
https://www.lonnylot.com
732.685.9175
--
Tjerk
hi,
Morning,
I propose deprecating two GD functions: imagettftext and imagettfbbox.
The reasons I would like to deprecate them are:
- Their functionality is a subset of imagefttext and imageftbbox
- The imagettf* functions have the same requirements as the imageft*
functions- The imagettf* functions parameters are compatible with the imageft*
functions parametersAs far as I can tell the original reason for having both functions was
because PHP LIBGD is a custom implementation of LIBGD that had additional
functionality from the actual LIBGD. While this is still the case it seems
that now the required functions (gdImageStringFT and gdImageStringFTEx)
exist in both libraries.The only difference between imagettf* and imageft* functions is the
imagettf* functions do not provide the optional ‘extrainfo’ parameterThe only step to migrate from the imagettf* functions to imageft* functions
is to change the function names from ‘imagettf*’ to ‘imageft*'I would like to create a timeline to deprecate and remove the imagettf*
functions. Providing a timeline will allow for:
- Clarity for which PHP functions to use going forward
- Ability to plan a migration to the new PHP functions
- Clarity for which PHP functions to improve in php-src
- Ability to clean up some of the GD code in php-src
I will hold off on proposing an actual timeline for now.
I can implement any coding changes needed.
Please let me know the general thoughts to deprecating these functions. If
the reception is positive I would like to create an RFC to discuss this in
full and come up with a timeline.
It is on my list to mark them as deprecated in the documentation. Also
I am not sure it is worth the disagreement for the users to add
notices or even to remove them as they both use the same underlying
code. Basically there is no gain for us to actually remove them but
yet another notice for the users.
Cheers,
Pierre
@pierrejoye | http://www.libgd.org
hi,
Morning,
I propose deprecating two GD functions: imagettftext and imagettfbbox.
The reasons I would like to deprecate them are:
- Their functionality is a subset of imagefttext and imageftbbox
- The imagettf* functions have the same requirements as the imageft*
functions- The imagettf* functions parameters are compatible with the imageft*
functions parameters
As I said on IRC, I think the least invasive action would be to make
them true aliases (so that the ones with less parameters act exactly as
the ones with more) and put that into the docs. This doesn't contradict
future removal.
Greetings,
Florian
Hi all,
I appreciate the immediate feedback in this thread. Given the quick feedback and suggestions I received I wanted to create an RFC to be able to collect everything and move forward. I’ve written it out and properly announced it here.
Lets continue the discussion over there.