Hi Lonny,

On Wed, Jul 23, 2014 at 3:01 AM, Lonny Kapelushnik <lo...@lonnylot.com>
wrote:

> Morning,
>
> I propose deprecating two GD functions: imagettftext and imagettfbbox.
>
> The reasons I would like to deprecate them are:
> 1. Their functionality is a subset of imagefttext and imageftbbox
> 2. The imagettf* functions have the same requirements as the imageft*
> functions
> 3. 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'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:
> 1. Clarity for which PHP functions to use going forward
> 2. Ability to plan a migration to the new PHP functions
> 3. Clarity for which PHP functions to improve in php-src
> 4. 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

Reply via email to