Build PDFNetPHP_core.php for PHP 8

Product: PDFNetPHP

Product Version: 9.4

Please give a brief summary of your issue:
Script in php wrapper don’t build PDFNetPHP_core.php for php 8

Please describe your issue and provide steps to reproduce it:
Follow the tutorial in GitHub - PDFTron/PDFNetWrappers: Code repository for building different language bindings for PDFNetC.
At the end, only the extensions was built, but the PDFNetPHP_core.php file that was useful for IDE isn’t generated anymore.

Hi Andre,

Just to confirm, are you using the following guide:

If so, can you list any warnings or exceptions you are getting?

I’m actually following this guide: GitHub - PDFTron/PDFNetWrappers: Code repository for building different language bindings for PDFNetC..

No errors, but the file isn’t build, and looks like is disabled for SWIG 4.1 with PHP 8 in the script:

PDFNetPHP/CMakeLists.txt:

set(PHP_TARGET_FILE ON)
if((SWIG_MAJOR_VERSION LESS 4) OR (SWIG_MAJOR_VERSION EQUAL 4 AND SWIG_MINOR_VERSION LESS 1))
    if (PHP_MAJOR_VERSION GREATER 7)
        message(FATAL_ERROR "ERROR! Cannot run PHP8 with SWIG 4.0 or below. Minimum is SWIG 4.1/PHP8. Please make sure you have the correct SWIG package before proceeding!")
        return ()
    endif()
else ()
    set(PHP_TARGET_FILE OFF)
endif()