Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

PHP 7 binding #21

@jumpinjackie

Description

@jumpinjackie

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::CreateService returns a proxy of MgService instead of the appropriate derived class
  • Test APIs that deal with MgByteReader to 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 MgException based exceptions
  • Make sure MgException based 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 those delete functions that will never get called.
  • Put all the generated PHP code under a OSGeo\MapGuide namespace
  • Get it building (Linux)
  • Make existing PHP test suite pass (Windows)
  • Make existing PHP test suite pass (Linux)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions