Commit Graph

29 Commits (jtr/fix-public-exceptions-http-codes)

Author SHA1 Message Date
Carl Schwan 336cc3fa35 feat(Db): Use SnowflakeId for previews
Allow to get an id for the storing the preview on disk before inserting
the preview on the DB.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-28 17:50:03 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Anna Larch 1562db80b1 fix: remove typing and return type
Signed-off-by: Anna Larch <anna@nextcloud.com>
2025-01-23 18:34:19 +07:00
Joas Schilling 54c3aa3f99
fix(entity): Fix mapping of old/sub-types to actually supported database types
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-23 09:22:05 +07:00
Ferdinand Thiessen 0e54c2bd43
fix: Adjust Entity types
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +07:00
Ferdinand Thiessen ee02e3246d
feat(AppFramework): Add full support for date / time / datetime columns
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>
2024-10-17 18:31:42 +07:00
Kate 8a32881633
Merge pull request #48008 from nextcloud/fix/entity/strict-types 2024-09-16 11:08:35 +07:00
Anna Larch 6c36c54dc6 feat(db): switch from settype to casts
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-15 19:26:58 +07:00
provokateurin 247b1dd70e
fix(Entity): Fix magic setter call for custom strong typed setters
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-15 15:14:54 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Faraz Samapoor bf38c0a3d1 Refactors "strpos" calls in lib/public to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-06-05 11:14:52 +07:00
Côme Chilliet e91457d9cd
Improve typing in Entity.php
Removing @method in Entity brings even more errors.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:22:09 +07:00
Thomas Citharel 1d30fb7852
Fix reading blob data as resource
PostgreSQL returns data as resource when using IQueryBuilder::PARAM_LOB
(which is used for QBMapper).

Previously we just converted this resource using settype, which produced
things like "Resource id #14" instead of the actual resource data.

Now we read the stream correctly if the returned data is a resource

See context at #22472

Fixes #22439

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-07-25 09:45:47 +07:00
Carl Schwan 7817845538 Add a metadata service to store file metadata
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-13 14:06:29 +07:00
Christoph Wurst 3e078ffa1b
Deprecate entity slugs
They are only used a single time in the whole Nextcloud Github
organization. We can inline the code there and slim down the public API.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-12-14 09:50:29 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Joas Schilling 5c4c527245
Add datetime support to QBMapper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-01 11:59:19 +07:00
Christoph Wurst 3bc54bfd06
Fix writing BLOBs to postgres with recent contacts interaction
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-28 14:30:33 +07:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +07:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +07:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Daniel Kesselberg a27c10daa6
Make isXXX available for bool properties only
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-11-16 00:39:48 +07:00
Christoph Wurst ce9a434fb2
Add isXXX getter to Entity
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-10-22 14:54:21 +07:00
Joas Schilling ba87db3fcc
Fix others 2016-07-21 18:13:57 +07:00
Roeland Jago Douma e47b186d51
Move \OCP\AppFramework to PSR-4 2016-05-06 20:38:34 +07:00