Upgrade PHP MapScript support for PHP 8.4 and 8.5#7435
Conversation
# Conflicts: # ci/ubuntu/build.sh
| option(WITH_GIF "Enable GIF support (for PIXMAP loading)" ON) | ||
| option(WITH_PYTHON "Enable Python mapscript support" OFF) | ||
| option(WITH_PHPNG "Enable PHPNG (SWIG) mapscript support" OFF) | ||
| option(WITH_PHPNG "Enable PHPNG (SWIG) mapscript support" ON) |
There was a problem hiding this comment.
i dunno if that's desired, but that's a default change that can have consequences for downstreams/packagers, warrants a note in the changelog if kept
| elif [ ${PHPVersionMinor} -ge 83 ]; then | ||
| cd php && curl -LO https://phar.phpunit.de/phpunit-12.phar | ||
| echo "PHPUnit version" | ||
| php phpunit-12.phar --version |
There was a problem hiding this comment.
Won't phpunit-13.phar and phpunit-12.phar be downloaded if 84?
There was a problem hiding this comment.
@Giacomo92 you have a conflict in this pull request, as last week's changes through #7426 handled PHP 8.4 and 8.5 (in other words, you should remove your proposed changes in build.sh)
jmckenna
left a comment
There was a problem hiding this comment.
@Giacomo92 I think it would be good for you to update the description in this pull request, with the goals of this big pull request. thanks.
| elif [ ${PHPVersionMinor} -ge 83 ]; then | ||
| cd php && curl -LO https://phar.phpunit.de/phpunit-12.phar | ||
| echo "PHPUnit version" | ||
| php phpunit-12.phar --version |
There was a problem hiding this comment.
@Giacomo92 you have a conflict in this pull request, as last week's changes through #7426 handled PHP 8.4 and 8.5 (in other words, you should remove your proposed changes in build.sh)
| option(WITH_GIF "Enable GIF support (for PIXMAP loading)" ON) | ||
| option(WITH_PYTHON "Enable Python mapscript support" OFF) | ||
| option(WITH_PHPNG "Enable PHPNG (SWIG) mapscript support" OFF) | ||
| option(WITH_PHPNG "Enable PHPNG (SWIG) mapscript support" ON) |
| if(NOT PHP_INCLUDE_PATH) | ||
| message(WARNING "PHP_INCLUDE_PATH is empty. Attempting to guess based on standard locations.") | ||
| # Common locations on Linux/macOS | ||
| find_path(PHP_H_LOCATION php.h PATHS |
There was a problem hiding this comment.
I'm not quite understanding, as most installations do not include PHP source, so will never contain a php.h file (the command php-config --includes will just return a path to the extension-dir)
There was a problem hiding this comment.
I think you are proposing to have all installations require php-dev headers? (I am not sure why we would need this suddenly, for all installations).
|
The PHP 8.4 and 8.5 CI builds have been running for 3.5 hours for this pull request, stuck on the PHPUnit section, I have now cancelled the run. |
|
Thanks for the feedback. I’m trying to update support up to PHP 8.5, but I’m running into a lot of build errors. I’m working on it. |
…HP 8.4/8.5 and GDAL 3.11 - ci/ubuntu/build.sh: Added test metrics summary (PHP & Python) and code coverage reporting - ci/ubuntu/Dockerfile: Disabled auto-regeneration of expected files in build - ci/ubuntu/setup.sh: Added PHP 8.4/8.5 and Python dependencies - msautotest/php/run_test.sh: Updated for PHPUnit 13 support - msautotest/*: Updated expected test outputs for WCS/WFS/GDAL/Misc suites to match GDAL 3.11 output - src/*: Included PHP 8.4 compatibility changes
…d test reporting - Added @group php84 annotation to php84DeprecationTest class - Modified run_test.sh to use --exclude-group php84 when running on PHP < 8.4 - This eliminates the 18 'skipped' tests on PHP 8.3 since they're not relevant for that version The tests are now filtered before execution rather than being skipped during execution, providing cleaner test output for users running on older PHP versions.
| "wms_title" "road" | ||
| "wms_description" "Roads of I.P.E." | ||
| "wms_srs" "EPSG:43204" | ||
| "wms_srs" "EPSG:4326" |
There was a problem hiding this comment.
Note that the original EPSG was the old custom 42304 (the 43204 here seems to be a typing mistake). The new (I filed it to EPSG back in 2008 and got it approved) EPSG to use here instead is EPSG:3978). So the original source here is not 4326, but instead should be 3978 in this mapfile (if the original data is the same)
|
@Giacomo92 currently we reduced the CI to only test PHP 8.4 and 8.5 (as development support for PHP 8.3 ended in December). I don't see a need to add compute resources to 8.3 (or please give your reasoning here, thanks). |
|
@Giacomo92 you mention in the Description (thanks for updating this) that one of the goals is to have the CI test PHP 8.3, but as you notice in the workflows running now for this pull request, and also in your fork, this current pull requet only tests PHP 8.4 and 8.5 (see workflow run). You would need to change build-mapscript-php.yml (if you explain why we would be requiring to re-add PHP 8.3, per my previous comment) |
|
@jmckenna Hi, thanks for pointing that out! |
|
@Giacomo92 - there are many changes in this pull request unrelated to PHP (changes to Python, mapfile.c, the lexer etc.). I'd recommend breaking this into smaller more focussed PRs (the 8,5 update and tests, then possibly Docker), if you want to see these changes merged. |
Summary