1
0
mirror of https://github.com/flarum/core.git synced 2025-06-14 18:51:27 +02:00
Commit Graph

4046 Commits

Author SHA1 Message Date
2e3197d510 Fix DiscussionListPane jumping around ()
Ensure that scroll position is retained between page changes, so if navigating via the sidebar, you don't need to re-scroll down every time.
2021-01-13 17:49:26 -05:00
85210ff6a1 Merge pull request from flarum/fl/tests-in-transaction
Run Backend Tests in Transactions
2021-01-12 21:26:59 -05:00
e5f277e640 Apply fixes from StyleCI
[ci skip] [skip ci]
2021-01-09 00:36:07 -05:00
4bac667dfd Fix fulltext search tests
Under InnoDB, database entries created in transactions are not processed by fulltext indexes until the transaction is committed. To work around this, cases that test fulltext search have been split off into a separate class that adds and removes seed discussions/posts outside of transactions during setUp/tearDown.
2021-01-09 00:35:55 -05:00
6771b3e3b7 Tests: purge settings cache
Some tests need to change settings, but since MemoryCacheSettingsRepository caches settings in-memory, those changes aren't reflected. The new `purgeSettingsCache` removes it from the container, eliminating that cache.

For UserTest, we also need to regenerate the display name driver, since that's set statically on boot, before we'll get a change to clear the settings cache.
2021-01-09 00:35:55 -05:00
fd79a14cac Tests: Add missing instantiation of data 2021-01-09 00:35:55 -05:00
c1aa1455d3 Tests: Comply with default permissions
Before transactions, each test class would need to explicitly state starting state for permissions, which made the initial permission configuration somewhat arbitrary. Now, we might as well use the initial state of the default installation.

One of the User show_test tests has been commented out until
2021-01-09 00:35:55 -05:00
ae280016e7 Tests: remove prepDb workaround
Previously, the `prepareDatabase` method would directly modify the database, booting the app in the process. This would prevent any extenders from being applied, since `->extend()` has no effect once the app is booted.

Since the new implementation of `prepareDatabase` simply registers seed data to be applied during app boot, the workaround of sticking this seed data into `prepDb` is no longer necessary, and seed data common to all test cases in a class can be provided in `setUp`.

When needed, app boot is explicitly triggered in individual test cases by calling `$this->app()`.
2021-01-09 00:35:55 -05:00
0a8816938a Add @inheritDoc to all setUp and tearDown methods 2021-01-09 00:35:55 -05:00
008ec95505 Boot app explicitly to run seeds in time 2021-01-09 00:35:47 -05:00
925628c208 Add vscode config to gitignore 2021-01-07 23:27:32 -05:00
aae83c4fbc Fix deleting posts/discussions by deleted user ()
Making the $user argument nullable prevents this unnecessary exception, and doesn't introduce any issues since we check that $user exists as part of the method.
2021-01-07 17:46:14 -05:00
cacc8b4945 Tests: Always start transaction before seeding 2021-01-07 17:34:13 -05:00
31765388c1 Tests: Stop using Eloquent models for seeding data 2021-01-07 17:34:13 -05:00
a08fd3e475 Tests: Rely on admin user, groups, permissions from test setup script 2021-01-07 17:34:06 -05:00
d4b2d89da0 Bundled output for commit 9b27b0d9d7 [skip ci] 2021-01-07 15:26:14 +00:00
9b27b0d9d7 Fix composer header hidden by mobile browser () 2021-01-07 10:25:12 -05:00
a47187462d Tests: DB tables no longer need to be truncated 2021-01-05 22:48:09 -05:00
843a149b80 Run integration tests in a transaction 2021-01-05 22:47:19 -05:00
94381dca62 Fix IOS scroll menu bug ()
Fixes https://github.com/flarum/core/issues/1959

These transform lines are known to cause issues on iOS, and were added to hack around chrome issues that have since been fixed upstream.
2021-01-05 19:40:11 -05:00
a2d5dd3397 Add default value to Settings extender () 2021-01-05 01:28:25 -05:00
f8edc2d827 npm audit fix v0.1.0-beta.15 2020-12-20 20:55:51 +01:00
62235a16ca Bundled output for commit 36c55e8f69 [skip ci] 2020-12-20 17:15:07 +00:00
36c55e8f69 Add ExtensionPermissionGrid to compat () 2020-12-20 12:14:00 -05:00
859f014539 beta 15 changelog and version constant 2020-12-18 20:02:22 +01:00
06e1d21331 Fixes validation failures of avatars that are jpg/jpeg ()
Due to a commit by @fabpot in october, the mimetypes symfony class
now re-orders the shortened mimetypes that are returned when looking
up based on header mimetype. Our validator uses the first key, pops
the prefix off and then matches against our hardcoded array.

I've added a constraint to symfony/mime ^5.2.0 which ships with this change.
This constraint is fully compatible with our current lineup. In addition
I changed the hardcoded array to use the first entry from symfony mime types
now `jpg` instead of `jpeg`.
2020-12-16 13:53:17 -05:00
fd5de6929e Bundled output for commit 84b1666b24 [skip ci] 2020-12-15 22:50:49 +00:00
84b1666b24 Support multiple callback-based settings per-extension 2020-12-15 17:49:24 -05:00
0c61fcc61c Clarify that request argument of render callbacks for Formatter must be either nullable or omitted 2020-12-14 17:20:35 -05:00
8e25bcb68f Deprecate CheckingForFlooding
This should have been done earlier as part of the ThrottleApi PR
2020-12-14 17:12:05 -05:00
fad783547c Bundled output for commit 210a6b3e25 [skip ci] 2020-12-14 19:07:44 +00:00
210a6b3e25 Fix scroll on long discussions
- Anchor scroll when inserting post placeholders
- Indicate that pages are loading at start of `loadPage`, which allows `onscroll` to not request that multiple pages be loaded at the same time

These changes are particularly applicable to firefox, where previously, dozens of posts could be skipped at a time if scroll up was held while at the top of the viewport.
2020-12-14 14:06:32 -05:00
73409184b9 Fix wrong namespace in docblock () 2020-12-12 15:36:25 -05:00
afe038699e Fix composer json attribute path to links override section 2020-12-08 19:29:59 -05:00
649851d356 Remove header bottom border () 2020-12-08 19:15:14 -05:00
d1dfa758e4 Policy Extender and Tests ()
Policy application has also been refactored, so that policies return one of `allow`, `deny`, `forceAllow`, `forceDeny`. The result of a set of policies is no longer the first non-null result, but rather the highest priority result (forceDeny > forceAllow > deny > allow, so if a single forceDeny is present, that beats out all other returned results). This removes order in which extensions boot as a factor.
2020-12-08 19:10:06 -05:00
8901073d12 Model Visibility Scoping Extender and Tests () 2020-12-07 20:02:46 -05:00
e0437d237a Bundled output for commit 07a43f52b4 [skip ci] 2020-12-07 20:15:49 +00:00
07a43f52b4 AdminUX Overhaul Small Patches () 2020-12-07 15:14:22 -05:00
9e9118fa0d Bundled output for commit 4679448300 [skip ci] 2020-12-07 18:35:10 +00:00
4679448300 Slug Driver Support ()
- Support slug drivers for core's sluggable models, easily extends to other models
- Add automated testing for affected single-model API routes
- Fix nickname selection UI
- Serialize slugs as `slug` attribute
- Make min search length a constant
2020-12-07 13:33:42 -05:00
ef4bf8128e Bundled output for commit 67a2aac635 [skip ci] 2020-12-07 18:26:51 +00:00
67a2aac635 Replace forum and admin global compat exports with a Proxy to allow namespace use () 2020-12-07 13:25:24 -05:00
51a97fb12e ApiController Extender and Tests () 2020-12-06 15:07:48 -05:00
056d420c7b Pass callback wrapper parameters by reference ()
Because invokable class objects are not directly called and instead it's the callback wrapper that calls these objects, it's currently not possible to receive arguments by reference on an invokable class.

To fix this we pass the arguments by reference by default when calling the object in the callback wrapper.
2020-12-06 14:58:45 -05:00
cfa533ebd6 Add Settings Extender () 2020-12-04 17:20:06 -05:00
eed407812f User Preferences Extender and Tests () 2020-12-04 15:45:08 -05:00
641619e820 Fixes issue with the worker defaulting to the illuminate queue manager ()
We are instantiating our own queue handling factory which returns the
flarum.queue.connection binding no matter what. The queue Worker and
other queue related code rely on this manager to get its thing going.
Therefor we need to re-use our own factory everywhere, including in
the worker.
2020-12-02 13:19:25 -05:00
984f751c71 Use process isolation for integration tests 2020-12-01 19:33:24 -05:00
8830e9dd09 Bundled output for commit fe41bc1fdc [skip ci] 2020-12-01 16:22:59 +00:00