* perf(core,mentions): limit `mentionedBy` post relation results
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* chore: use a static property to allow customization
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: use a static property to allow customization
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: include count in show post endpoint
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: consistent locale key format
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: forgot to delete `FilterVisiblePosts`
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* test: `mentionedByCount` must not include invisible posts to actor
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: visibility scoping on `mentionedByCount`
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: `loadAggregates` conflicts with visibility scopers
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* chore: phpstan
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
---------
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
* 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
* Update framework/core/src/Extend/Model.php
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
We can't update to larastan v2 until we update to laravel v9 which has to wait for Flarum v2, so we need to stay on phpstan v1.8
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>