This adds support for all Doctrine supported types, for the column types only the immutable variants needed to be added.
But especially those types are the important ones, as our **Entity** class works by detecting changes through setters.
Meaning if it is mutable, changes like `$entity->date->modfiy()` can not be detected, so the immutable types make more sense here.
Similar the parameter types needed to be added.
`Enity` and `QBMapper` needed to be adjusted so they support (auto map) those types, required when insert or update an entity.
Also added more tests, especially to make sure the mapper really serializes the values correctly.
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Resolves: https://github.com/nextcloud/server/issues/48629
While the database supports NULL, the typing has always said it only returns *string*.
So to not break any apps that might trust the typings we should return `''` if the database is set to `NULL`.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
When changing preview parameters (size, format, …), one can simply delete the preview folder and run
files:scan-app-data in order to retrigger updated preview recreation because files are absent.
However, that's not possible when using ObjectStorage as primary storage, as there's no concept of
"preview folder".
This command allows to simply delete and recreate the preview folder properly from
Nextcloud, so that the abstraction levels handle all the subfolder & file deleting part.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This change should make it easier to spot wrong uses of the HTTP client on development setups where allow_local_remote_servers is usually true.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
It is replaced with the Sabre `ZipFolderPlugin` and apps should use the `OCP\AppFramework\Http\StreamResponse`.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Currently there is a problem if an exception is thrown in `User::delete`,
because at that point the user is already removed from the backend,
but not all data is deleted.
There is no way to recover from this state, as the user is gone no information is available anymore.
This means the data is still available on the server but can not removed by any API anymore.
The solution here is to first set a flag and backup the user home,
this can be used to recover failed user deletions in a way the delete can be re-tried.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This feature is important for nextcloud running on
distributions like NixOS, where all the standard
search paths do not exist.
Also added tests.
This fixes issue #43922
Co-authored-by: Daniel <mail@danielkesselberg.de>
Signed-off-by: Reno Reckling <e-github@wthack.de>