Changes between Initial Version and Version 1 of MapGuideRfc89


Ignore:
Timestamp:
Mar 22, 2010, 12:32:43 PM (14 years ago)
Author:
brucedechant
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc89

    v1 v1  
     1= !MapGuide RFC 89 - Upgrade to PHP 5.3 =
     2
     3This page contains a change request (RFC) for the !MapGuide Open Source project. 
     4More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
     5
     6
     7== Status ==
     8 
     9||RFC Template Version||(1.0)||
     10||Submission Date||March 22, 2009||
     11||Last Modified||Bruce Dechant [[Timestamp]]||
     12||Author||Bruce Dechant||
     13||RFC Status||draft||
     14||Implementation Status||draft||
     15||Proposed Milestone||2.2||
     16||Assigned PSC guide(s)||Bruce Dechant||
     17||'''Voting History'''||||
     18||+1||||
     19||+0||||
     20||-0||||
     21||-1||||
     22||Abstained||||
     23 
     24== Overview ==
     25
     26This RFC updates !MapGuide to use the latest version of PHP 5.3.
     27
     28For details, refer to the PHP website:
     29
     30http://php.net/
     31
     32== Motivation ==
     33
     34There have been several security fixes and bug fixes done to PHP since the release currently included with MapGuide.
     35
     36== Proposed Solution ==
     37
     38Upgrade existing PHP 5.2 to the latest PHP 5.3.
     39
     40== Implications ==
     41
     42All exception classes must be derived from the PHP Exception base class.
     43Changing this causes more issues - namely a side effect of having to have the PHP Exception class as the base class is that it becomes the base class of !MgObject which almost everything in our API derives from.
     44This causes an API naming conflict with existing MapGuide APIs because PHP is case insensitive  - ie: getMessage() and !GetMessage() are the same in the PHP world.
     45
     46The PHP Exception class is defined as follows: (These are the APIs with which we can have conflicts with)
     47{{{
     48const static zend_function_entry default_exception_functions[] = {
     49                ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
     50                ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
     51                ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
     52                ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
     53                ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
     54                ZEND_ME(exception, getLine, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
     55                ZEND_ME(exception, getTrace, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
     56                ZEND_ME(exception, getPrevious, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
     57                ZEND_ME(exception, getTraceAsString, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
     58                ZEND_ME(exception, __toString, NULL, 0)
     59                {NULL, NULL, NULL}
     60};
     61}}}
     62Of the above APIs only the getMessage() and getCode() APIs are currently causing conflicts with MapGuide APIs.
     63
     64In order to get around the conflicts with PHP the following API changes need to be made to our existing MapGuide APIs:
     65{{{
     66MgException class changes:
     67Change GetMessage() to GetExceptionMessage()
     68
     69MgResources class changes:
     70Change GetMessage() to GetResourceMessage()
     71
     72MgCoodinateSystem class changes:
     73Change GetCode() to GetCsCode()
     74Change SetCode() to SetCsCode() for consistency.
     75Change IsLegalCode() to IsLegalCsCode() for consistency.
     76
     77MgCoodinateSystemDatum class changes:
     78Change GetCode() to GetDtCode()
     79Change SetCode() to SetDtCode() for consistency.
     80Change IsLegalCode() to IsLegalDtCode() for consistency.
     81
     82MgCoodinateSystemEllipsoid class changes:
     83Change GetCode() to GetElCode()
     84Change SetCode() to SetElCode() for consistency.
     85Change IsLegalCode() to IsLegalElCode() for consistency.
     86
     87MgWebInvokeScriptCommand class changes:
     88Change GetCode() to GetScriptCode()
     89Change SetCode() to SetScriptCode() for consistency.
     90}}}
     91
     92These API changes will impact:
     93 * Viewers
     94 * Sample applications
     95 * Development guides
     96 * Existing applications
     97
     98== Test Plan ==
     99
     100Build/Run on Windows/Linux.
     101
     102== Funding/Resources ==
     103
     104Supplied by Autodesk.