Commit Graph

76 Commits

Author SHA1 Message Date
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
Franz Liedke
d3606b7f7e
Update TextFormatter to next release
This fixes some minor issues with emojis working correctly in the dropdown,
but not when rendered in the live preview or from the server.
2016-05-23 22:48:59 +09:00
Franz Liedke
619561cf56
Install FontAwesome via Composer.
This also updates the asset publishing and LESS paths accordingly.

Refs #891.
2016-05-09 21:28:38 +09:00
JoshyPHP
6d809cb023 Updated s9e\TextFormatter to 0.5.0 (#947) 2016-04-29 15:11:30 +09:30
Franz Liedke
694f5ad2e8
Update Whoops middleware 2016-04-18 10:55:40 +09:00
Toby Zerner
bd50a23966 Update json-api dependency 2016-03-31 20:02:42 +10:30
Franz Liedke
9e79470603 Update fig-cookies dependency and use new shortcut 2016-03-31 09:43:17 +09:00
Franz Liedke
77086c9be6 Travis: Do not run PhpUnit through Composer
We need to run PhpUnit with xDebug enabled in order to collect
code coverage information. It is disabled for performance reasons,
though: https://github.com/travis-ci/travis-ci/issues/5780.
2016-03-21 23:12:09 +09:00
Franz Liedke
3c629f091d Travis: Generate code coverage report when running tests 2016-03-21 20:21:51 +09:00
Franz Liedke
eef895c16f Composer: Sort dependencies alphabetically 2016-03-20 22:27:43 +09:00
Franz Liedke
2be964f8e2 Update to latest version of text-formatter 2016-03-20 22:25:45 +09:00
Toby Zerner
2391471937 Clean up linting stuff. closes #852 2016-03-10 17:13:30 +10:30
Franz Liedke
db7a03fbe5 Add some handy shortcuts for typical migration tasks
This will make it much easier for extension developers (and also less
error-prone) to create migrations for things like creating tables,
renaming columns and so on...
2016-02-25 00:50:03 +09:00
Toby Zerner
fb09cef540 Merge pull request #748 from JoshyPHP/Minifiers
Added support for new minifiers
2016-02-07 11:37:15 +10:30
Toby Zerner
2980c94247 Add Composer branch-alias
This allows installations to require version 0.1.0 with minimum-stability=dev, and they will get the latest from master.

See #727
2016-01-19 17:00:10 +10:30
JoshyPHP
09ad4a180b Added support for new minifiers 2016-01-15 16:59:56 +01:00
Toby Zerner
973ca16eee Add base OAuth2 controller 2015-12-05 15:25:10 +10:30
Toby Zerner
387109002e Rework sessions, remember cookies, and auth again
- Use Symfony's Session component to work with sessions, instead of a custom database model. Separate the concept of access tokens from sessions once again.
- Extract common session/remember cookie logic into SessionAuthenticator and Rememberer classes.
- Extract AuthenticateUserTrait into a new AuthenticationResponseFactory class.
- Fix forgot password process.
2015-12-05 15:11:25 +10:30
Franz Liedke
61b09ac982 Update text-formatter dependency 2015-11-19 13:00:32 +01:00
Franz Liedke
17619843b5 Update to newest version of Whoops middleware 2015-10-31 12:56:38 +01:00
Toby Zerner
7d4a04760c Use stable version of tobscure/json-api 2015-10-31 10:08:37 +10:30
Kirk Bushell
f0883471ef Updated tests namespace to be ps4-valid. Added tests for flooding exception, fixed broken code 2015-10-27 12:48:27 +00:00
Toby Zerner
c08b62af80 Refactor translation and validation
We now use Symfony's Translation component. Yay! We get more powerful pluralisation and better a fallback mechanism. Will want to implement the caching mechanism at some point too. The API is replicated in JavaScript, which could definitely use some testing.

Validators have been refactored so that they are decoupled from models completely (i.e. they simply validate arrays of user input). Language packs should include Laravel's validation messages.

ref #267
2015-10-15 22:30:45 +10:30
Franz Liedke
a23180f279 Revert previous commit 2015-10-14 13:52:52 +02:00
Franz Liedke
cc68c6f503 Fix version constraint for tobscure/json-api 2015-10-14 13:42:18 +02:00
Franz Liedke
d0a188bc42 Require version 0.1 of Whoops middleware 2015-10-14 13:40:02 +02:00
Franz Liedke
7b49f3c24c Clean up 2015-10-14 07:50:42 +02:00
Toby Zerner
8e5b13903e Add more info to composer.json 2015-10-11 11:18:30 +10:30
Toby Zerner
dd67291ce0 Major refactor and improvements
- Reorganised all namespaces and class names for consistency and structure. Following PSR bylaws (Abstract prefix, Interface/Trait suffix).
  - Move models into root of Core, because writing `use Flarum\Core\Discussion` is nice. Namespace the rest by type. (Namespacing by entity was too arbitrary.)
  - Moved some non-domain stuff out of Core: Database, Formatter, Settings.
  - Renamed config table and all references to "settings" for consistency.
  - Remove Core class and add url()/isInstalled()/inDebugMode() as instance methods of Foundation\Application.
  - Cleanup, docblocking, etc.

- Improvements to HTTP architecture
  - API and forum/admin Actions are now actually all the same thing (simple PSR-7 Request handlers), renamed to Controllers.
  - Upgrade to tobscure/json-api 0.2 branch.
  - Where possible, moved generic functionality to tobscure/json-api (e.g. pagination links). I'm quite happy with the backend balance now re: #262

- Improvements to other architecture
  - Use Illuminate's Auth\Access\Gate interface/implementation instead of our old Locked trait. We still use events to actually determine the permissions though. Our Policy classes are actually glorified event subscribers.
  - Extract model validation into Core\Validator classes.
  - Make post visibility permission stuff much more efficient and DRY.

- Renamed Flarum\Event classes for consistency. ref #246
  - `Configure` prefix for events dedicated to configuring an object.
  - `Get` prefix for events whose listeners should return something.
  - `Prepare` prefix when a variable is passed by reference so it can be modified.
  - `Scope` prefix when a query builder is passed.

- Miscellaneous improvements/bug-fixes. I'm easily distracted!
  - Increase default height of post composer.
  - Improve post stream redraw flickering in Safari by keying loading post placeholders with their IDs. ref #451
  - Use a PHP JavaScript minification library for minifying TextFormatter's JavaScript, instead of ClosureCompilerService (can't rely on external service!)
  - Use UrlGenerator properly in various places. closes #123
  - Make Api\Client return Response object. closes #128
  - Allow extensions to specify custom icon images.
  - Allow external API/admin URLs to be optionally specified in config.php. If the value or "url" is an array, we look for the corresponding path inside. Otherwise, we append the path to the base URL, using the corresponding value in "paths" if present. closes #244
2015-10-08 14:28:02 +10:30
Toby Zerner
0142b01cc5 Add server 2015-10-02 17:47:12 +09:30
kirkbushell
c3374197d1 Added zend-stragility (missing), removed some redundant code. 2015-09-28 15:59:07 +01:00
kirkbushell
bac3fe84da Moved psr-4 loading for tests out of the autoload 2015-09-28 15:44:35 +01:00
kirkbushell
a00226c05a Added some tests for the database setting repository 2015-09-28 15:34:32 +01:00
kirkbushell
7706714ad9 Removed phpsec as the testing library, added phpunit and converted the first spec test to phpunit format. Also added mockery. 2015-09-28 15:09:13 +01:00
Franz Liedke
4c6e03a692 Update TextFormatter
Fixes #532.
2015-09-23 09:03:24 +02:00
Daniel Klabbers
a2b43f6f78 version constraint must match laravel dependancies at least 2015-09-16 09:56:19 +02:00
Toby Zerner
a2def83045 Update dependencies 2015-09-14 18:45:49 +09:30
Toby Zerner
b7d8afe6a4 Add doctrine/dbal dependency so that migrations can rename columns 2015-09-14 15:31:05 +09:30
Franz Liedke
ba097dc147 Add Composer scripts 2015-08-30 14:59:10 +02:00
Toby Zerner
b49b3a14b4 Add flysystem dependency 2015-08-25 19:32:15 +09:30
Toby Zerner
ec2aa371b1 Fix installer issues 2015-08-17 14:32:38 +09:30
Toby Zerner
609d1825f3 Add missing dependency 2015-08-13 10:12:39 +09:30
Toby Zerner
47595ff9c4 Decouple from Laravel, implement translator 2015-08-12 18:33:39 +09:30