| 1 |
lars |
1 |
|
|
|
2 |
Upgrading Instructions for PRADO Framework v3.1.4
|
|
|
3 |
=================================================
|
|
|
4 |
|
|
|
5 |
!!!IMPORTANT!!!
|
|
|
6 |
|
|
|
7 |
The following upgrading instructions are cumulative. That is,
|
|
|
8 |
if you want to upgrade from version A to version C and there is
|
|
|
9 |
version B between A and C, you need to following the instructions
|
|
|
10 |
for both A and B.
|
|
|
11 |
|
|
|
12 |
Upgrading from v3.1.3
|
|
|
13 |
---------------------
|
|
|
14 |
- The prado-cli and prado-cli.bat scripts have been moved into
|
|
|
15 |
the framework folder of the distribution.
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
Upgrading from v3.1.2
|
|
|
19 |
---------------------
|
|
|
20 |
- The Translation configuration now also accepts type 'Database' to
|
|
|
21 |
ease the setup of DB base translation. A valid ConnectionID has to
|
|
|
22 |
be supplied in the source parameter:
|
|
|
23 |
<translation type="Database" source="db1" autosave="true" cache="false" />
|
|
|
24 |
Type 'MySQL' can still be used but is deprecated and might be removed
|
|
|
25 |
in a later release.
|
|
|
26 |
- TinyMCE (used by THtmlArea component) has been upgraded to version 3.1.0.1.
|
|
|
27 |
Since the 3.X branch of TinyMCE has a different API than 2.X, you should
|
|
|
28 |
upgrade your Customs Plugins if you use any.
|
|
|
29 |
See http://wiki.moxiecode.com/index.php/TinyMCE:Migration_guide for more information.
|
|
|
30 |
- If you use EnableStateEncryption, the PageState of your current user sessions
|
|
|
31 |
will no longer be valid, since we optimized the encryption/compression logic.
|
|
|
32 |
- You can now use # and $ characters in your SQL statements with SQLMap by
|
|
|
33 |
escaping them as ## and $$. That induces that you can't have consecutive
|
|
|
34 |
parameters like #param1##param2# or $param1$$param2$ in your statements anymore.
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
Upgrading from v3.1.1
|
|
|
38 |
---------------------
|
|
|
39 |
- The RELATIONS type declaration in Active Record classes for Many-to-Many using
|
|
|
40 |
an association table was change from "self::HAS_MANY" to "self::MANY_TO_MANY".
|
|
|
41 |
E.g. change
|
|
|
42 |
'albums' => array(self::HAS_MANY, 'Artist', 'album_artists')
|
|
|
43 |
to
|
|
|
44 |
'albums' => array(self::MANY_TO_MANY, 'Artist', 'album_artists')
|
|
|
45 |
- Active Record no longer automatically adds/removes/updates related objects.
|
|
|
46 |
- 'Raw' mode for TCheckboxList and TRadioButtonList (and their active counter parts) now render
|
|
|
47 |
a surrounding <span> tag to allow client scripts to identify them with the ClientId. You may
|
|
|
48 |
have to check your CSS.
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
Upgrading from v3.1.0
|
|
|
52 |
---------------------
|
|
|
53 |
- The RELATIONS declaration in Acive Record classes is changed from
|
|
|
54 |
"protected static $RELATIONS" to "public static $RELATIONS".
|
|
|
55 |
- IFeedContentProvider adds a new method: getContentType(). This affects any
|
|
|
56 |
class implementing this interface.
|
|
|
57 |
- TUrlMapping now only uses the PATH_INFO part of URL for matching, and the matching
|
|
|
58 |
is for the whole PATH_INFO.
|
|
|
59 |
- IUserManager adds two new methods: getUserFromCookie() and saveUserToCookie().
|
|
|
60 |
This affects classes that implements this interface and does not extend from
|
|
|
61 |
TUserManager.
|
|
|
62 |
- The order of application lifecycles is changed. The loadState and loadStateComplete
|
|
|
63 |
are moved to right after onBeginRequest.
|
|
|
64 |
- TDropDownList will be in an unselected state if no initial selection is specified.
|
|
|
65 |
That is, its SelectedIndex will be -1. Previously, the first item will be considered as selected.
|
|
|
66 |
|
|
|
67 |
Upgrading from v3.1b
|
|
|
68 |
--------------------
|
|
|
69 |
- Comment tag <!-- ... ---> (introduced in v3.1a) is changed to <!--- ... --->
|
|
|
70 |
- When TDataList.RepeatLayout is Raw, the items will render <div> instead of <span>
|
|
|
71 |
- TActiveRecord finder methods will always return a new object instance (identity mapping was removed).
|
|
|
72 |
- TActiveRecord::findBySql() will return an object rather than an array
|
|
|
73 |
- TActiveRecord::findAllBySql() will return an array of objects.
|
|
|
74 |
|
|
|
75 |
Upgrading from v3.1a
|
|
|
76 |
---------------------
|
|
|
77 |
- The signature of TActiveRecord::finder() is changed. This affects
|
|
|
78 |
all TActiveRecord-descendant classes that override this method.
|
|
|
79 |
Please use the following code to override the method:
|
|
|
80 |
public static function finder($className=__CLASS__)
|
|
|
81 |
{
|
|
|
82 |
return parent::finder($className);
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
- The way to specify the table name for an active record class is changed.
|
|
|
86 |
Previously, it used the static class member '_tablename'.
|
|
|
87 |
Now it uses class constant as follows:
|
|
|
88 |
class UserRecord extends TActiveRecord
|
|
|
89 |
{
|
|
|
90 |
const TABLE='users_table';
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
- Changed TActiveRatingList's javascript control class
|
|
|
94 |
name from "Prado.WebUI.TRatingList" to "Prado.WebUI.TActiveRatingList".
|
|
|
95 |
|
|
|
96 |
- PRADO's javascript library locations moved from Web/Javascripts/xxx to Web/Javascripts/source/xxx
|
|
|
97 |
|
|
|
98 |
- IPostBackDataHandler added a new method getDataChanged(). Any control
|
|
|
99 |
implementing this interface will be required to implement this new method.
|
|
|
100 |
|
|
|
101 |
Upgrading from v3.0.x
|
|
|
102 |
---------------------
|
|
|
103 |
- Validators ClientSide.OnSuccess becomes ClientSide.OnValidationSuccess,
|
|
|
104 |
- Validators ClientSide.OnError becomes ClientSide.OnValidationError,
|
|
|
105 |
- Validator OnSuccess event becomes OnValidationSuccess.
|
|
|
106 |
- Validator OnError event becomes OnValidationError.
|
|
|
107 |
- Content enclosed in <!-- --> is now parsed as normal template content.
|
|
|
108 |
Previously, it was not parsed and was rendered as is.
|
|
|
109 |
|
|
|
110 |
Upgrading from v3.0.7
|
|
|
111 |
---------------------
|
|
|
112 |
|
|
|
113 |
Upgrading from v3.0.6
|
|
|
114 |
---------------------
|
|
|
115 |
|
|
|
116 |
Upgrading from v3.0.5
|
|
|
117 |
---------------------
|
|
|
118 |
- TRepeater does not render <span> anymore for empty item template.
|
|
|
119 |
- constructUrl() now encodes ampersand by default. This should have minimal
|
|
|
120 |
impact on any existing PRADO applications, though.
|
|
|
121 |
- TDataGrid does not generate default table styles. This may affect
|
|
|
122 |
the appearance of existing PRADO applications that use TDataGrid.
|
|
|
123 |
- If TUrlMapping is used, you need to set the UrlManager property of
|
|
|
124 |
THttpRequest to the module ID of TUrlMapping.
|
|
|
125 |
- TJavascriptLogger toggle key is changed from ALT-D to ALT-J.
|
|
|
126 |
Use the ToggleKey property chanage to a different key.
|
|
|
127 |
- Javascript Library rico was REMOVED.
|
|
|
128 |
|
|
|
129 |
Upgrading from v3.0.4
|
|
|
130 |
---------------------
|
|
|
131 |
- TFileUpload::saveAs() will return false instead of raising an exception
|
|
|
132 |
if it encounters any error.
|
|
|
133 |
- TDropDownListColumn.DataField is renamed to DataTextField and
|
|
|
134 |
DataFormatString is renamed to DataTextFormatString.
|
|
|
135 |
A new property named DataValueField is added.
|
|
|
136 |
|
|
|
137 |
Upgrading from v3.0.3
|
|
|
138 |
---------------------
|
|
|
139 |
- The 'Static' value is changed to 'Fixed' for the Display property of
|
|
|
140 |
all validators as well as TValidationSummary, due to conflict with PHP keywords.
|
|
|
141 |
- The 'List' value is changed to 'SimpleList' for TValidationSummary.DisplayMode.
|
|
|
142 |
- The 'List' value is changed to 'DropDownList' for TPager.Mode
|
|
|
143 |
- This change affects existing client-side javascript handlers such as
|
|
|
144 |
<com:TRequiredFieldValidator ClientSide.OnSuccess="xxx" />
|
|
|
145 |
All ClientSide javascript event handlers (such as ClientSide.OnSuccess)
|
|
|
146 |
are by default wrapped within the function block.
|
|
|
147 |
function(sender, parameter){ // handler code }
|
|
|
148 |
You may override this behaviour by providing your own javascript statement block
|
|
|
149 |
as "javascript:MyHandlerFunction", e.g. ClientSide.OnSuccess="javascript:MyHandlerFunction"
|
|
|
150 |
or ClientSide.OnSuccess="javascript:function(validator,sender){ ... }"
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
Upgrading from v3.0.2
|
|
|
154 |
---------------------
|
|
|
155 |
- The minimum PHP version required is raised to 5.1.0 and above.
|
|
|
156 |
If your server is installed with a lower version of PHP, you will
|
|
|
157 |
have to upgrade it in order to run PRADO applications.
|
|
|
158 |
- The signature of TControl::broadcastEvent() is changed from
|
|
|
159 |
broadcastEvent($sender,TBroadCastEventParameter $param) to
|
|
|
160 |
broadcastEvent($name,$sender,$param).
|
|
|
161 |
This makes the call to broadcastEvent() to be consistent with raiseEvent().
|
|
|
162 |
|
|
|
163 |
Upgrading from v3.0.1
|
|
|
164 |
---------------------
|
|
|
165 |
- Postback enabled control will always disable default client-side browser action.
|
|
|
166 |
This is due to google toolbar's interference of event stopping scheme.
|
|
|
167 |
This modification should only affect user-derived postback javascripts.
|
|
|
168 |
|
|
|
169 |
Upgrading from v3.0.0
|
|
|
170 |
---------------------
|
|
|
171 |
- URL format is modified when THttpRequest.UrlFormat=='Path'.
|
|
|
172 |
This modification affects both the URLs generated by calling constructUrl()
|
|
|
173 |
and the URLs understood by PRADO. In particular, PRADO now understands
|
|
|
174 |
the following URL format:
|
|
|
175 |
/index.php/ServiceID,ServiceParam/Name1,Value1/Name2,Value2/...
|
|
|
176 |
In v3.0.0, the above URL is written as:
|
|
|
177 |
/index.php/ServiceID/ServiceParam/Name1/Value1/Name2/Value2/...
|
|
|
178 |
- TControl::onBubbleEvent() has been changed to TControl::bubbleEvent().
|
|
|
179 |
This change only affects user controls that override this method.
|
|
|
180 |
|
|
|
181 |
Upgrading from v2.x and v1.x
|
|
|
182 |
----------------------------
|
|
|
183 |
PRADO v3.x is not backward compatible with v2.x and v1.x.
|