Sami Mazouz
379298acb0
feat: add support for PgSQL ( #3985 )
...
* feat: add support for `PgSQL`
* chore: generate dump
* feat: query exception errors db driver hint
* feat: allow defining supported databases
* chore: review comments
* feat: setting for pgsql preferred search config
2024-06-22 08:03:56 +01:00
Sami Mazouz
a8777c6198
refactor: JSON:API ( #3971 )
...
* refactor: json:api refactor iteration 1
* chore: delete dead code
* fix: regressions
* chore: move additions/changes to package
* feat: AccessTokenResource
* feat: allow dependency injection in resources
* feat: `ApiResource` extender
* feat: improve
* feat: refactor tags extension
* feat: refactor flags extension
* fix: regressions
* fix: drop bc layer
* feat: refactor suspend extension
* feat: refactor subscriptions extension
* feat: refactor approval extension
* feat: refactor sticky extension
* feat: refactor nicknames extension
* feat: refactor mentions extension
* feat: refactor lock extension
* feat: refactor likes extension
* chore: merge conflicts
* feat: refactor extension-manager extension
* feat: context current endpoint helpers
* chore: minor
* feat: cleaner sortmap implementation
* chore: drop old package
* chore: not needed (auto scoping)
* fix: actor only fields
* refactor: simplify index endpoint
* feat: eager loading
* test: adapt
* test: phpstan
* test: adapt
* fix: typing
* fix: approving content
* tet: adapt frontend tests
* chore: typings
* chore: review
* fix: breaking change
2024-06-21 09:36:32 +01:00
Sami Mazouz
eb6e599df1
feat: add support for SQLite
( #3984 )
...
* feat: add support for sqlite
* chore: add warning on install
* fix: ignore constraints before transaction begins
* chore: update workflow
* Apply fixes from StyleCI
* chore: generate sqlite dump and manually add foreign keys
* chore: fix actions
* chore: fix actions
* chore: fix actions
* chore: fix actions
* chore: fix actions
* chore: fix actions
* test: fix
* Apply fixes from StyleCI
* fix: sqlite with db prefix
* Apply fixes from StyleCI
* fix: statistics sqlite
2024-06-21 07:25:11 +01:00
StyleCI Bot
5399c86a1b
Apply fixes from StyleCI
2024-01-09 15:06:12 +00:00
Tristian Kelly
46357ee9a9
perf(flags): add pagination to flags list ( #3931 )
2023-11-23 18:11:46 +01:00
Sami Mazouz
e2281a2123
chore: handle deprecations from 1.x ( #3909 )
...
* chore: drop deprecated `post_number_index` column
* chore: remove deprecated `FlagsWillBeDeleted` event
* chore: `Migration::addSettings` can still be needed
* chore: `settings->get` default can still be needed
* chore: deprecated `$default` in `Settings::serializeToForum` extender
* chore: deprecated request `actor` attribute
* chore: already handled
* chore: remove `RecompileFrontendAssets::whenSettingsSaved`
* chore: remove `getReadIds`
* chore: `Model::dateAttribute` extender
* chore: `evented` js util
* chore: `WelcomeHero` js hidden prop
* chore: attributes pushData with relations
* chore: app request options `extract`
* chore: itemlist deprecations
* chore: `search` state
* chore: `getMentionText`
* chore: deprecated non-registered store type
* chore: `Button` title
* chore: `Modal` deprecations
* chore
* chore: deprecated `less` mixins
* Apply fixes from StyleCI
* fix
* fix: phpstan
* fix
* fix
---------
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-11-10 21:20:18 +00:00
Ngô Quốc Đạt
015529ff1e
Use ::class
syntax to fetch class name instead of get_class()
function ( #3910 )
2023-10-29 14:43:58 +01:00
IanM
6bc19e2e52
chore: Upgrade dependencies ( #3830 )
...
* wip: laraval and symfony upgrades
* Apply fixes from StyleCI
* Apply fixes from StyleCI
* bump var dumper to 6.3
* require guzzle 7.7
* remove docbloc
* lock symfony/translation-contracts to 2.5
* fix: require mailgun package
* remove docblock
* fix: flysystem tests
* fix: instance flarum assets for testing
* Apply fixes from StyleCI
* downgrade intervention/image back to 2.x
* Apply fixes from StyleCI
* provide ImageManager to AvatarUploader
* fix larastan
* revert back some other intervention/image changes
* fix image resize
* Update framework/core/src/Http/Middleware/AuthenticateWithHeader.php
Co-authored-by: Daniël Klabbers <luceos@users.noreply.github.com>
* Apply fixes from StyleCI
* Update framework/core/src/Mail/SmtpDriver.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/src/User/LoginProvider.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* use named attrs
* revert imagemanager in constructor
* revert to using Contract mailer
* reinstate and update FlarumLogTransport
* correct var typo, use one less temp var
* names attrs
* uncomment test
* mailer contract
* Apply fixes from StyleCI
---------
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Daniël Klabbers <luceos@users.noreply.github.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-14 14:46:15 +01:00
Sami Mazouz
6f11e044a7
chore: update codebase to php8.1 ( #3827 )
...
* chore: set minimum php version to 8.1
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: update codebase to php8.1
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* chore: update workflow php version
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: more caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: phpstan caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: introduce `Flarum\Locale\TranslatorInterface`
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* chore: remove mixin
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: one last error
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
---------
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-05-30 11:36:12 +01:00
Sami Mazouz
da1bf8da21
chore(phpstan): enable phpstan in bundled extensions ( #3667 )
...
* feat(phpstan): pick up extended model relations typings
* feat(phpstan): pick up extended model date attributes
* feat(core): introduce `castAttribute` extender
Stops using `dates` as it's deprecated in laravel 8
* feat(phpstan): pick up extended model attributes through casts
* fix: extenders not resolved when declared namespace
* fix(phpstan): new model attributes are always nullable
* chore(phpstan): add helpful cache clearing command
* Apply fixes from StyleCI
* chore: improve extend files provider logic
* chore: rename `castAttribute` to just `cast`
* chore: update phpstan package to detect `cast` method
* chore: enable phpstan in bundled extensions
* chore: rebasing conflicts
* chore: rebasing conflicts
* chore: typings for latest 1.7 changes
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-19 21:49:38 +01:00
Ian Morland
07ebe5b57d
[chore] update deprecated event comments ( #41 )
2022-02-22 14:07:04 -05:00
Alexander Skvortsov
e3f051bf4b
fix: return user when creating flags ( #42 )
...
Fixes https://github.com/flarum/QualityAssurance/issues/41
When the API response is ingested by `pushObject`, since the flag instance is new, there is nothing to merge with, and therefore, there's no user on the flag instance in the store. As a result, the flag is displayed with "deleted" as the creating user until a page refresh occurs.
More broadly, this could be fixed by either:
- Refactoring the JSON API layer so that all singular operations return the same set of includes.
- Merging the API Paylod with sent data on model save (for new instances only).
But the former would require a major breaking rewrite, and the latter could introduce potentially unwanted side effects, and is effectively a bandaid over inconsistent backend behavior.
2022-01-13 16:39:00 -05:00
Alexander Skvortsov
99a82d0069
Apply fixes from StyleCI
2021-05-12 00:08:36 +00:00
Alexander Skvortsov
be59e77a01
Move in visibility scoping from tags, add automated testing.
2021-05-11 20:04:52 -04:00
Alexander Skvortsov
f80a88d45b
Use RequestUtil for accessing actor
2021-04-08 00:02:11 -04:00
Alexander Skvortsov
9936681634
Use Symfony translator contract instead of deprecated component
2021-04-08 00:00:49 -04:00
Sami Mazouz
d5149b7406
Eager load post.user.groups relation and allow extensions to eager load relations ( #38 )
...
* Allow extensions to eager load relations
* Eager load post.user.groups
2021-04-07 16:24:52 +01:00
Ian Morland
705ea7f2bc
Add Created and Deleting events ( #35 )
2021-01-25 08:49:27 -05:00
Sami Mazouz
c6e14394fd
Use new extenders ( #34 )
2020-12-08 11:43:56 -05:00
Matthew Kilgore
e9022d5710
Replace depreciated helpers with class variant
2020-07-25 18:41:01 -04:00
Matt Kilgore
e85063fbf7
Remove AssertPermissionTrait ( #26 )
...
* Remove AssertPermissionTrait
* Apply fixes from StyleCI
* Fix my dumb mistake
* Fix another small mistake ->assertRegistered
Co-authored-by: luceos <daniel+github@klabbers.email>
2020-07-20 08:02:29 +02:00
Franz Liedke
cf764d2c00
Use new Model extender
2020-04-24 15:55:19 +02:00
Franz Liedke
beb5329e42
Fix flagging check for all post types
...
Refs #18 .
2020-02-07 11:57:20 +01:00
Franz Liedke
e9a11b11d3
Tweak translation keys for consistency
...
Refs #18 .
2020-02-07 11:54:29 +01:00
Ian Morland
4344f71d99
Flag improvements/tweaks ( #18 )
...
* Option to allow users to flag their own post
* Increase size of "Flag Post" modal
* Allow optional reason detail for offtopic, inappropriate and spam reasons
* For other reasons, detail text is now required
* Switch to column type "text" to allow more details in reason
2020-02-07 11:23:10 +01:00
Franz Liedke
e64ca03985
Apply fixes from StyleCI
2019-11-29 23:02:02 +00:00
David Sevilla Martin
da37c9a0a5
Assert registered in /api/flags to fix issue with guests
2019-10-29 18:05:49 -04:00
lubo
8ec05c4905
bugfix when posts is not needed when showing discussion ( #17 )
...
When accessing /api/discussion/[id]?include=user, NOTICE occurs
2019-03-25 11:04:30 +01:00
Franz Liedke
8aab6111ec
Get rid of event subscribers that resolve services too early
...
Refs flarum/core#1578 .
2018-12-15 16:47:41 +01:00
Toby Zerner
ec60fed381
Database changes ( #15 )
...
* Implement database changes
* Split foreign keys into their own migration
* Use whereColumn
* Rename flag.time
* Rename forum.flagCount
* Rename forum.newFlagCount
2018-09-16 20:49:41 +02:00
Franz Liedke
5087ba4148
Remove unused imports
2018-02-08 18:26:43 +01:00
Franz Liedke
c797732e60
Use Routes extender
2018-02-08 18:21:29 +01:00
Franz Liedke
95f70cae7a
Adapt new bootstrap format, use Asset extender
2018-01-16 23:18:17 +01:00
Toby Zerner
d14b20ca74
Change fire → dispatch
...
See a6c5128b46
2018-01-11 12:44:22 +10:30
Toby Zerner
53b793845a
Fix class name
2017-12-27 16:09:35 +10:30
Franz Liedke
bd635b55f7
Fix class names
2017-10-03 19:45:26 +02:00
Franz Liedke
494f953ace
Update namespaces for beta 8
...
Refs flarum/core#1235 .
2017-10-01 19:56:38 +02:00
Toby Zerner
1a85493f19
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2016-11-29 05:29:39 +00:00
Toby Zerner
b6545a5f8e
Use new event name
2016-06-03 11:01:31 +09:30
Toby Zerner
bc1d5f9a7a
Applied fixes from StyleCI
2016-02-25 22:51:10 -05:00
Franz Liedke
301ff7e8b2
Expose creation time in flag serializer
...
Fixes flarum/core#651 .
2016-01-20 21:06:37 +01:00
Toby Zerner
379b1f0831
Expand reason descriptions and add configurable link to community guidelines
2015-11-04 12:59:29 +10:30
Toby Zerner
8d50251ec5
Make sure we don't accidentally load all of a discussion's posts
2015-11-02 22:17:21 +10:30
Toby Zerner
5be607a6a7
Translations are now automatically included
2015-11-02 18:52:17 +10:30
Toby Zerner
c39f4f01ea
Fix flag count queries
2015-10-31 14:49:44 +10:30
Toby Zerner
0ec3b0aabb
Update serializer API
2015-10-30 22:45:26 +10:30
Toby Zerner
50645c5db9
Update API relationship listener
2015-10-30 11:06:50 +10:30
Toby Zerner
e357d2b535
Add third state to flags header icon
...
closes flarum/core#500
2015-10-19 16:20:00 +10:30
Toby Zerner
8a1c5cf24c
Don't set flags relationship on non-hydrated posts
2015-10-14 12:26:13 +10:30
Toby Zerner
5f9d45c4ab
Update for composer branch
2015-10-11 18:51:25 +10:30