Commit Graph

70 Commits

Author SHA1 Message Date
Hugo Sales
0ab6c2ef54
[DB] Add entity base class to allow sharing methods such as 'create' 2021-09-14 13:05:50 +01:00
Hugo Sales
4ba71426b6
[MODULE] Reload modules if modified, except in production environment 2021-09-14 13:05:48 +01:00
Hugo Sales
62e093c650
[EVENT][ROUTES] Add event to allow modules to add routes, 'add_route' 2021-09-14 13:05:47 +01:00
Hugo Sales
152828ed68
[FRAMEWORK] Avoid double initializing the framework 2021-09-14 13:05:47 +01:00
Hugo Sales
aac653d2bd
[EVENT] Fix event handler and rename events to snake_case 2021-09-14 13:05:47 +01:00
Hugo Sales
bc9de1c0fa
[MODULE] Added module base class 2021-09-14 13:05:47 +01:00
Hugo Sales
292c9dc862
[COMPOSER][MODULE] Add autoloading rules for components and plugins 2021-09-14 13:05:46 +01:00
Hugo Sales
04e31d273d
[MAIL] Make mailserver a required service 2021-09-14 13:05:46 +01:00
Hugo Sales
93f576679c
[FORM] Add Form::handle which automagically creates a form, handles a request, and writes the data to the given entity and update Form::create to do some more magic as well 2021-09-14 13:05:45 +01:00
Hugo Sales
22e292276c
[CORE][SECURITY][UX] Save previous url on /register and /logout 2021-09-14 13:05:45 +01:00
Hugo Sales
db32a5fcfc
[DATABASE][TOOLS] Update local_user, SchemaDefDriver and bin/generate_entity_fields to use the phone_number type (which maps to a varchar 35 and does validation) 2021-09-14 13:05:44 +01:00
Hugo Sales
17f854b1d9
[CORE][UX] Save previous url to redirect back after registering 2021-09-14 13:05:44 +01:00
Hugo Sales
1e911f1ba4
[FORM] Add Form::isRequired 2021-09-14 13:05:43 +01:00
Hugo Sales
6adb527fe0
[DATABASE] Refactor DB.php and make findBy always return an array, instead of a doctrine collection 2021-09-14 13:05:43 +01:00
Hugo Sales
7c6112b887
[FORM][WRAPPER] Merge argument options, not replace 2021-09-14 13:05:41 +01:00
Hugo Sales
7a7f7d3ae1
[MAILER][WRAPPER] Add mailer wrapper that respects the configuration 2021-09-14 13:05:41 +01:00
Hugo Sales
7c35fde8bc
[FIX] Fix bug in DATABASE.php, since findBy can return different types 2021-09-14 13:05:41 +01:00
Hugo Sales
c0da90bd3e
[COMMON][SECURITY][WRAPPER] Added security service static wrapper and Common::getUser 2021-09-14 13:05:41 +01:00
Hugo Sales
97fd7620e7
[CORE][ROUTES] Small refactor on entrypoint and RouteLoader 2021-09-14 13:05:41 +01:00
Hugo Sales
cac00dd6d4
[CONTROLLER][ROUTES] Refactor the base Controller to not reinvent the wheel too much and rely on Symfony's events 2021-09-14 13:05:40 +01:00
Hugo Sales
59fcd042e9
[DEFAULTS] Add password hashing algorithm default settings 2021-09-14 13:05:40 +01:00
Hugo Sales
0eba267a73
[LOGIN] Implement password checking and related systems 2021-09-14 13:05:40 +01:00
Hugo Sales
f3ccdf8017
[USER] Add UserRoles 2021-09-14 13:05:40 +01:00
Hugo Sales
ae373c7d96
[DEFAULTS][FIX] Fix logic error that kept reloading the table when the file wasn't modified 2021-09-14 13:05:39 +01:00
Hugo Sales
3313897671
[UI][SESSION] Add login and logout pages 2021-09-14 13:05:39 +01:00
Hugo Sales
284fbe2c5b
[CORE] Refactor GNUsocial.php so it initializes itself as a service 2021-09-14 13:05:39 +01:00
Hugo Sales
e482ecfb87
[I18N] Remove support for context until it proves necessary, as it broke the code 2021-09-14 13:05:39 +01:00
Hugo Sales
fffa17448f
[CORE][I18n][DEFAULTS] Remove I18nHelper 2021-09-14 13:05:38 +01:00
Hugo Sales
07c033de33
[DEFAULTS] Update default reserved usernames 2021-09-14 13:05:38 +01:00
Hugo Sales
3992629a08
[DATABASE][WRAPPER] Add findBy method which allows finding entities with a complex expression 2021-09-14 13:05:38 +01:00
Hugo Sales
643a937152
[DATABASE][WRAPPER] Update DATABASE wrapper so entity names are provided without the namespace 2021-09-14 13:05:36 +01:00
Hugo Sales
09c2a762ef
[CACHE] Fix usage of the redis extension 2021-09-14 13:05:35 +01:00
Hugo Sales
31ad75564f
[CACHE][Redis] Add special support for redis (fixed size lists), set method and general fixes 2021-09-14 13:05:35 +01:00
Hugo Sales
c549bea4a9
[CACHE] Add support for multiple pools with the syntax (as an example) SOCIAL_CACHE_ADAPTER='default=redis://localhost:6379,memcached://localhost:11211;db.config=apcu://' 2021-09-14 13:05:35 +01:00
Hugo Sales
cfe1901b51
[DEFAULTS] Add modified time to config table (as value) and only reload the defaults if the file is newer 2021-09-14 13:05:35 +01:00
Hugo Sales
e91a141474
[CACHE] Extend the static wrapper to support working with lists in caches that don't natively support them 2021-09-14 13:05:34 +01:00
Hugo Sales
0e0321cfef
[DEFAULTS][FIX] Fix defaults to use value from environment 2021-09-14 13:05:34 +01:00
Hugo Sales
9d2f6e7425
[CACHE][WRAPPER] Fix cache wrapper 2021-09-14 13:05:34 +01:00
Hugo Sales
4f85594bec
[FORMATTING][DEFAULTS] Fix formatting and remove redundant config defaults 2021-09-14 13:05:34 +01:00
Hugo Sales
65cc487a29
[CACHE] Add a static wrapper around symfony/cache 2021-09-14 13:05:33 +01:00
Hugo Sales
aae883880f
[LOG][WRAPPER] Refactor log wrapper 2021-09-14 13:05:33 +01:00
Hugo Sales
d48cb3f0b8
[QUEUE] Add queueing wrapper, default configuration and example usage 2021-09-14 13:05:33 +01:00
Hugo Sales
8e30b9423b
[MODULES] Make ModulesManager check if file exists 2021-09-14 13:05:33 +01:00
Hugo Sales
59b2b98537
[CONTROLLER] Add Controller base class, which handles rendering templates if requested HTML or json, accordingly 2021-09-14 13:05:32 +01:00
Hugo Sales
5eae3dc351
[CORE][DATABASE] Replace zero dates with CURRENT_TIMESTAMP and add defaults to all 'created' or 'modified'
This commit is a port from v2's 9a515b9234 ([SCHEMA] Improve timestamp storage) to v3.

As explained by Alexei Sorokin:

Avoid the use of deprecated MariaDATABASE "zero dates" globally. If they're present
as attribute defaults somewhere, they will be replaced with NULL implicitly.
The existing "zero dates" in MariaDATABASE storage will be left intact and this
should not present any issues.

The "timestamp" type in table definitions now corresponds to DATETIME in
MariaDATABASE with "DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", which
should be close enough to the original behaviour for compatibility purposes.
It is now the recommended type for "modified" attributes, because of the
update trigger on MariaDATABASE. But there is no such trigger implemented on
PostgreSQL as of this moment.
2021-09-14 13:05:29 +01:00
Hugo Sales
e286f39551
[DEFAULTS] Small fixes and add check of SOCIAL_NO_RELOAD_DEFAULTS from the environment, to override the reloading of default values 2021-09-14 13:05:29 +01:00
Hugo Sales
b7a8861f55
[CORE][Event] Move GSEvent to Event, no longer a name collision 2021-09-14 13:05:28 +01:00
Hugo Sales
b32e173749
[FORM] Added Symfony Form wrapper 2021-09-14 13:05:28 +01:00
Hugo Sales
bc6ead4ab1
[CORE][Symfony] Fixed deprecation resultant from Symfony 5.1 upgrade
User Deprecated: Since symfony/framework-bundle 5.1: Using type
"Symfony\Component\Routing\RouteCollectionBuilder" for argument 1 of
method "App\Kernel:configureRoutes()" is deprecated, use
"Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator"
instead.
2021-09-14 13:05:28 +01:00
Hugo Sales
753f852941
[I18N] Fix implementation of I18nHelper::formatICU 2021-09-14 13:05:28 +01:00