]> granicus.if.org Git - graphviz/commit
remove explicit support for PHP5 SWIG bindings in the Autotools build system
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 4 Oct 2021 23:47:24 +0000 (16:47 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 8 Oct 2021 00:13:27 +0000 (17:13 -0700)
commit1cc64ae69a40e54de13fe9d6430025059b12e54b
tree2b476cfece09e023f72d8c4fc6804d6b05887ee3
parent9434e2ad65de6981faa9ca14b450341ad69179f7
remove explicit support for PHP5 SWIG bindings in the Autotools build system

Older versions of SWIG can generate bindings for a variety of PHP versions.
Periodically SWIG bumps the version of PHP targeted by the default flag,
`-php`:¹

  SWIG version       `-php` effect   PHP5 support?   PHP7 support?
  ================================================================
  <1.3.26            `-php4`         no              no
  ≥1.3.26, <1.3.37   `-php4`         yes             no
  ≥1.3.37, <3.0.11   `-php5`         yes             no
  ≥3.0.11, <4.0.0    `-php5`         yes             yes
  ≥4.0.0             `-php7`         yes             yes

This commit changes the behavior under the Autotools build system:

  SWIG version       old behavior     new behavior
  ================================================
  <1.3.26            target PHP4  ==  target PHP4
  ≥1.3.26, <1.3.37   target PHP5  →   target PHP4
  ≥1.3.37, <3.0.11   target PHP5  ==  target PHP5
  ≥3.0.11, <4.0.0    target PHP7  ==  target PHP7
  ≥4.0.0             target PHP7  ==  target PHP7

It seems reasonable to consider the first three rows of the above table
irrelevant. The last version of PHP5, 5.6, was EOLed on 2018-12-31,² so any
users in rows 1-3 of the table have been unsupported for some time. In practice,
only users in row 2 are affected by this change, who are using a version of SWIG
released prior to 2009-01-12.³

In future, it may make sense to drop build system support for the `-php` flag
altogether and *only* support `-php7`, given that using `-php` on an older
version of SWIG that defaults to PHP5 probably produces uncompilable code
anyway.

¹ http://www.swig.org/Doc4.0/Php.html
² https://www.php.net/eol.php
³ https://github.com/swig/swig/releases
CHANGELOG.md
configure.ac