Commit graph

89 commits

Author SHA1 Message Date
Jan Böhmer
06c8e584a4 Allow to import attachments and parameters via entity import
This fixes issue #363
2024-06-23 00:41:25 +02:00
Jan Böhmer
235d572f8c Use DatetimeImmutable instead of DateTime wherever possible 2024-06-22 17:36:54 +02:00
Jan Böhmer
5074e2beac Fixed phpunit tests 2024-06-22 00:44:59 +02:00
Jan Böhmer
20f32c7f12 Applied rector suggestions 2024-06-22 00:31:43 +02:00
Jan Böhmer
7ad2fab53d Fixed exception related that Datetimeimmutables were used were doctrine expected mutable ones
this prevented the saving of parts from info providers
2024-06-13 23:41:35 +02:00
Jan Böhmer
dc7c13479c Add proper length constraint validations to all string mapped ORM fields, so they show a nice validation error, instead of a 500 error
Fixes issue #544
2024-03-06 19:46:11 +01:00
Jan Böhmer
3d67ad870a Added tests for all API endpoints of Structural elements 2024-03-03 21:52:26 +01:00
Jan Böhmer
7b5ae70de3 Added tests for the Attachments API endpoint 2024-03-03 21:02:15 +01:00
Jan Böhmer
42e604245c Fixed some inspection issues 2024-03-03 19:57:31 +01:00
Jan Böhmer
3585b8a56a Adapter attachment upload forms to the new system 2024-03-03 18:52:06 +01:00
Jan Böhmer
0c33059c4e Allow to upload files to attachments by passing a base64 encoded file 2024-03-03 18:40:35 +01:00
Jan Böhmer
e3d2012809 Use a own discriminator map for the Attachment API Platform discriminator 2024-03-02 21:45:16 +01:00
Jan Böhmer
ce768764cc Allow to create Attachments for all entity types using the API
This fixes issue #502
2024-03-02 21:39:30 +01:00
Jan Böhmer
16b3d58242 Implemented basic discriminator map for Attachment API access. Now we can properly create part attachments using a POST operation 2024-03-02 21:21:16 +01:00
Jan Böhmer
3cc1fb40f0 Fixed problem that no datastructures with an parent element could be created/edited via API
This fixes issue #512.
The error was introduced when trying to allow the modification of attachments/parameters throught the parent element. We need a seperate write scope to the element, or we end up with an infinite loop.
2024-02-06 22:42:25 +01:00
Jan Böhmer
aad62f2599 Disable POST operations for Attachment and AbstractParameter groups for now, as they can not work properly
As they work on abstract classes, they can not be initialized directly currently and you need to create them via a PATCH operation on their owning elements.
2024-01-28 19:53:33 +01:00
Jan Böhmer
7ae0fad356 Allow to create attachments and parameters via PATCH operations on their owning elemens as direct POST operations are not possible yet
This partly fixes issue #502
2024-01-28 19:50:59 +01:00
Jan Böhmer
f53c98312e Escape space in attachment URLs with %20
Fixes issue #401
2023-10-15 00:50:43 +02:00
Jan Böhmer
64c38042a0 Added missing lastModified and creationDate fields to API response 2023-10-04 00:08:10 +02:00
Jan Böhmer
e09f60e71f Allow to filter attachments API response by attachment types 2023-10-03 23:58:41 +02:00
Jan Böhmer
3df47ed748 Added filters to various endpoints to allow searching for parts 2023-10-03 16:29:04 +02:00
Jan Böhmer
7bd44484be Added documentation for virtual fields of Attachment and Part entity 2023-10-02 00:22:15 +02:00
Jan Böhmer
87e881f8e0 Show attachments and preview image in API response 2023-09-18 23:38:06 +02:00
Jan Böhmer
077beb37b1 Added endpoints for attachments 2023-09-18 21:57:17 +02:00
Jan Böhmer
0af5a58dbe Renamed Storelocation entity to StorageLocation 2023-09-04 22:57:40 +02:00
Jan Böhmer
c981476706 Use proper way of overriding doctrine attributes
In older versions doctrine allowed overriding attributes, by simply redifining them in subclasses. In 2.16 this throws an exception. We now use the proper way using the AttributeOverrides attribute
2023-08-01 15:55:21 +02:00
Jan Böhmer
15ba6572df Try to detect if an external attachment is an image or not.
Before we assumed that it is a picture in all cases.
2023-07-29 18:50:18 +02:00
Jan Böhmer
e8771ea118 Fixed some more phpstan issues 2023-06-18 00:00:58 +02:00
Jan Böhmer
19530a9102 Fixed some PHPStan level 5 issues 2023-06-13 20:24:54 +02:00
Jan Böhmer
fc3290271c Started to increase the phpstan level 2023-06-13 10:36:34 +02:00
Jan Böhmer
930adaf439 Moved custom validators from annotations to attributes 2023-06-11 19:32:15 +02:00
Jan Böhmer
6a2ff9d153 Added declare strict types to all files 2023-06-11 18:59:07 +02:00
Jan Böhmer
684334ba22 Improved code style of tests 2023-06-11 15:02:59 +02:00
Jan Böhmer
5629215ce4 Use imports instead of FQNs 2023-06-11 15:00:28 +02:00
Jan Böhmer
7ee01d9a05 Applied rector with PHP8.1 migration rules 2023-06-11 14:17:19 +02:00
Jan Böhmer
dc6a67c2f0 Made the ALLOWED_ELEMENT_CLASS protected so we can apply rector
Its bad style to override a public const in a child class
2023-06-11 14:02:59 +02:00
Jan Böhmer
0bc4699cdc Started to move doctrine annotations to attributes (rector automated) 2023-05-28 01:33:45 +02:00
Jan Böhmer
a43af180a7 Applied rector rules up to symfony 6.2 2023-05-28 01:21:05 +02:00
Jan Böhmer
1dbf36b86b Use str_contains and similar instead of strpos 2023-05-27 23:58:28 +02:00
Jan Böhmer
d04d743520 Fixed typos 2023-04-15 23:14:53 +02:00
Jan Böhmer
de96aae9a5 Fixed inspection issues 2023-04-15 21:49:19 +02:00
Jan Böhmer
52e459ec60 Use the name of an uploaded file for an attachment when no explicit name was set. 2023-03-05 23:47:45 +01:00
Jan Böhmer
0c7ec9f0c7 Added some basic DB fields for the new project system 2022-12-18 20:34:25 +01:00
Jan Böhmer
8ae4e9fe05 Fixed some inspection issues 2022-12-18 19:45:04 +01:00
Jan Böhmer
68462185ba Removed old GPLv2 copyright header 2022-11-29 22:28:53 +01:00
Jan Böhmer
ed91ffc60a Add database indices to improve performance 2022-09-25 18:33:13 +02:00
Jan Böhmer
51e05a8669 Use typed properties 2022-09-18 22:59:31 +02:00
Jan Böhmer
639829f5c5 Fixed some inspection issues. 2022-08-14 19:32:53 +02:00
Jan Böhmer
082cd16486 Disallow attachments without attachment types.
This should partly fixes issue #131. TODO: Change database structure so attachment_type is not nullable.
2022-07-22 00:48:51 +02:00
Jan Böhmer
15a31433e1 Fixed PHPstan warnings. 2022-03-04 13:22:40 +01:00