Franz Liedke
fc4d0e1068
Fix signature of HandleErrors middleware
...
In Laravel 5.8, the `Container::tagged()` method was changed to return
an iterator [1].
We only use the result for iteration, or, in this case, to pass a bunch
of "reporters" to the error handler middleware, therefore we need to
accept an iterable here.
[1]: https://laravel.com/docs/5.8/upgrade#container-generators
2020-05-08 23:30:17 +02:00
Franz Liedke
417c6210ce
Test setup: Do not use env() helper
...
Not needed, and not working without a full Laravel installation.
2020-05-08 23:30:17 +02:00
Franz Liedke
886f54e4fa
Update Laravel components to v5.8
...
First part of #2055 .
2020-05-08 21:46:13 +02:00
Franz Liedke
7f3c276d8d
Remove empty comment
2020-05-08 16:05:25 +02:00
Franz Liedke
6205b386b3
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-05-08 14:03:48 +00:00
Franz Liedke
073d50b3a4
Fix container configuration when not installed
2020-05-08 16:03:20 +02:00
Franz Liedke
55d0f24749
Drop MigrationServiceProvider
2020-05-08 12:04:24 +02:00
Franz Liedke
814013ba48
Fix generate:migration command for extensions
...
Apparently, this code was from back when we had a special "extensions"
directory for Composer packages marked as Flarum extensions.
While we're at it, we now inject the Paths instance instead of using one
of the global helpers (which I am trying to get rid of).
Refs #2055 .
2020-05-08 12:01:11 +02:00
Franz Liedke
9bcfc4fafd
Update beta.13 changelog
2020-05-08 11:35:46 +02:00
Franz Liedke
78b517641f
Merge pull request #2142 from flarum/fl/2055-prepare-for-laravel-58
...
Split up Application and Container
2020-05-07 22:49:36 +02:00
flarum-bot
4258c02da7
Bundled output for commit 1e351900e1
[skip ci]
2020-05-07 07:20:06 +00:00
Daniël Klabbers
1e351900e1
commit version constant
2020-05-07 09:17:26 +02:00
Daniël Klabbers
0bc58b603e
Release v0.1.0-beta.13
2020-05-07 09:18:04 +02:00
Franz Liedke
3a7b4f392b
Make two more tests compatible with PHPUnit 8
2020-05-07 09:18:04 +02:00
Franz Liedke
531b9ffd82
Remove obsolete method
2020-05-07 09:18:04 +02:00
Alexander Skvortsov
fd75df79a3
Added simply confirmation popup for hiding / deleting posts ( #2135 )
2020-05-07 09:18:04 +02:00
Franz Liedke
244f61f5d3
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
bf526125eb
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
7602b9ad62
Extract a class to hold / determine paths
2020-05-01 15:24:20 +02:00
flarum-bot
cbf3d14816
Bundled output for commit 782d83f862
[skip ci]
2020-05-01 09:53:55 +00:00
Franz Liedke
782d83f862
Update Webpack
2020-05-01 11:52:26 +02:00
Franz Liedke
6cd0e5f411
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-04-27 20:04:41 +00:00
Franz Liedke
42146fbad6
Remove a bunch of deprecated events
...
Use extenders instead!
Refs #1891 .
2020-04-27 22:04:08 +02:00
Alexander Skvortsov
6416fbd5d3
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
74027a8421
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
4ac4af54e6
Fix test to match its description
...
Refs #2100 .
2020-04-24 17:31:08 +02:00
Franz Liedke
56ef8b4613
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-04-24 14:56:37 +00:00
Franz Liedke
c87c2bcd4c
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
4e95b2b719
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
6dc362f760
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-04-24 13:10:36 +00:00
Alexander Skvortsov
ef44ff5603
Add model extender ( #2100 )
...
This covers default attribute values, date attributes and custom relationships.
2020-04-24 15:10:24 +02:00
Franz Liedke
173a698fb4
npm audit fix
2020-04-24 14:30:16 +02:00
flarum-bot
e2db63253f
Bundled output for commit d30b2dee3e
[skip ci]
2020-04-22 21:38:57 +00:00
Franz Liedke
d30b2dee3e
CI: Shorten the lint job name
2020-04-22 23:37:37 +02:00
Alexander Skvortsov
7dd5c92c31
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
b479a22186
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
af932c3c20
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
afc0fae966
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
c1db2b5a45
Format code
...
- Early returns
- Comments
- Write variables only when needed
Refs #2020 .
2020-04-19 16:53:52 +02:00
Robert Korulczyk
9b925a5071
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
8b808bfc85
Inline test class
...
Refs #1977 .
2020-04-19 15:55:10 +02:00
Clark Winkelmann
7143e13073
Make AbstractPolicy compatible with both object and class as $model ( #1977 )
2020-04-19 15:52:59 +02:00
flarum-bot
738e95f024
Bundled output for commit 440e7a7b00
[skip ci]
2020-04-17 09:59:47 +00:00
Franz Liedke
440e7a7b00
Run prettier for all JS files
2020-04-17 11:57:55 +02:00
Franz Liedke
915375fc7c
Merge pull request #2099 from flarum/fl/prettier
...
Install prettier for consistent JS styling
2020-04-17 11:20:52 +02:00
Franz Liedke
da4f835c15
CI: Run prettier to check for JS code formatting
2020-04-17 11:14:37 +02:00
Franz Liedke
45474ccc1b
Setup husky for automatic formatting before commit
2020-04-17 10:45:36 +02:00
Franz Liedke
c098423c00
Add NPM shortcut for running prettier
2020-04-17 10:45:05 +02:00
Franz Liedke
19adcf33dd
Configure prettier via JSON file
2020-04-17 10:44:36 +02:00
Franz Liedke
37450dabf3
Install prettier
2020-04-17 10:44:31 +02:00