This repository was archived by the owner on Apr 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Apr 3, 2026. It is now read-only.
PHP 7 binding #21
Copy link
Copy link
Open
Labels
Description
Version 3.0.11 was recently released which added long-awaited support for PHP 7.
As it is imperative that we escape the pending EOL of PHP 5.6 which is in less than 2 years time, we need to explore a usable path where we can bundle in PHP 7 and a MapGuide API binding that works with this version.
Current checklist:
- Get downcasting to work. For example:
MgSiteConnection::CreateServicereturns a proxy ofMgServiceinstead of the appropriate derived class - Test APIs that deal with
MgByteReaderto verify our byte typemaps are working - Because we downgraded to PHP 7.1, check if the pre-build sed patch workaround is still required
- Make sure we can throw
MgExceptionbased exceptions - Make sure
MgExceptionbased exceptions are being properly released - We should be building for the NTS (non-thread-safe) profile not TS as the binding in its current form (which is built for thread-safe PHP) cannot be used if hosting PHP in IIS (it uses non-thread-safe PHP). We can also use non-thread-safe PHP in Apache via
mod_fcgid, so from a practical standpoint it's simpler to just build for the NTS profile. - Since we've monkey-patched a custom destructor for
MgException-derived proxy classes, find a way to get SWIG to not generate all thosedeletefunctions that will never get called. - Put all the generated PHP code under a
OSGeo\MapGuidenamespace - Get it building (Linux)
- Make existing PHP test suite pass (Windows)
- Make existing PHP test suite pass (Linux)
Reactions are currently unavailable