37e0a5579b
Improve feedback on user deletion
...
Fixes #1750 , #1777
2019-08-13 22:56:24 +02:00
cd9aa0096e
Merge pull request #1843 from flarum/fl/1641-exception-handling
...
Implement new error handling stack
2019-08-13 22:45:46 +02:00
d06493c61e
Support multiple error reporters
...
The error handling middleware now expects an array of reporters.
Extensions can register new reporters in the container like this:
use Flarum\Foundation\ErrorHandling\Reporter;
$container->tag(NewReporter::class, Reporter::class);
Note that this is just an implementation detail and will be hidden
behind an extender.
2019-08-10 11:04:12 +02:00
9f71e2c3cb
Remove old error handler, middleware and tests
2019-08-10 00:26:24 +02:00
81a8736ba9
API Client: Use new error handling mechanism
2019-08-10 00:26:24 +02:00
57ce25301d
Use new error handler middleware
2019-08-10 00:26:24 +02:00
cfbaa84fbc
Wire up new error handling stack
2019-08-10 00:26:23 +02:00
3417f5a77e
Make existing extensions compatible with new stack
2019-08-10 00:26:22 +02:00
1035636d0f
Implement new error handling stack
...
This separates the error registry (mapping exception types to status
codes) from actual handling (the middleware) as well as error formatting
(Whoops, pretty error pages or JSON-API?) and reporting (log? Sentry?).
The components can be reused in different places (e.g. the API client
and the error handler middleware both need the registry to understand
all the exceptions Flarum knows how to handle), while still allowing to
change only the parts that need to change (the API stack always uses the
JSON-API formatter, and the forum stack switches between Whoops and
pretty error pages based on debug mode).
Finally, this paves the way for some planned features and extensibility:
- A console error handler can build on top of the registry.
- Extensions can register new exceptions and how to handle them.
- Extensions can change how we report exceptions (e.g. Sentry).
- We can build more pretty error pages, even different ones for
exceptions having the same status code.
2019-08-10 00:26:22 +02:00
d00fc2c49d
Remove obsolete constructor parameter
...
This was removed in commit 484c6d2e.
2019-08-10 00:16:21 +02:00
f3b889a665
Bundled output for commit c5122bf5d57c07854a3c3cfce09e1547b65d6b68 [skip ci]
2019-08-08 23:12:56 +00:00
c5122bf5d5
a11y: Try to make screenreaders read tooltips
...
Refs #1835 .
2019-08-08 22:40:30 +02:00
5ed55195e1
Add canonical URL to discussion list ( #1814 )
2019-08-08 00:01:25 +02:00
8604ea3020
Bypass CSRF token check when using access tokens
...
Fixes #1828 .
2019-08-01 22:53:31 +02:00
2648e960a7
Make exception message dynamic as well
2019-08-01 22:25:28 +02:00
f0dff95d62
Merge branch 'master' of github.com:flarum/core
2019-07-31 17:10:47 +02:00
894db01ad8
Allows configuration of where the language files live. So that
...
language packs can optionally decide for themselves if they want
to use a different directory.
2019-07-31 17:10:13 +02:00
bd04023359
Determine default route after extensions
...
Fixes #1819 .
2019-07-30 00:56:29 +02:00
f357434a72
PHPUnit: Get rid of deprecated annotation
...
Refs #1795 .
2019-07-30 00:09:10 +02:00
c2586586c4
fixes #1695 , take into consideration is_private with counts on User stats
2019-07-28 20:59:12 +02:00
06cd062a1b
fixed ci, make green again; mysql service wasnt booted
2019-07-27 22:24:39 +02:00
1502fc98d8
Prevent MySQL search operators from taking effect
...
We do not want to inherit MySQL's fulltext query language, so let's
just drop all non-word characters from the search term.
Fixes #1498 .
2019-07-23 23:55:06 +02:00
ed97989ca2
Revert "Remove deprecated bootstrap.php fallback"
...
This reverts commit f8061bbca13b0cbaea418acedc03c008bbf8edcb.
We will keep this fallback in place, to avoid unnecessary breakage of
backwards compatibility for extension authors.
Removal is planned for the final 0.1 release.
2019-07-14 22:22:06 +02:00
7f1048352d
Clean up database query
...
- Use existing `selectRaw()` method to avoid using the global `app()`
helper as a service locator, which hides dependencies.
- Do the same for the join.
- The `Expression` is necessary to prevent the aliased column from being
prefixed with the database table prefix, if configured.
2019-07-11 22:35:19 +02:00
d2700961ba
Bump lodash-es from 4.17.11 to 4.17.14 in /js ( #1818 )
...
Bumps [lodash-es](https://github.com/lodash/lodash ) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14 )
Signed-off-by: dependabot[bot] <support@github.com >
2019-07-11 09:21:17 +02:00
b2dbb0439c
fixed class property hint for event post content attribute
2019-07-09 08:31:48 +02:00
085c924a07
fix return type hint for event post content attribute
2019-07-09 08:30:10 +02:00
f31f02d4cc
Set Whoops middleware HTTP status to error code ( #1648 )
...
* Use error code for HTTP status, defaults to 500
* Use logic from HandleErrorsWithView, make sure status is valid
2019-07-07 14:57:40 +02:00
797f6eea50
moved GetDisplayName event to User namespace ( #1768 )
2019-07-06 19:27:44 +02:00
9fb3a31b51
Get rid of unnecessary method
2019-07-06 02:25:06 +02:00
f8061bbca1
Remove deprecated bootstrap.php fallback
...
Closes #1557 .
2019-07-06 02:11:09 +02:00
de67927ef2
Travis: Allow PHP 7.4 to fail for now
...
We are currently experiencing issues due to Mockery not yet being 100%
compatible with PHP.
See https://github.com/mockery/mockery/pull/980 .
2019-07-06 01:56:54 +02:00
8c841c3266
Update test libraries
2019-07-06 01:49:55 +02:00
2f656146a7
Travis: Test against the upcoming PHP 7.4
2019-07-06 01:30:59 +02:00
d66d2aa26e
Convert more helpers in tests
2019-07-06 01:30:59 +02:00
f4c0d4ba87
Type hint contract, not implementation
2019-07-06 01:30:58 +02:00
646bd40bca
Use Laravel's class-based Str and Arr helpers
...
Starting with version 5.9, the global funtions will be deprecated.
* https://laravel-news.com/laravel-5-8-deprecates-string-and-array-helpers
* https://github.com/laravel/framework/pull/26898
2019-07-06 01:30:58 +02:00
307b912019
Issue templates: Remove vulnerability information
...
GitHub now automatically displays this information (or rather, links to
the Security Policy) at the issue type selection page.
2019-07-06 00:08:55 +02:00
cbc896eba7
Use class constant instead of strings
2019-07-06 00:03:25 +02:00
cc4e4a068b
Add descriptions to custom Composer scripts
2019-07-05 23:34:23 +02:00
a720f6f651
Update Application version string to beta 9 ( #1784 )
v0.1.0-beta.9
2019-07-05 12:37:02 +02:00
54d7c0d3b6
Bundled output for commit b5876d9f31faf85564134d8285470aebbe94b66e [skip ci]
2019-06-27 19:23:54 +00:00
b5876d9f31
Merge pull request #1803 from flarum/ds/1777-previous-route-default
...
Visit home page if previous route does not exist when going back in history
2019-06-27 15:17:41 -04:00
25ef4c10bd
Update CHANGELOG.md
2019-06-27 15:07:53 -04:00
985b87da6c
Visit home page if no previous route exists
...
Fixes #1777
2019-06-27 14:58:05 -04:00
a6aa28566c
added changelog item for mediumText fix in posts.content
2019-06-24 14:57:13 +02:00
e3340ba3e1
Merge branch 'master' of github.com:flarum/core
2019-06-24 14:55:05 +02:00
590b311570
fixes #1801 , increasing the size of posts.content to mediumText correctly
2019-06-24 14:53:56 +02:00
935a968257
fixed tests on master, missing views directory and suppressing notices from tempnam when storing files in tmp
2019-06-24 13:00:36 +02:00
fe558eb0ba
Merge branch 'master' into advisory-fix-1
2019-06-24 12:53:37 +02:00