Franz Liedke
260e7cd48f
Inject new Paths class instead of Application
...
This (and similar work in other areas) will allow us to further
reduce the API surface of the Application class.
Separation of concerns etc.
2020-05-01 15:47:35 +02:00
Franz Liedke
41a56c4ad1
Split up Application and Container
...
- Stop trying to implement Laravel's Application contract, which
has no value for us.
- Stop inheriting from the Container, injecting one works equally
well and does not clutter up the interfaces.
- Inject the Paths collection instead of unwrapping it again, for
better encapsulation.
This brings us one step closer toward upgrading our Laravel
components (#2055 ), because we no longer need to adopt the changes
to the Application contract.
2020-05-01 15:47:35 +02:00
Franz Liedke
d0ae2839f0
Extract a class to hold / determine paths
2020-05-01 15:24:20 +02:00
flarum-bot
d31a747631
Bundled output for commit 526081bd06
[skip ci]
2020-05-01 09:53:55 +00:00
Franz Liedke
526081bd06
Update Webpack
2020-05-01 11:52:26 +02:00
Franz Liedke
cbdd3c5cc7
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-04-27 20:04:41 +00:00
Franz Liedke
7d1ef9d891
Remove a bunch of deprecated events
...
Use extenders instead!
Refs #1891 .
2020-04-27 22:04:08 +02:00
Alexander Skvortsov
7794546845
Model extender: Fix inheritance ( #2132 )
...
This ensures that default values, date attributes and relationships are properly inherited, when we have deeper model class hierarchies.
This also adds test cases to ensure that inheritance order is honored for relationship and default attribute extender. As there's no way to remove date attributes, the order of evaluation there doesn't matter.
2020-04-24 21:17:31 +02:00
Franz Liedke
c43cc874ee
Model extender: Add failing test
...
We determined that child classes are not properly affected when
extending the parent classes.
Refs #2100 .
2020-04-24 17:54:30 +02:00
Franz Liedke
33cf94c192
Fix test to match its description
...
Refs #2100 .
2020-04-24 17:31:08 +02:00
Franz Liedke
036e519865
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-04-24 14:56:37 +00:00
Franz Liedke
9386c91af9
Tweak model extender tests
...
- Format code
- Reorder methods
- Test a different scenario to avoid the use of sleep()
Refs #2100 .
2020-04-24 16:55:04 +02:00
Franz Liedke
8306cef963
Clean up model extender
...
- Remove unused private attributes
- Complete docblocks
- Add scalar type hints
- Format code
- Reorder methods
Refs #2100 .
2020-04-24 16:33:08 +02:00
Franz Liedke
51ea326959
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-04-24 13:10:36 +00:00
Alexander Skvortsov
15bed971e6
Add model extender ( #2100 )
...
This covers default attribute values, date attributes and custom relationships.
2020-04-24 15:10:24 +02:00
Franz Liedke
c896cd8696
npm audit fix
2020-04-24 14:30:16 +02:00
flarum-bot
54ac83d0b6
Bundled output for commit 1592cd1013
[skip ci]
2020-04-22 21:38:57 +00:00
Franz Liedke
1592cd1013
CI: Shorten the lint job name
2020-04-22 23:37:37 +02:00
Alexander Skvortsov
6e8884f190
Implement hidden permission groups ( #2129 )
...
Only users that have the new `viewHiddenGroups` permissions will be able to see these groups.
You might want this when you want to give certain users special permissions, but don't want to make your authorization scheme public to regular users.
Co-authored-by: luceos <daniel+github@klabbers.email>
2020-04-21 17:49:53 +02:00
Franz Liedke
df8f73bd3d
Statically access Flarum version everywhere
...
One less reason to inject the huge Application class.
Refs #2055 .
2020-04-21 16:48:36 +02:00
Franz Liedke
3f0f89afb1
Use Container contract where easily possible
...
Less usages of the Application god-class simplifies splitting it up.
Refs #2055 .
2020-04-21 16:48:06 +02:00
Franz Liedke
f0f301c5f4
Add compatiblity with Composer 2.0
...
- The structure of vendor/composer/installed.json will change.
- The same file will now contain the relative path to package locations.
References:
- https://github.com/composer/composer/blob/master/UPGRADE-2.0.md
- https://php.watch/articles/composer-2
2020-04-21 15:47:58 +02:00
Franz Liedke
3045bde167
Format code
...
- Early returns
- Comments
- Write variables only when needed
Refs #2020 .
2020-04-19 16:53:52 +02:00
Robert Korulczyk
ee7a4627d8
Load only translations for enabled extensions from language packs ( #2020 )
...
fix #1837
Co-authored-by: Daniel Klabbers <daniel+git@klabbers.email>
2020-04-19 16:29:45 +02:00
Franz Liedke
b9fb92d49a
Inline test class
...
Refs #1977 .
2020-04-19 15:55:10 +02:00
Clark Winkelmann
b5accca957
Make AbstractPolicy compatible with both object and class as $model ( #1977 )
2020-04-19 15:52:59 +02:00
flarum-bot
798a3486bf
Bundled output for commit 89ef14faf1
[skip ci]
2020-04-17 09:59:47 +00:00
Franz Liedke
89ef14faf1
Run prettier for all JS files
2020-04-17 11:57:55 +02:00
Franz Liedke
84cf938379
Merge pull request #2099 from flarum/fl/prettier
...
Install prettier for consistent JS styling
2020-04-17 11:20:52 +02:00
Franz Liedke
899cdfda4e
CI: Run prettier to check for JS code formatting
2020-04-17 11:14:37 +02:00
Franz Liedke
72ed4faa83
Setup husky for automatic formatting before commit
2020-04-17 10:45:36 +02:00
Franz Liedke
64ad21e5da
Add NPM shortcut for running prettier
2020-04-17 10:45:05 +02:00
Franz Liedke
14e8e9a7cb
Configure prettier via JSON file
2020-04-17 10:44:36 +02:00
Franz Liedke
ee996e2cae
Install prettier
2020-04-17 10:44:31 +02:00
Franz Liedke
7b35674e4a
Merge pull request #2117 from flarum/fl/2055-streamline-uploads
...
Simplify uploads, avoid Application contract
2020-04-15 22:52:03 +02:00
Franz Liedke
1d953b3514
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-04-13 09:59:07 +00:00
Franz Liedke
b7d8f77529
Tweak event extender (tests)
...
- Inject contract, not implementation
- Do not dispatch event in test, let the core do that
- Ensure the relevant database tables are reset prior to the test
- Use correct parameter order for assertions
Refs #2097 .
2020-04-13 11:58:47 +02:00
Franz Liedke
b343206c7b
Tweak mail extender (tests)
...
- Use private over protected
- Use "public" API for building requests in tests
- Add more assertions
- Formatting
- Use correct parameter order for assertions
Refs #2012 .
2020-04-13 11:58:46 +02:00
flarum-bot
2aead54aea
Bundled output for commit dbfae0b55e
[skip ci]
2020-04-13 09:22:40 +00:00
Alexander Skvortsov
dbfae0b55e
Add year, localization support for displaying things older than 1 year ( #2034 )
2020-04-13 11:21:27 +02:00
Alexander Skvortsov
2d86eb9b9f
Mail Extender ( #2012 )
...
This allows registering new drivers, or overwriting existing ones.
2020-04-13 10:46:33 +02:00
Alexander Skvortsov
3ac5e58fa1
Add event extender (used for domain events) ( #2097 )
2020-04-13 10:45:34 +02:00
Alexander Skvortsov
ffa56595c3
Improved UI of Switch with loading indicator ( #2039 )
...
* Moved loading indicator outside of checkboxes to improve ui
* Made loading indicator more visible, fade label when switch is loading
2020-04-10 22:51:58 +02:00
flarum-bot
453c44632d
Bundled output for commit 117c2f65ac
[skip ci]
2020-04-10 19:18:00 +00:00
w-4
117c2f65ac
Fix PostStreamScrubber click ( #1945 )
2020-04-10 21:16:57 +02:00
Franz Liedke
cd9edf656b
ForumSerializer: Use UrlGenerator for base URLs
...
The test from the previous commit proves this works as intended. :)
This is one more step in trying to avoid the widespread usage of the
`Application` godclass.
Refs #2055 .
2020-04-10 17:46:15 +02:00
Franz Liedke
8c19ba1aaa
Add integration test for API root endpoint
2020-04-10 17:46:15 +02:00
Hasan Özbey
3f5554816e
Fix mobile notification bubble on colored header ( #2109 )
2020-04-10 12:50:36 +02:00
flarum-bot
cb9801a324
Bundled output for commit fd4c0d30d8
[skip ci]
2020-04-10 10:32:46 +00:00
Taraflex
fd4c0d30d8
Protect dismissible modals from closing by ESC key
2020-04-10 12:30:56 +02:00