Commit Graph

118 Commits

Author SHA1 Message Date
Franz Liedke
1fa37a7a6a
Simplify uploads, inject filesystem instances
This avoids injecting the Application god class and assembling default
file locations in multiple places.

In addition, we no longer use the `MountManager` for these uploads. It
only added complexity (by moving tmp files around) and will not be
available in the next major release of Flysystem.

Note: Passing PSR upload streams to Intervention Image requires an
explicit upgrade of the library. (Very likely, users have already
updated to the newer versions, as the old constraint allowed it, but
we should be explicit for correctness' sake.)
2020-04-10 11:38:57 +02:00
Franz Liedke
a2d1d2b819
Update less.php to version 3.0
Now that we require PHP 7.2, this ensures we get the latest updates and
fixes as well.

Refs #1988.
2020-03-17 23:12:23 +01:00
Franz Liedke
27b0d1802e
Merge branch 'refs/heads/v0.1.0-beta.12'
# Conflicts:
#	composer.json
2020-03-04 22:56:37 +01:00
Daniël Klabbers
2c02702d60 updated core developers in authors 2020-03-03 15:47:00 +01:00
Alexander Skvortsov
0d208dc443
Drop support for PHP 7.1 (#2014)
* Updated PHP requirement to 7.2

* Set wikimedia less version to 1.8

* Indentation fix on composer json

* Revert "Set wikimedia less version to 1.8"

This reverts commit 22d862fd98.
2020-02-27 00:52:03 +01:00
Alexander Skvortsov
674303b997
Remove Zend compatability bridge (#2010) 2020-02-26 22:29:44 +01:00
Matt Kilgore
08e40bc693 Force fixed version of text formatter 2020-02-25 11:27:59 +01:00
Matt Kilgore
17257aacaf
Updates s9e/text-formatter to 2.x (#1982)
No additional changes required, tested with fof/formatting extension.
2020-02-14 12:34:40 +01:00
Franz Liedke
64e4132c92 Switch to Wikimedia's less.php fork
The original library is no longer maintained. The fork supports PHP 7.4.
2020-02-09 06:46:33 +01:00
Matt Kilgore
d7a5a6ad14 Change Zend namespace to Laminas (#1963)
Also ensure backwards compatibility for extensions that use the Zend framework but don't explicitly require it.
2020-01-06 22:29:34 +01:00
Daniël Klabbers
12dc4fff57
works towards #1789 by allowing event subscribing (#1810) 2019-10-01 11:12:46 +02:00
Daniël Klabbers
fb0a875c6d added author Daniel Klabbers 2019-09-16 10:37:51 +02:00
Franz Liedke
9640dd6419
Remove unnecessary dependency
Refs #1773.
2019-08-22 10:04:38 +02:00
Daniël Klabbers
a045f8bef9
Queue support (#1773)
Implementation of clean queue handling, by default sync is used
2019-08-19 21:44:06 +02:00
Franz Liedke
8c841c3266
Update test libraries 2019-07-06 01:49:55 +02:00
Franz Liedke
cc4e4a068b
Add descriptions to custom Composer scripts 2019-07-05 23:34:23 +02:00
Daniël Klabbers
d2674fb309 patched constraint for components/font-awesome, fixes #1790 2019-06-11 20:22:35 +02:00
Franz Liedke
5556df54f9
Setup Composer commands for testing and setup 2019-02-03 20:39:33 +01:00
Daniël Klabbers
862404f052 update symfony/console, because illuminate/console needs a higher version 2019-01-16 11:58:42 +01:00
Daniël Klabbers
9794a08f39 updated constraint for 5.7 (#1698) 2018-12-20 08:20:52 +10:30
Daniël Klabbers
2764ad87cc up the font-awesome dependency (#1642)
new version of components/font-awesome was tagged, let's up the minimum to allow for more icons:

https://packagist.org/packages/components/font-awesome
2018-11-14 17:12:27 +01:00
Toby Zerner
5dfb9b474c
Auth token and avatarUrl security improvements (#1514)
* Remove AbstractOAuth2Controller

There is no reason to provide an implementation for a specific oAuth2
library in core; it's not generic enough (eg. auth-twitter can't use it).

This code could be moved into another package which auth extensions
depend on, but it's a negligible amount of relatively simple code that
I don't think it's worth the trouble.

* Introduce login providers

Users can have many login providers (a combination of a provider name
and an identifier for that user, eg. their Facebook ID).

After retrieving user data from a provider (eg. Facebook), you pass the
login provider details into the Auth\ResponseFactory. If an associated
user is found, a response that logs them in will be returned. If not, a
registration token will be created so the user can proceed to sign up.
Once the token is fulfilled, the login provider will be associated with
the user.
2018-09-22 13:48:27 +09:30
Franz Liedke
2d4dc02ca1
Pass container into apps, adapt path matching 2018-08-23 22:17:37 +02:00
Franz Liedke
869ec54bd0
Load middleware stacks lazily
This way, the forum middleware does not need to be loaded for
API requests, and vice-versa.
2018-08-22 09:20:47 +02:00
Franz Liedke
626d16de6f
Use zend-httphandlerrunner for marshalling requests and returning responses
Since Diactoros 1.8, the emitter and server classes have been
deprecated. They can be replaced by using this new package
directly.
2018-08-22 07:58:50 +02:00
Franz Liedke
076288db21
Update zend-diactoros constraint
See security advisory ZF2018-01:
https://framework.zend.com/security/advisory/ZF2018-01
2018-08-02 23:15:24 +02:00
Clark Winkelmann
df7e24cba6 Update urls with their current canonical versions (#1524) 2018-08-02 17:39:06 +02:00
Sajjad Hashemian
fba31995b1 Upgrade text formatter (#1457)
* upgrade TextFormatter

* remove finalize options

* cleanup JsCompiler

* simplify Formatter

* refactor Formatter cache

* minify formatter js

* remove Closure Compiler
2018-07-14 22:22:14 +02:00
Franz Liedke
d42205a8ff
Update doctrine/dbal version constraint
This update is needed to fix MariaDB compatibility.
See #1211.
2018-07-09 00:14:57 +02:00
Franz Liedke
00bc8fc0bc
Composer: Reorder dependencies
[ci skip]
2018-06-30 23:46:10 +02:00
Toby Zerner
0e73785498
Frontend refactor (#1471)
Refactor Frontend + Asset code

- Use Laravel's Filesystem component for asset IO, meaning theoretically
  assets should be storable on S3 etc.

- More reliable checking for asset recompilation when debug mode is on,
  so you don't have to constantly delete the compiled assets to force
  a recompile. Should also fix issues with locale JS files being
  recompiled with the same name and cached.

- Remove JavaScript minification, because it will be done by Webpack
  (exception is for the TextFormatter JS).

- Add support for JS sourcemaps.

- Separate frontend view and assets completely. This is an important
  distinction because frontend assets are compiled independent of a
  request, whereas putting together a view depends on a request.

- Bind frontend view/asset factory instances to the container (in
  service providers) rather than subclassing. Asset and content
  populators can be added to these factories – these are simply objects
  that populate the asset compilers or the view with information.

- Add RouteHandlerFactory functions that make it easy to hook up a
  frontend controller with a frontend instance ± some content.

- Remove the need for "nojs"

- Fix cache:clear command

- Recompile assets when settings/enabled extensions change
2018-06-30 12:31:12 +09:30
Franz Liedke
3ec32f8430
Composer: Sort dependencies 2018-06-02 15:07:23 +02:00
Franz Liedke
3680d88fb7
Use PSR-15 middleware standard
This finally adopts the new standardized interfaces instead of the
work-in-progress ones with the `Interop\` prefix.

Since we have now updated to PHP 7.1, we can also use Stratigility
3.0 as the middleware dispatcher.
2018-05-29 00:18:24 +02:00
Franz Liedke
0278d52cbe
Require PHP 7.1
This will be the last PHP requirement upgrade for a while, at least
until stable (and therefore until the next major release).

We have decided to do this now, for the following reasons:
- We want to support MariaDB (and the compatible release of
  doctrine/dbal requires 7.1 as well).
- We prefer to upgrade to Laravel 5.6 sooner rather than later.
- Using the PSR-15 middleware standard is easier this way, as we do
  not have to switch from zend-stratigility to another PSR-15
  implementation. (Stratigility v3, which implements the final
  standard, requires 7.1.)
2018-05-28 23:21:22 +02:00
Toby Zerner
5672819549
Use Illuminate Session component instead of Symfony
Symfony's component relies on PHP's native session functionality, which
is not ideal. It automatically sets its own cookie headers, resulting in
this issue: https://github.com/flarum/core/issues/1084#issuecomment-364569953

The Illuminate component is more powerful and has a simpler API for
extension with other drivers and such, and fits in nicely with other
components we use (the majority of which are from Illuminate).
2018-03-18 14:43:44 +01:00
Franz Liedke
9d30be1617
Update Stratigility, use http-interop middleware 2018-03-18 13:52:16 +01:00
Franz Liedke
a061eda019
Change namespace of test classes
(as implemented by @luceos in his WIP PR)
2018-03-04 00:01:49 +01:00
AFR
1a2df2d581 FontAwesome v5.0.6 (#1372)
* Update FontAwesome to v5.0.6

* Adapt DiscussionListItem-count icon to match FontAwesome 5 syntax

* Change icon name to match FontAwesome 5.0.6 fas icon

* Add font type prefix parameter to icon helper

* Add Enable Icon Prefix to show icon in Extension Page

* Fix invalid icon behavior

* Change icon name to match FontAwesome 5.0.6 far icon

* Use iconPrefix property on component

* Use full icon class name

* Update icon helper docblock

* Full icon class syntax
2018-02-23 23:42:00 +01:00
Daniël Klabbers
f65e4dcba3
merges 5.5 and master into next-back 2017-12-14 01:00:16 +01:00
Toby Zerner
9cc67fe312 Performance: Cache translation catalogue to avoid reparsing YAML 2017-11-11 22:45:38 +10:30
Daniel Klabbers
2037371886 lists > pluck 2017-10-05 13:39:41 +02:00
Franz Liedke
1e8399c014
Update zend-diactoros to v1.6
This release contains a useful fix for Content-Length problems
that we have experienced before.

See https://github.com/zendframework/zend-diactoros/releases/tag/1.6.0.
2017-09-15 13:27:11 +02:00
Franz Liedke
015967a76c
Require PHP 5.6 2017-02-03 21:53:20 +01:00
Franz Liedke
b5b18dd436 Update to Zend Stratigility 1.3
* Fix dependency version constraint. (Reverts #1066.)
* Allow exceptions to be raised when dispatching middleware.
* Fix our error handler middleware (do not implement Stratigility's
  error handler interface, catch exceptions instead).

See https://docs.zendframework.com/zend-stratigility/migration/to-v2/.

Closes #1069.
2017-01-02 22:57:09 +01:00
Toby Zerner
7af4b8d45f Merge pull request #1049 from JoshyPHP/TextFormatter-0.8.0
Updated s9e\TextFormatter to 0.8.1
2016-11-29 16:36:10 +10:30
Daniël Klabbers
7a9795fbc3 Update composer.json
fixes #1065 , this is a temporary fix until compatibility with 1.3.0 is guaranteed by refactoring
2016-11-12 01:20:10 +01:00
JoshyPHP
96926a180a Updated s9e\TextFormatter to 0.8.1 2016-10-10 01:58:40 +02:00
JoshyPHP
7b3ac18c14 Updated s9e\TextFormatter to 0.6.1 2016-07-30 03:53:32 +02:00
Toby Zerner
6db27dff4f Move phpunit.xml into root to make PHPUnit easier to run
This seems to be pretty standard. Can just run `vendor/bin/phpunit` without any arguments. Removes the need for `composer test` (which is not ideal anyway as it removes colours from the output).
2016-06-05 09:16:29 +09:30
Toby Zerner
8328c446b0 Use smaller FontAwesome shim repo instead of original
components/font-awesome is ~8 MB smaller than fortawesome/font-awesome because it excludes all examples/docs. Reducing dependency filesize will be important when we want to package up a .zip for distribution.
2016-05-29 10:21:37 +09:30