Commit Graph

72 Commits

Author SHA1 Message Date
Diogo Peralta Cordeiro d27e8610d6
[CORE][DB] DB:removeBy Accept class name instead of table. 2022-01-02 23:50:14 +00:00
Hugo Sales 76440961ca
[CORE][DB] Add option to findOneBy to return null rather than throw 2021-12-27 20:37:16 +00:00
Hugo Sales b84315c95b
[TOOLS] Fix errors reported by PHPStan at level 4 2021-12-27 17:35:33 +00:00
Hugo Sales 7f65b23074
[DB] Allow mentioning 'note' in a DQL query (in quotes), in order to be able to search in the activity table (previously would be replaced by the class name) 2021-12-21 12:44:34 +00:00
Hugo Sales 9f445632b2
[PLUGIN][TagBasedFiltering] Expand to allow filtering by actor tags 2021-12-05 17:55:49 +00:00
Diogo Peralta Cordeiro d044039272
[FreeNetwork] Initial multi-protocol support 2021-12-02 14:23:21 +00:00
Hugo Sales d4c77925d2
[CORE][DB][ENTITY][Actor] Make DB::dql return a chunked array if selecting multiple entities, remove partitioning from callsite
`DB::dql('select a, b, from a join b')` would previously return `[a,
b, a, b, ...]` (or even `[b, a, b, a, ...]`), and now will return
`[[a, a, ...], [b, b, ...]]`. The issue would be further compounded
when selecting even more entities, where the order would be
unpredictable
2021-12-01 19:47:42 +00:00
Hugo Sales 4f7e243bee
[CORE][DB] Don't do column renaming if a list of entities is specified 2021-12-01 19:47:41 +00:00
Diogo Peralta Cordeiro 424df54a1b
[ActivityPub] Add HTTP Signatures 2021-12-01 19:47:41 +00:00
Hugo Sales 3227018963
[CORE][DB] Allow specifying the entites to be retrieved, as when using renaming, tables in join would attempt to be selected 2021-11-29 22:42:50 +00:00
Hugo Sales fc81f7301c
[CORE][DB][ENTITY][Actor] Add `DB::removeBy` and use it in `Actor->setSelfTags` 2021-11-29 22:42:50 +00:00
Hugo Sales cdc8886bb8
[CORE][DB] Rename parameters 'orderBy' to 'order_by' 2021-11-26 23:34:37 +00:00
Diogo Peralta Cordeiro 0ab8febab3
[CORE][DB] Document magic methods 2021-11-26 15:11:51 +00:00
Hugo Sales 7d8819a3da
[DB][CONTROLLER][Network][ENTITY][Note] Fix Note::getAllNotes 2021-11-09 23:38:37 +00:00
Hugo Sales 1d84f1629e
[CORE][DB] Make DB::sql not error when selecting from tables with columns of the same name and remove the second enitites paramter, calculating it internally instead 2021-11-08 20:32:10 +00:00
Hugo Sales 1960f6944f
[CORE][DB] Fix error in regex that prevented selecting collumns that are named the same way a column is 2021-11-02 11:14:59 +00:00
Hugo Sales 2694d83ae4
[TOOLS][CS-FIXER] Run new PHP CS Fixer config. Notably, adds strict_types 2021-10-27 04:19:30 +01:00
Eliseu Amaro 99fd2f725b
[Core][Util] Hotfix: In App\Core\DB\DB persistWithSameId, casting the id to an int. In App\Util\HTML html, tag is now evaluated beforehand, making sure it's a string. 2021-10-27 04:19:30 +01:00
Diogo Peralta Cordeiro 8fdc52636f
[ActivityPub] Port RSA 2021-10-27 04:19:29 +01:00
Hugo Sales 9109c61af5
[TOOLS][CS-FIXER] Run new PHP CS Fixer config. Notably, adds strict_types 2021-10-27 04:19:28 +01:00
Hugo Sales ce80065775
[DB] Add mechanism for specifying limit and offset in dql query 2021-09-21 11:04:26 +01:00
Hugo Sales c69b28d894
[CORE] Fix `Undefined array key 0` in `DB::filterTableName` 2021-09-14 13:13:45 +01:00
Hugo Sales 4e30e5aad9
[TOOLS] Fix all issues found by PHPStan level 2 2021-09-14 13:13:44 +01:00
Hugo Sales add8f4a52f
[TOOLS] Fix all errors found by PHPStan level 1 2021-09-14 13:13:42 +01:00
Hugo Sales fe86735b8b
[DB][DOCUMENTATION] Explain limit: 2 in findOneBy 2021-09-14 13:13:28 +01:00
Hugo Sales 2dd3511149
[CORE][DB] Specify desired case in array_change_case, for clarity 2021-09-14 13:13:19 +01:00
Hugo Sales af5526d720
[DB] Refactor findOneBy method 2021-09-14 13:13:15 +01:00
Hugo Sales 8317c612ff
[DB] Handle using methods with class name as well as table name and add lookup methods 2021-09-14 13:13:13 +01:00
Hugo Sales 6d93b6fb32
[TESTS] Raise App\Core\DB\DB test coverage to 100% and fix issues found 2021-09-14 13:13:01 +01:00
Hugo Sales d31c3b1784
[AUTOGENERATED] Update autogenerated code 2021-09-14 13:13:01 +01:00
Hugo Sales 1b8f5b7bf0
[DB] Make DB::findOneBy throw a different exception if two values are found 2021-09-14 13:12:23 +01:00
Hugo Sales 7a90e844b7
[SECURITY][DB] Make user register 'atomic', by using a single transaction for inserting all objects, to avoid partial inserts 2021-09-14 13:12:23 +01:00
Hugo Sales 19850b5e0d
[DB] Fix bug in custom criteria format wrangling 2021-09-14 13:11:51 +01:00
Hugo Sales 7284c833a6
[DB] Allow DQL queries with table name rather than entity 2021-09-14 13:11:50 +01:00
Hugo Sales 9659762726
[DB] Add table map which allows using table names rather than entities in Doctrine operations 2021-09-14 13:11:50 +01:00
Hugo Sales 1687ecaa24
[FAVOURITE] Temporary commit to fix exception in timeline 2021-09-14 13:11:48 +01:00
Hugo Sales faa362e2e2
[DB] Remove unique constraint from GSActor.nickname and fix register and related functionality 2021-09-14 13:10:23 +01:00
Hugo Sales 1028f05cd8
[TESTS] Fix unkept unit tests 2021-09-14 13:10:21 +01:00
Hugo Sales 460712e15e
[GIT] Change my email to the new one in all files and bump copyright year 2021-09-14 13:06:56 +01:00
Hugo Sales 74e586182d
[DB] Merge definition of SchemaDefDriver with SchemaDefPass for clarity 2021-09-14 13:06:56 +01:00
Hugo Sales e8feb2ae84
[DOCUMENTATION][REFACTOR] Add documentation to all flagged function and do some small cleanup 2021-09-14 13:06:55 +01:00
Hugo Sales e949dd654a
[CONFIG] Various fixes to use new configuration format 2021-09-14 13:06:54 +01:00
Hugo Sales dd40255c4a
[CONFIG][DB] Remove config from the database, put it in yaml, so it can be baked into the container 2021-09-14 13:06:53 +01:00
Hugo Sales 63d2d58e9e
[EXCEPTION] Make findOne return NotFoundException 2021-09-14 13:06:52 +01:00
Hugo Sales c0ce25c352
[MODULES] Fix module manager dev-mode rebuild 2021-09-14 13:06:52 +01:00
Hugo Sales e1181ab998
[DB][DEFAULTS] Change attachment storage location from uploads to attachments 2021-09-14 13:06:49 +01:00
Hugo Sales 80cefca90d
[DB] Add wrapper for making native queries 2021-09-14 13:06:48 +01:00
Hugo Sales ea4f2c522b
[DB] Add support for calling methods with FQCN 2021-09-14 13:06:47 +01:00
Hugo Sales 0b50905ac8
[NOTE][UI] Add note replying and UI displaying 2021-09-14 13:06:45 +01:00
Hugo Sales 44d4aade95
[DB][DEFAULTS] Add avatar/default 2021-09-14 13:05:55 +01:00