Changelog
Breaking changes
8.2 RC2
The following breaking changes usually only affect applications which misuse existing API or do not follow best practices.
-
The default Content-Security-Policy of
AppFrameworkapps is now stricter but can be adjusted by developers. See https://github.com/owncloud/core/pull/13989 -
Parameters passed to
OC.generateUrlare now automatically encoded, this behavior can be adjusted by developers. See https://github.com/owncloud/core/pull/14266 -
Views constructed by OCFilesView do not allow directory traversals anymore in the constructor. See https://github.com/owncloud/core/pull/14342
-
The CSRF token may now contain not URL compatible characters (for example the plus sign: +), developers have to ensure that the CSRF token is encoded properly before using it in URIs.
-
The default RNG now returns all valid Base64 characters
-
OC.msgescapes the message now by default (see https://github.com/owncloud/core/pull/14208)
Features
8.2 RC2
-
There is a new OCSResponse and OCSController <controllers> which allows you to easily migrate OCS code to the App Framework. This was added purely for compatibility reasons and the preferred way of doing APIs is using a api
-
You can now stream files in PHP by using the built in StreamResponse <controllers>.
-
For more advanced use cases you can now implement the CallbackResponse <controllers> interface which allows your response to do its own response rendering
-
Custom preview providers can now be implemented using
OCP\IPreview::registerProvider -
There is a mightier class for remote web service requests at
OCP\Http\Client -
OCP\\IImageallows now basic image manipulations such as resizing or rotating -
OCP\\Mailallows sending mails in an object-oriented way now -
OCP\\IRequestcontains more methods now such as getting the request URI -
OCP\\Encryptionallows writing custom encryption backends
Furthermore all public APIs have received a @since annotation allowing
developers to see when a function has been introduced.
Deprecations
This is a deprecation roadmap which lists all current deprecation targets and will be updated from release to release. This lists the version when a specific method or class will be removed.
Deprecations on interfaces also affect the implementing classes!
11.1
-
OCP\\App::setActiveNavigationEntryhas been deprecated in favour of\\OCP\\INavigationManager -
OCP\\BackgroundJob::registerJobhas been deprecated in favour ofOCP\\BackgroundJob\\IJobList -
OCP\\Contactsfunctions has been deprecated in favour of\\OCP\\Contacts\\IManager -
OCP\\DBfunctions have been deprecated in favour of the ones in\\OCP\\IDBConnection -
OCP\\Files::tmpFilehas been deprecated in favour of\\OCP\\ITempManager::getTemporaryFile -
OCP\\Files::tmpFolderhas been deprecated in favour of\\OCP\\ITempManager::getTemporaryFolder -
\\OCP\\IServerContainer::getDbhas been deprecated in favour of\\OCP\\IServerContainer::getDatabaseConnection -
\\OCP\\IServerContainer::getHTTPHelperhas been deprecated in favour of\\OCP\\Http\\Client\\IClientService -
Legacy applications not using the
AppFrameworkare now likely to use the deprecatedOCP\\JSONandOCP\\Responsecode:-
\\OCP\\JSONhas been completely deprecated in favour of theAppFramework. Developers shall use theAppFrameworkinstead of using the legacyOCP\\JSONcode. This allows testable controllers and is highly encouraged. -
\\OCP\\Responsehas been completely deprecated in favour of theAppFramework. Developers shall use theAppFrameworkinstead of using the legacyOCP\\JSONcode. This allows testable controllers and is highly encouraged.
-
-
Diverse
OCP\\Usersfunction got deprecated in favour ofOCP\\IUserManager:-
OCP\\Users::getUsershas been deprecated in favour ofOCP\\IUserManager::search -
OCP\\Users::getDisplayNamehas been deprecated in favour ofOCP\\IUserManager::getDisplayName -
OCP\\Users::getDisplayNameshas been deprecated in favour ofOCP\\IUserManager::searchDisplayName -
OCP\\Users::userExistshas been deprecated in favour ofOCP\\IUserManager::userExists
-
-
Various static
OCP\\Utilfunctions have been deprecated:-
OCP\\Util::linkToRoutehas been deprecated in favour of\\OCP\\IURLGenerator::linkToRoute -
OCP\\Util::linkTohas been deprecated in favour of\\OCP\\IURLGenerator::linkTo -
OCP\\Util::imagePathhas been deprecated in favour of\\OCP\\IURLGenerator::imagePath -
OCP\\Util::isValidPathhas been deprecated in favour of\\OCP\\IURLGenerator::imagePath
-
10.0
-
An API added in one version of ownCloud only needs to be maintained as long as that version is not End of Life (EOL)
-
An API can be removed completely in a future version of ownCloud if the release date of the version is later than the EOL date of the previous version
-
Before removing an API completely, it needs to deprecated for at least a year. This is done by adding @deprecated tags.
-
OCP\\IDb: This interface and the implementing classes will be removed in favor ofOCP\\IDbConnection. Various layers in between have also been removed to be consistent with the PDO classes. This leads to the following changes:-
Replace all calls on the db using
getInsertIdwithlastInsertId -
Replace all calls on the db using
prepareQuerywithprepare -
The
__constructmethod ofOCP\\AppFramework\\Db\\Mapperno longer requires an instance ofOCP\\IDbbut an instance ofOCP\\IDbConnection -
The
executemethod onOCP\\AppFramework\\Db\\Mapperno longer returns an instance ofOC_DB_StatementWrapperbut an instance ofPDOStatement
-
9.0
-
The following methods have been moved into the
OCP\\Template::<method>class instead of being namespaced directly:-
OCP\\image_path -
OCP\\mimetype_icon -
OCP\\preview_icon -
OCP\\publicPreview_icon -
OCP\\human_file_size -
OCP\\relative_modified_date -
OCP\\html_select_options
-
-
OCP\\simple_file_sizehas been deprecated in favour ofOCP\\Template::human_file_size -
The
OCP\\PERMISSION_<permission>andOCP\\FILENAME_INVALID_CHARShave been moved toOCP\\Constants::<old name> -
The
OC_GROUP_BACKEND_<method>andOC_USER_BACKEND_<method>have been moved toOC_Group_Backend::<method>andOC_User_Backend::<method>respectively
8.3
-
OCP\AppFramework\IApi: full class
-
OCP\AppFramework\IAppContainer: methods
getCoreApiandlog -
OCP\AppFramework\Controller: methods
params,getParams,method,getUploadedFile,env,cookie,render