-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmigration_guide.html
More file actions
443 lines (401 loc) · 24.5 KB
/
migration_guide.html
File metadata and controls
443 lines (401 loc) · 24.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>PHP MapScript Migration Guide — MapServer 8.6.2 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx.css?v=48f05237" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx_collapse.css?v=226d88b4" />
<link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=dd298242" />
<link rel="stylesheet" type="text/css" href="../../_static/ribbon.css?v=ea091bf4" />
<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=9a6d5eae"></script>
<script src="../../_static/doctools.js?v=fd6eb6e6"></script>
<script src="../../_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../_static/copybutton.js?v=f281be69"></script>
<link rel="icon" href="../../_static/mapserver.ico"/>
<link rel="author" title="About these documents" href="../../about.html" />
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="copyright" title="Copyright" href="../../copyright.html" />
<link rel="next" title="By Example" href="by_example.html" />
<link rel="prev" title="PHP MapScript API" href="phpmapscript.html" />
</head><body>
<!-- for main branch only, do not backport this -->
<table width="100%" style="width: 100%; background-color: white;">
<tr>
<td rowspan="2" style="padding: 10px 0px 10px 10px;">
<a href="../../index.html" title="Home"><img src="../../_static/banner.png" alt="MapServer banner" border="0" /></a>
</td>
<td style="padding: 10px 10px 0px 0px; text-align: right; vertical-align: top;">
<a href="../../index.html" title="Home">Home</a> |
<a href="../../products.html" title="Products (MapServer core, MapCache, TinyOWS">Products</a> |
<a href="https://github.com/mapserver/mapserver/issues/" title="Issue Tracker (MapServer core)">Issue Tracker</a> |
<a href="../../community/service_providers.html" title="Professional Service Providers">Service Providers</a> |
<a href="../../faq.html" title="Frequently Asked Questions">FAQ</a> |
<a href="https://fosstodon.org/@mapserver" title="Mastodon" target="_blank">Mastodon</a> |
<a href="../../download.html" title="Download Source or Binaries">Download </a> |
<a class="badge" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KRJ2X44N3HA6U&source=url" target="_blank">
<img src="https://img.shields.io/badge/donate-%E2%9D%A4%C2%A0-ff69b4.svg?style=flat" alt="Donate to MapServer">
</a>
</td>
</tr>
<tr>
<td style="padding: 0px 10px 0px 0px; text-align: right; vertical-align: bottom;">
<img src="../../_static/flagicons/en.png" alt="en" title="en" border="0" width="18px" height="13px"/>
<a href="../../ar/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/ar.png" alt="ar" title="ar" border="0" /></a>
<a href="../../de/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/de.png" alt="de" title="de" border="0" /></a>
<a href="../../el/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/el.png" alt="el" title="el" border="0" /></a>
<a href="../../es/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/es.png" alt="es" title="es" border="0" /></a>
<a href="../../fr/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/fr.png" alt="fr" title="fr" border="0" /></a>
<a href="../../id/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/id.png" alt="id" title="id" border="0" /></a>
<a href="../../it/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/it.png" alt="it" title="it" border="0" /></a>
<a href="../../ja/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/ja.png" alt="ja" title="ja" border="0" /></a>
<a href="../../nl_NL/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/nl_NL.png" alt="nl_NL" title="nl_NL" border="0" /></a>
<a href="../../pl/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/pl.png" alt="pl" title="pl" border="0" /></a>
<a href="../../ru/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/ru.png" alt="ru" title="ru" border="0" /></a>
<a href="../../sq/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/sq.png" alt="sq" title="sq" border="0" /></a>
<a href="../../tr/mapscript/php/migration_guide.html"><img src="../../_static/flagicons/tr.png" alt="tr" title="tr" border="0" /></a>
</td>
</tr>
</table>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="by_example.html" title="By Example"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="phpmapscript.html" title="PHP MapScript API"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">Home</a> »</li>
<li class="nav-item nav-item-1"><a href="../../documentation.html" >MapServer 8.6.2 Documentation</a> »</li>
<li class="nav-item nav-item-2"><a href="../index.html" >MapScript</a> »</li>
<li class="nav-item nav-item-3"><a href="index.html" accesskey="U">PHP MapScript</a> »</li>
<li class="nav-item nav-item-this"><a href="">PHP MapScript Migration Guide</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="php-mapscript-migration-guide">
<span id="php-migration-guide"></span><h1><a class="toc-backref" href="#table-of-contents" role="doc-backlink">PHP MapScript Migration Guide</a><a class="headerlink" href="#php-mapscript-migration-guide" title="Link to this heading">¶</a></h1>
<dl class="field-list simple">
<dt class="field-odd">Author<span class="colon">:</span></dt>
<dd class="field-odd"><p>Alan Boudreault</p>
</dd>
<dt class="field-even">Contact<span class="colon">:</span></dt>
<dd class="field-even"><p>aboudreault at mapgears.com</p>
</dd>
<dt class="field-odd">Author<span class="colon">:</span></dt>
<dd class="field-odd"><p>Jeff McKenna</p>
</dd>
<dt class="field-even">Contact<span class="colon">:</span></dt>
<dd class="field-even"><p>jmckenna at gatewaygeomatics.com</p>
</dd>
<dt class="field-odd">Last updated<span class="colon">:</span></dt>
<dd class="field-odd"><p>2019-05-25</p>
</dd>
</dl>
<nav class="contents" id="table-of-contents">
<p class="topic-title">Table of Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#php-mapscript-migration-guide" id="id1">PHP MapScript Migration Guide</a></p>
<ul>
<li><p><a class="reference internal" href="#introduction" id="id2">Introduction</a></p></li>
<li><p><a class="reference internal" href="#migrating-to-7-4-s-new-swig-api-and-php-7" id="id3">Migrating to 7.4’s new SWIG API and PHP 7</a></p></li>
<li><p><a class="reference internal" href="#migrating-5-6-to-6-0" id="id4">Migrating 5.6 to 6.0</a></p>
<ul>
<li><p><a class="reference internal" href="#php-version-required" id="id5">PHP Version Required</a></p></li>
<li><p><a class="reference internal" href="#error-reporting" id="id6">Error Reporting</a></p></li>
<li><p><a class="reference internal" href="#manipulating-objects" id="id7">Manipulating Objects</a></p></li>
<li><p><a class="reference internal" href="#class-properties" id="id8">Class Properties</a></p></li>
<li><p><a class="reference internal" href="#class-methods" id="id9">Class Methods</a></p></li>
<li><p><a class="reference internal" href="#layerobj" id="id10">layerObj</a></p></li>
<li><p><a class="reference internal" href="#mapobj" id="id11">mapObj</a></p></li>
<li><p><a class="reference internal" href="#referencemapobj" id="id12">referenceMapObj</a></p></li>
<li><p><a class="reference internal" href="#shapefileobj" id="id13">shapeFileObj</a></p></li>
<li><p><a class="reference internal" href="#labelcacheobj" id="id14">labelCacheObj</a></p></li>
<li><p><a class="reference internal" href="#methods-that-now-return-ms-success-ms-failure" id="id15">Methods that now return MS_SUCCESS/MS_FAILURE</a></p></li>
<li><p><a class="reference internal" href="#methods-that-now-return-null-on-failure" id="id16">Methods that now return NULL on failure</a></p></li>
<li><p><a class="reference internal" href="#methods-that-now-return-an-empty-array" id="id17">Methods that now return an empty array</a></p></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
<section id="introduction">
<h2><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Introduction</a><a class="headerlink" href="#introduction" title="Link to this heading">¶</a></h2>
<p>This document describes the changes that must be made to PHP MapScript
applications when migrating from one MapServer version to another (i.e. backwards
incompatibilities), as well as information on some of the new features.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>As of the MapServer 8.0.0 release PHP support is only available through
MapServer’s <a class="reference internal" href="../mapscript-api/index.html#swig"><span class="std std-ref">SWIG API</span></a>. The unmaintained <cite>native</cite> PHP MapScript
support was removed.</p>
</div>
</section>
<section id="migrating-to-7-4-s-new-swig-api-and-php-7">
<h2><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Migrating to 7.4’s new SWIG API and PHP 7</a><a class="headerlink" href="#migrating-to-7-4-s-new-swig-api-and-php-7" title="Link to this heading">¶</a></h2>
<p>As of the MapServer 7.4.0 release, users are recommended to switch to
MapServer’s new <a class="reference internal" href="../mapscript-api/index.html#swig"><span class="std std-ref">SWIG</span></a> API support of PHP 7+ (reason for
recommendation: as we saw with the breaking PHP 7 changes,
managing PHP through SWIG will be easier on the MapServer maintainers in
the long run). Some important SWIG notes:</p>
<ul>
<li><p>you will require at least <a class="reference external" href="https://www.swig.org/download.html">SWIG-3.0.11</a>
(but 4.0.0 is recommended).</p></li>
<li><p>if you notice any missing functions that were available in the old native PHP MapScript API,
first please check the <a class="reference internal" href="../mapscript-api/index.html#swig"><span class="std std-ref">SWIG API</span></a> reference document for an alternative function to use,
and if there is nothing similar available then <a class="reference external" href="https://github.com/MapServer/MapServer/issues">file a ticket</a>
for each function that you require.</p></li>
<li><p>all of your PHP scripts (that leverage MapServer objects and functions) must now always
first include the generated <cite>mapscript.php</cite> file containing MapServer constants:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">//</span> <span class="n">required</span> <span class="n">SWIG</span> <span class="n">include</span> <span class="p">(</span><span class="n">contains</span> <span class="n">MapServer</span> <span class="n">constants</span> <span class="k">for</span> <span class="n">PHP7</span><span class="p">)</span>
<span class="n">include</span><span class="p">(</span><span class="s2">"C:/ms4w/apps/phpmapscriptng-swig/include/mapscript.php"</span><span class="p">);</span>
</pre></div>
</div>
</li>
<li><p>take note of the change in how to declare your new objects:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>// open map
$oMap = new mapObj("C:/ms4w/apps/phpmapscriptng-swig/sample.map");
</pre></div>
</div>
<p>instead of the former way:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>// open map
$oMap = ms_newMapObj("C:/ms4w/apps/phpmapscript/sample.map");
</pre></div>
</div>
</li>
</ul>
</section>
<section id="migrating-5-6-to-6-0">
<h2><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Migrating 5.6 to 6.0</a><a class="headerlink" href="#migrating-5-6-to-6-0" title="Link to this heading">¶</a></h2>
<section id="php-version-required">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">PHP Version Required</a><a class="headerlink" href="#php-version-required" title="Link to this heading">¶</a></h3>
<p>PHP 5.2.0 or more recent is required. The support for earlier versions
has been dropped.</p>
</section>
<section id="error-reporting">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Error Reporting</a><a class="headerlink" href="#error-reporting" title="Link to this heading">¶</a></h3>
<p>PHP MapScript now uses exceptions for error reports. All errors are
catchable. There are no more fatal errors reported via the standard
uncatchable PHP system (Only Warnings).</p>
</section>
<section id="manipulating-objects">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Manipulating Objects</a><a class="headerlink" href="#manipulating-objects" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>Object properties can be set like all other PHP objects.</p></li>
</ul>
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="x">$map->scaledenom = 25000;</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The set/setProperty methods are still available.</p>
</div>
<ul class="simple">
<li><p>Objects can be created with the PHP “new” operator.</p></li>
</ul>
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="x">$myShape = ms_newShapeObj(MS_SHAPE_LINE); // or</span>
<span class="x">$myShape = new shapeObj(MS_SHAPE_LINE);</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>All object constructors throw an exception on failure.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><em>ms_newSymbolObj()</em> and <em>new symbolObj()</em> are different</p>
<ul class="simple">
<li><p>ms_newSymbolObj() returns the id of the new/existing symbol.</p></li>
<li><p>new symbolObj() returns the symbolObj. You don’t need to get it with getSymbolObjectById().</p></li>
</ul>
</div>
<ul class="simple">
<li><p>Cloneable objects should be cloned with the PHP clone keyword. There is no more clone methods.</p></li>
</ul>
</section>
<section id="class-properties">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Class Properties</a><a class="headerlink" href="#class-properties" title="Link to this heading">¶</a></h3>
<p>Class properties that have been removed:</p>
<blockquote>
<div><ul class="simple">
<li><p>classObj: maxscale, minscale</p></li>
<li><p>layerObj: labelsizeitem, labelangleitem, labelmaxscale, labelminscale, maxscale, minscale, symbolscale, transparency</p></li>
<li><p>legendObj: interlace, transparent</p></li>
<li><p>mapObj: imagetype, imagequality, interlace, scale, transparent</p></li>
<li><p>scalebarObj: interlace, transparent</p></li>
<li><p>symbolObj: gap, stylelength</p></li>
<li><p>webObj: minscale, maxscale</p></li>
</ul>
</div></blockquote>
</section>
<section id="class-methods">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Class Methods</a><a class="headerlink" href="#class-methods" title="Link to this heading">¶</a></h3>
<p>Class methods that have been removed:</p>
<blockquote>
<div><ul class="simple">
<li><p>imageObj: free</p></li>
<li><p>layerObj: getFilter, getShape</p></li>
<li><p>lineObj: free</p></li>
<li><p>pointObj: free</p></li>
<li><p>projectionObj: free</p></li>
<li><p>rectObj: free</p></li>
<li><p>shapeObj: union_geos</p></li>
<li><p>symbolObj: getstylearray</p></li>
<li><p>classObj: clone</p></li>
<li><p>styleObj: clone</p></li>
<li><p>mapObj: clone</p></li>
<li><p>outputFormatObj: getformatoption, setformatoption</p></li>
</ul>
</div></blockquote>
</section>
<section id="layerobj">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">layerObj</a><a class="headerlink" href="#layerobj" title="Link to this heading">¶</a></h3>
<p>layerObj->clearProcessing() method now returns void.</p>
</section>
<section id="mapobj">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">mapObj</a><a class="headerlink" href="#mapobj" title="Link to this heading">¶</a></h3>
<p>mapObj->queryByIndex(): default behavior for the addToQuery parameter was not ok, now it is.</p>
</section>
<section id="referencemapobj">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">referenceMapObj</a><a class="headerlink" href="#referencemapobj" title="Link to this heading">¶</a></h3>
<p>referenceMapObj has new properties: marker, markername, markersize, maxboxsize, minboxsize.</p>
</section>
<section id="shapefileobj">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">shapeFileObj</a><a class="headerlink" href="#shapefileobj" title="Link to this heading">¶</a></h3>
<p>shapeFileObj is automatically closed/writed on destroy. (At the end of the script or with an explicit free(), unset())</p>
</section>
<section id="labelcacheobj">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">labelCacheObj</a><a class="headerlink" href="#labelcacheobj" title="Link to this heading">¶</a></h3>
<p>To free the cache, you’ll have to call the method freeCache() rather than
free().</p>
</section>
<section id="methods-that-now-return-ms-success-ms-failure">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Methods that now return MS_SUCCESS/MS_FAILURE</a><a class="headerlink" href="#methods-that-now-return-ms-success-ms-failure" title="Link to this heading">¶</a></h3>
<blockquote>
<div><ul class="simple">
<li><p>layerObj: setProcessing, addFeature, draw</p></li>
<li><p>mapObj: moveLayerUp, moveLayerDown, zoomRectangle, zoomScale, setProjection, setWKTProjection, setLayersDrawingOrder</p></li>
<li><p>outputFormatObj: validate</p></li>
<li><p>scalebarObj: setImageColor</p></li>
<li><p>symbolObj: setPoints, setPattern</p></li>
</ul>
</div></blockquote>
</section>
<section id="methods-that-now-return-null-on-failure">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Methods that now return NULL on failure</a><a class="headerlink" href="#methods-that-now-return-null-on-failure" title="Link to this heading">¶</a></h3>
<blockquote>
<div><ul class="simple">
<li><p>classObj: clone</p></li>
<li><p>mapObj: clone, draw, drawQuery getLayerByName, getProjection</p></li>
<li><p>layerObj: nextShape, getExtent</p></li>
<li><p>styleObj: clone</p></li>
</ul>
</div></blockquote>
</section>
<section id="methods-that-now-return-an-empty-array">
<h3><a class="toc-backref" href="#table-of-contents" role="doc-backlink">Methods that now return an empty array</a><a class="headerlink" href="#methods-that-now-return-an-empty-array" title="Link to this heading">¶</a></h3>
<blockquote>
<div><ul class="simple">
<li><p>layerObj: getItems, getProcessing, getGridIntersectionCoordinates</p></li>
<li><p>mapObj: getLayersIndexByGroup, getAllGroupNames, getLayersDrawingOrder, getAllLayerNames</p></li>
<li><p>symbolObj: getPatternArray</p></li>
</ul>
</div></blockquote>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p>
<a href="../../about.html" title="About">About</a><br>
<a href="../../products.html" title="Products">Products</a><br>
<a href="../../community/index.html" title="Community">Community</a><br>
<a href="../../development/index.html" title="Development">Development</a><br>
<a href="../../download.html" title="Downloads">Downloads</a><br>
<a href="../../documentation.html" title="Documentation">Documentation</a><br>
<a href="../../faq.html" title="FAQ">FAQ</a><br>
<a href="../../psc.html" title="PSC">PSC</a><br>
<a href="https://fosstodon.org/@mapserver" title="Mastodon">Mastodon</a>
</p>
<h3>Current Table Of Contents</h3>
<ul>
<li><a class="reference internal" href="#">PHP MapScript Migration Guide</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#migrating-to-7-4-s-new-swig-api-and-php-7">Migrating to 7.4’s new SWIG API and PHP 7</a></li>
<li><a class="reference internal" href="#migrating-5-6-to-6-0">Migrating 5.6 to 6.0</a><ul>
<li><a class="reference internal" href="#php-version-required">PHP Version Required</a></li>
<li><a class="reference internal" href="#error-reporting">Error Reporting</a></li>
<li><a class="reference internal" href="#manipulating-objects">Manipulating Objects</a></li>
<li><a class="reference internal" href="#class-properties">Class Properties</a></li>
<li><a class="reference internal" href="#class-methods">Class Methods</a></li>
<li><a class="reference internal" href="#layerobj">layerObj</a></li>
<li><a class="reference internal" href="#mapobj">mapObj</a></li>
<li><a class="reference internal" href="#referencemapobj">referenceMapObj</a></li>
<li><a class="reference internal" href="#shapefileobj">shapeFileObj</a></li>
<li><a class="reference internal" href="#labelcacheobj">labelCacheObj</a></li>
<li><a class="reference internal" href="#methods-that-now-return-ms-success-ms-failure">Methods that now return MS_SUCCESS/MS_FAILURE</a></li>
<li><a class="reference internal" href="#methods-that-now-return-null-on-failure">Methods that now return NULL on failure</a></li>
<li><a class="reference internal" href="#methods-that-now-return-an-empty-array">Methods that now return an empty array</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="by_example.html" title="By Example"
>next</a> |</li>
<li class="right" >
<a href="phpmapscript.html" title="PHP MapScript API"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">Home</a> »</li>
<li class="nav-item nav-item-1"><a href="../../documentation.html" >MapServer 8.6.2 Documentation</a> »</li>
<li class="nav-item nav-item-2"><a href="../index.html" >MapScript</a> »</li>
<li class="nav-item nav-item-3"><a href="index.html" >PHP MapScript</a> »</li>
<li class="nav-item nav-item-this"><a href="">PHP MapScript Migration Guide</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© <a href="../../copyright.html">Copyright</a> 2026, Open Source Geospatial Foundation.
Last updated on 2026-04-20.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 9.1.0.
</div>
</body>
</html>