mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Removed old "breaking changes" files. Check www.danieleteti.it to know about the breaking changes of each version.
This commit is contained in:
parent
bf8e1fdc4b
commit
400aa4d549
@ -1,59 +0,0 @@
|
|||||||
# 3.0.0 breaking changes
|
|
||||||
- XE6 and previous versions are not more supported.
|
|
||||||
- ```RenderListAsProperty<T>``` has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
|
|
||||||
- ```RenderJSONArrayAsProperty``` has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
|
|
||||||
- ```Render``` has been removed from TMVCController (was deprecated).
|
|
||||||
- ```Render(TJSONValue)``` has been removed from TMVCController (use Render(TObject)).
|
|
||||||
- Trying to deserialize a ```TJSONNull``` the target instance will not be freed anymore (consistency with serialize).
|
|
||||||
- ```Context.Request.BodyAsJSONObject``` dosen't exist any more. Use BodyAs<T> or the following pattern to migrate:
|
|
||||||
```
|
|
||||||
JSON := TJSONObject.ParseJSONValue(Context.Request.Body) as TJSONObject;
|
|
||||||
try
|
|
||||||
if not Assigned(JSON) then
|
|
||||||
raise EMVCException.Create('Invalid JSON');
|
|
||||||
// do something here
|
|
||||||
finally
|
|
||||||
JSON.Free;
|
|
||||||
end;
|
|
||||||
```
|
|
||||||
- ```TMVCConfigKey``` moved to unit ```MVCFramework.Commons```.
|
|
||||||
- ```TMVCMimeType``` was renamed to ```TMVCMediaType```.
|
|
||||||
- ```TMVCController.Render;``` no parameter method do not exist anymore. If the return is a ResponseStream, use the ```RenderResponseStream;```.
|
|
||||||
- ```TMVCController.PushJSONToView;``` was renamed to ```PushToView```and Removed SystemJSON dependency, use the ToJSON method if necessary.
|
|
||||||
- There is no more a default view engine for Server Side Views (before 3.0 there was mustache).
|
|
||||||
- Mustache engine is no more the only view engine available. Now you can implement all the view engines you need (check the serversideviewsprimer).
|
|
||||||
- On Linux there is no built-in available view engine available. In other words, using only the built-in classes, you cannot use server side views on linux (dmustache is not compatible on linux).
|
|
||||||
- HTTP File Upload doesn't work on Linux because of a bug in Delphi 10.2 (https://quality.embarcadero.com/browse/RSP-17216).
|
|
||||||
- ```[MapperJSONNaming(TJSONNameCase.JSONNameLowerCase)]``` now must be changed in ```[MVCNameCase(ncLowerCase)]```
|
|
||||||
- ```[MapperJSONNaming(TJSONNameCase.JSONNameUpperCase)]``` now must be changed in ```[MVCNameCase(ncUpperCase)]```
|
|
||||||
|
|
||||||
## TRESTClient
|
|
||||||
Every reference to TJSON* has been removed from the TRESTClient public interface. To port the existing code, you have to include ```MVCFramework.RESTClient.SystemJSONUtils``` and change your code as following:
|
|
||||||
|
|
||||||
Before
|
|
||||||
```lMyJSONObject := Response.BodyAsJsonObject.Clone as TJSONObject;```
|
|
||||||
After
|
|
||||||
```delphi
|
|
||||||
lMyJSONObject := TSystemJSON.BodyAsJsonObject(Response) as TJSONObject;
|
|
||||||
try
|
|
||||||
//use the object
|
|
||||||
finally
|
|
||||||
lMyJSONObject.Free;
|
|
||||||
end;
|
|
||||||
```
|
|
||||||
|
|
||||||
The memory allocated for the TJSONValue descendant (e.g. TJSONObject, TJSONArray and so on) *is no more managed by the TRESTClient itself* but must be feed by the calling code.
|
|
||||||
|
|
||||||
- DelphiStompClient has been removed from the core. The following method is no more available in TMVCController.
|
|
||||||
```delphi
|
|
||||||
function GetNewStompClient(const AClientId: string = ''): IStompClient;
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```TMVCConfigKey.ISAPIPath``` has been substituted with ```TMVCConfigKey.PathPrefix``` and now is applicated to all kind of projects (not only ISAPI);
|
|
||||||
- ```MapperSerializeAsString``` attribute is now ```MVCSerializeAsString```
|
|
||||||
- ```ContentCharset``` is no more available (everywhere). You have to properly set ContentType. To do that is available the function ```CreateContentType```.
|
|
||||||
- Removed ```LogEx``` and ```LogException```. Use ```Log.ErrorFmt``` instead.
|
|
||||||
- `PushObjectToView` has been deprecated. Use `ViewData` property;
|
|
||||||
- `PushDataSetToView` has been deprecated. Use `ViewDataSet` property;
|
|
||||||
- `ViewModels` has been renamed in `ViewModelList`;
|
|
||||||
- `ViewDataSets` has been renamed in `ViewDatasetList`;
|
|
@ -1,4 +0,0 @@
|
|||||||
# 3.1.0 (lithium) breaking changes
|
|
||||||
|
|
||||||
- JSON-RPC Client Classes has been changed. Now they are interfaces based.
|
|
||||||
- JSON-RPC Server: Only public instance methods can be invoked.
|
|
@ -1,8 +0,0 @@
|
|||||||
# 3.2.0 (boron) breaking changes
|
|
||||||
|
|
||||||
- Removed `TDataSetHelper.LoadFromJSONArrayStringItems`
|
|
||||||
- `TDataSetHolder` class now renders data in a property called `data` (previously was `items`)
|
|
||||||
- The default header used by JWT middleware is now `Authorization` (previously was `Authentication`)
|
|
||||||
- Middleware `OnAfterControllerAction` are now invoked in the same order of `OnBeforeControllerAction` (previously were invoked in reversed order).
|
|
||||||
- `IMVCMiddleware` has got a new method called after the request processing: `OnAfterRouting` . It is called even if no action is executed. If you don't need it, implement the method and leave it empty.
|
|
||||||
- `TMVCEngine` is no more responsible for static file serviing. If you need static files used the new `TMVCStaticFilesMiddleware` (check the sample).
|
|
3
tasks.py
3
tasks.py
@ -225,9 +225,6 @@ def init_build(version):
|
|||||||
f.write("BUILD DATETIME " + datetime.now().isoformat() + "\n")
|
f.write("BUILD DATETIME " + datetime.now().isoformat() + "\n")
|
||||||
f.close()
|
f.close()
|
||||||
copy2("README.md", g_output_folder)
|
copy2("README.md", g_output_folder)
|
||||||
copy2("3_0_0_breaking_changes.md", g_output_folder)
|
|
||||||
copy2("3_1_0_breaking_changes.md", g_output_folder)
|
|
||||||
copy2("3_2_0_breaking_changes.md", g_output_folder)
|
|
||||||
copy2("License.txt", g_output_folder)
|
copy2("License.txt", g_output_folder)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user