[mapserver-dev] PHP 7 MapScript SWIG Support / Discussion

thomas bonfort thomas.bonfort at gmail.com
Mon Jan 23 22:38:46 PST 2017


Jeff,

Given that the proposal does not address the issue of backwards
compatibility with the current php mapscript, I suggest that (1) the whole
php+swig code reside in its own mapscript/(phpng|php7) directory instead of
having #ifdefs in the current php mapscript code, and that (2) the module
be renamed differently than the current one. When/if a backwards
compatibility layer is worked on, that compatibility layer could take on
the current name.

regards,

--
thomas

On Tue, Jan 3, 2017 at 4:53 PM Jeff McKenna <jmckenna at gatewaygeomatics.com>
wrote:

> Update: SWIG-3.0.11 was released recently on 29 December containing the
> full PHP 7 support.
>
> -jeff
>
>
>
> On 2016-12-20 5:58 PM, Jeff McKenna wrote:
> > Regarding the clone() keyword, I looked closer at the MapServer source,
> > and in fact Java MapScript faced the same issue apparently, and handled
> > that by defining a new function name for those use cases (cloning map,
> > layer, class, style, shape instances) such as:
> >
> > #ifdef SWIGJAVA
> >   %newobject cloneMap;
> >   mapObj *cloneMap()
> > #else
> >   %newobject clone;
> >   mapObj *clone()
> > #endif
> >
> > So we would do the same for SWIGPHP (reference them in the /swiginc/
> > files and define those functions in /mapscript/php/phpextend.i
> >
> > (I've updated the RFC with those notes)
> >
> > Thanks for the feedback Ducky!
> >
> > -jeff
> >
> >
> >
> >
> > On 2016-12-19 10:49 AM, Dan Little wrote:
> >> I'm generally positive about this in the hopes that it means the
> >> PHP/MapScript+SWIG will ensure PHP gets feature parity with the other
> >> versions of MapScript.  I also am a fan of what looks to be a more
> >> consistent syntax to modern PHP.
> >>
> >> I'll venture an opinion/suggestions on the reserved word cases
> >> (specifically clone and close):   Is there a way to alias those
> >> function names to something other than "c_..." ?  If so, I've seen
> >> some convention such as "clone_" or "close_", and more PHP-y might be
> >> something to the tune of "cloneInstance()" or "closeXYZ" where XYZ is
> >> actual context appropriate (closeStream, closeConnection, etc.).
> >>
> >> Cheers.
> >>
> >> On Mon, Dec 19, 2016 at 9:47 AM, Dan Little <theduckylittle at gmail.com>
> >> wrote:
> >>> I'm generally positive about this in the hopes that it means the
> >>> PHP/MapScript+SWIG will ensure PHP gets feature parity with the other
> >>> versions of MapScript.  I also am a fan of what looks to be a more
> >>> consistent syntax to modern PHP.
> >>>
> >>> I'll venture an opinion/suggestions on the reserved word cases
> >>> (specifically clone and close):   Is there a way to alias those
> >>> function names to something other than "c_..." ?  If so, I've seen
> >>> some convention such as "clone_" or "close_", and more PHP-y might be
> >>> something to the tune of "cloneInstance()" or "closeXYZ" where XYZ is
> >>> actual context appropriate (closeStream, closeConnection, etc.).
> >>>
> >>> Cheers.
> >>>
> >>> On Fri, Dec 16, 2016 at 4:32 PM, Jeff McKenna
> >>> <jmckenna at gatewaygeomatics.com> wrote:
> >>>> Hi all,
> >>>>
> >>>> I've created an RFC draft for the PHP 7 SWIG potential changes:
> >>>> http://mapserver.org/development/rfc/ms-rfc-117.html
> >>>>
> >>>> Please pay attention to the "Limitations" section, as there are some
> >>>> items
> >>>> that need discussion.  I will plan to discuss this for sure at the
> >>>> next PSC
> >>>> meeting on 19 January, so we have lots of time to discuss,
> >>>> especially as we
> >>>> are entering the holidays.
> >>>>
> >>>> Wishing the whole MapServer community a truly happy and merry
> >>>> Christmas!  :)
> >>>>
> >>>> -jeff
> >>>>
> >>>>
> >
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20170124/b67a312c/attachment.html>


More information about the mapserver-dev mailing list