Re: [PEAR] Port Image_Color and Image_Canvas to PHP8

[email protected] (Mathieu Dubois) Fri, 15 Nov 2024 08:30:16 +0100
Newsgroups php.pear.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------JrujE6cjTHqUswfRrC9l8Imo
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Dear list,

As I said on another thread about HTML_Template_IT, I haven't received 
an answer about this. Anybody?

Thanks in advance,
Mathieu

Le 05/10/2024 à 03:13, Mathieu Dubois a écrit :
>
> Dear list,
>
> I took a bit of time to work on Image_Canvas (it was not without a bit 
> of pain):
>
>   * PR #6 (https://github.com/pear/Image_Canvas/pull/6) modernize the
>     scripts and add GitHub actions for the current code.
>   * Building on that, I was able to port to PHP 8. I will open the PR
>     after #6 is merged.
>
> There are 3 caveats however:
>
>   * PostScript output is not tested yet because I have some font issue
>     and you need the PS extension
>     (https://www.php.net/manual/en/book.ps.php). It should be doable.
>   * PDF output is not tested because it uses the old PDFlib extension.
>     This code needs to be re-done completely (probably based on FPDF).
>   * As we require a version of Image_Color compatible with PHP 8, I
>     use a branch in my fork (see composer.json). Of course, I will
>     update that.
>
> Mathieu
>
> Le 02/10/2024 à 02:14, Mathieu Dubois a écrit :
>> Dear list,
>>
>> I need to (try to) port Image_Color and Image_Canvas (which require 
>> Image_Color) to PHP 8.
>>
>> For Image_Color this is not too hard. As I did for HTML_Template_IT, 
>> the goal is to keep compatibility from PHP 5.6 to PHP 8. The main 
>> challenge is to have CI and be able run the test s for a large span 
>> of PHP version (as PHPUnit changed a lot in between). I opened a 
>> first PR (https://github.com/pear/Image_Color/pull/2) to convert the 
>> test suite to PHPUnitPolyFill which is very handy. for such cases
>>
>> I have 2 branches based on that to add GitHub actions (for CI) and to 
>> port the code to PHP 8 (I will open the PR after).
>>
>> I haven't looked much to Image_Canvas for now but as the tests don't 
>> use PHPUnit (it's simple scripts), it might be a bit simpler.
>>
>> As before, I would appreciate any idea on that.
>>
>> Thanks in advance,
>> Mathieu
>>
> -- 
> Mathieu Dubois - IR - UMR 8030 équipe LABGeM
> CEA - Genoscope. 2 rue Gaston Crémieux. 91057 Evry Cedex France.
> Bureau B07
> +33 1 60 87 53 35

-- 
Mathieu Dubois - IR - UMR 8030 équipe LABGeM
CEA - Genoscope. 2 rue Gaston Crémieux. 91057 Evry Cedex France.
Bureau B07
+33 1 60 87 53 35

--------------JrujE6cjTHqUswfRrC9l8Imo
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Dear list,</p>
    <p>As I said on another thread about HTML_Template_IT, I haven't
      received an answer about this. Anybody?<br>
    </p>
    <p>Thanks in advance,<br>
      Mathieu<br>
    </p>
    <div class="moz-cite-prefix">Le 05/10/2024 à 03:13, Mathieu Dubois a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Dear list,</p>
      <p>I took a bit of time to work on <tt>Image_Canvas</tt> (it was
        not without a bit of pain):</p>
      <ul>
        <li>PR #6 (<a class="moz-txt-link-freetext"
            href="https://github.com/pear/Image_Canvas/pull/6"
            moz-do-not-send="true">https://github.com/pear/Image_Canvas/pull/6</a>)
          modernize the scripts and add GitHub actions for the current
          code.</li>
        <li>Building on that, I was able to port to PHP 8. I will open
          the PR after #6 is merged.<br>
        </li>
      </ul>
      <p>There are 3 caveats however:</p>
      <ul>
        <li>PostScript output is not tested yet because I have some font
          issue and you need the PS extension (<a
            class="moz-txt-link-freetext"
            href="https://www.php.net/manual/en/book.ps.php"
            moz-do-not-send="true">https://www.php.net/manual/en/book.ps.php</a>).
          It should be doable.<br>
        </li>
        <li>PDF output is not tested because it uses the old PDFlib
          extension. This code needs to be re-done completely (probably
          based on FPDF).</li>
        <li>As we require a version of <tt>Image_Color</tt> compatible
          with PHP 8, I use a branch in my fork (see <tt>composer.json</tt>).
          Of course, I will update that.<br>
        </li>
      </ul>
      <p>Mathieu<br>
      </p>
      <div class="moz-cite-prefix">Le 02/10/2024 à 02:14, Mathieu Dubois
        a écrit :<br>
      </div>
      <blockquote type="cite"
        cite="mid:[email protected]">Dear
        list, <br>
        <br>
        I need to (try to) port Image_Color and Image_Canvas (which
        require Image_Color) to PHP 8. <br>
        <br>
        For Image_Color this is not too hard. As I did for
        HTML_Template_IT, the goal is to keep compatibility from PHP 5.6
        to PHP 8. The main challenge is to have CI and be able run the
        test s for a large span of PHP version (as PHPUnit changed a lot
        in between). I opened a first PR (<a
          class="moz-txt-link-freetext"
          href="https://github.com/pear/Image_Color/pull/2"
          moz-do-not-send="true">https://github.com/pear/Image_Color/pull/2</a>)
        to convert the test suite to PHPUnitPolyFill which is very
        handy. for such cases <br>
        <br>
        I have 2 branches based on that to add GitHub actions (for CI)
        and to port the code to PHP 8 (I will open the PR after). <br>
        <br>
        I haven't looked much to Image_Canvas for now but as the tests
        don't use PHPUnit (it's simple scripts), it might be a bit
        simpler. <br>
        <br>
        As before, I would appreciate any idea on that. <br>
        <br>
        Thanks in advance, <br>
        Mathieu <br>
        <br>
      </blockquote>
      <pre class="moz-signature" cols="72">-- 
Mathieu Dubois - IR - UMR 8030 équipe LABGeM
CEA - Genoscope. 2 rue Gaston Crémieux. 91057 Evry Cedex France.
Bureau B07
+33 1 60 87 53 35</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Mathieu Dubois - IR - UMR 8030 équipe LABGeM
CEA - Genoscope. 2 rue Gaston Crémieux. 91057 Evry Cedex France.
Bureau B07
+33 1 60 87 53 35</pre>
  </body>
</html>

--------------JrujE6cjTHqUswfRrC9l8Imo--