Commit Graph

3184 Commits

Author SHA1 Message Date
Franz Liedke
22fda3c59e Fix another documentation link
Forgotten in #1699, closes #1736.
2019-03-07 00:33:25 +01:00
Franz Liedke
a5847f5416 Apply fixes from StyleCI (#1756)
[ci skip] [skip ci]
2019-03-07 00:22:15 +01:00
Franz Liedke
402fd94892 Add regression test for #1738
This should ensure we can always search for search terms that appear
either only in the subject or only in the text of discussions.
2019-03-07 00:21:43 +01:00
bdumaspilhou
a4f249a3fb Fixes #1738 : Search Title within discussions (#1741) 2019-03-07 00:20:37 +01:00
flarum-bot
63a950d842 Bundled output for commit 3ca98e0e0e [skip ci] 2019-03-03 19:45:38 +00:00
Franz Liedke
3ca98e0e0e Travis: Fix build job 2019-03-03 20:39:30 +01:00
Franz Liedke
a21208e5ab npm audit fix 2019-03-03 20:29:50 +01:00
Franz Liedke
abf02fffec NPM: Update bootstrap package
The old version had a vulnerability.

See https://nvd.nist.gov/vuln/detail/CVE-2019-8331.
2019-03-03 20:27:14 +01:00
Franz Liedke
a96d49a7ee Merge pull request #1743 from flarum/fl/test-structure
Improve test suite structure
2019-03-03 20:17:35 +01:00
flarum-bot
cb2f9c6dd5 Bundled output for commit 48064184a7 [skip ci] 2019-02-18 07:51:00 +00:00
Daniël Klabbers
48064184a7 Copied over logic from EditTagModal to allow additional attributes to be send
to the API based on additional fields rendered by extending the fields.
2019-02-18 08:43:47 +01:00
Franz Liedke
b36a58db10 Update changelog 2019-02-14 23:40:18 +01:00
Daniël Klabbers
209455481d prefixes indices when installing too 2019-02-05 09:50:15 +01:00
Daniël Klabbers
cd4fc8e7db Capsule manager (#1744)
Refactored to use the Capsule Database manager for setting up the
Flarum (mysql) connection.

This will introduce the reconnector automatically, fixing #1740
2019-02-04 23:31:12 +01:00
Franz Liedke
233b495ff8 Properly wrap error bag in session
Second part of fixing #1683.
2019-02-03 21:16:43 +01:00
Franz Liedke
e4a913db95 Fix error redirect when resetting passwords
This was an oversight from the large database column renamings.

Fixes #1683.
2019-02-03 21:06:47 +01:00
Franz Liedke
b0d948dc32 Add helpful (?) output to test setup script 2019-02-03 20:39:33 +01:00
Franz Liedke
11a2af43f3 travis: Configure setup for integration tests 2019-02-03 20:39:33 +01:00
Franz Liedke
7870bf9149 Setup Composer commands for testing and setup 2019-02-03 20:39:33 +01:00
Franz Liedke
31266d3029 Make integration tests independent
This creates a dedicated test suite for integration tests. All of them
can be run independently, and there is no order dependency - previously,
all integration tests needed the installer test to run first, and they
would fail if installation failed.

Now, the developer will have to set up a Flarum database to be used by
these tests. A setup script to make this simple will be added in the
next commit.

Small tradeoff: the installer is NOT tested in our test suite anymore,
only implicitly through the setup script. If we decide that this is a
problem, we can still set up separate, dedicated installer tests which
should probably test the web installer.
2019-02-03 20:39:32 +01:00
Franz Liedke
e835b537f1 Move integration tests to separate directory
Again, we do all of this to prepare for creating "real" test suites for
each type of tests.
2019-02-01 19:01:12 +01:00
Franz Liedke
03c854b902 Extract pure unit tests so that they can run fast
- Move to separate directory (base for a separate test suite)
- Inherit directly from PhpUnit
- Configure test suite with dedicated XML file
2019-02-01 19:01:09 +01:00
Franz Liedke
81648f643d Merge pull request #1617 from flarum/fl/installer-cleanup
Split up the installer logic
2019-02-01 17:43:59 +01:00
Franz Liedke
638f934ec4 Use Collection class rather than collect() helper 2019-02-01 14:12:29 +01:00
Franz Liedke
fd7610ffee Improve problem description for wrong PHP version 2019-02-01 13:00:25 +01:00
Franz Liedke
d27a9a6421 DatabaseConfig: Implement Arrayable contract 2019-02-01 13:00:07 +01:00
Franz Liedke
4baf5d5008 Fix tests 2019-02-01 10:33:21 +01:00
Franz Liedke
d4cdd11533 Installer: Support reverting asset publication 2019-01-31 22:43:07 +01:00
Franz Liedke
6f8707fa51 Migrator: Fix resetting core migrations 2019-01-31 22:42:35 +01:00
Franz Liedke
f0287c376a Fix table name in migration 2019-01-31 22:01:05 +01:00
Franz Liedke
0273bf78db Remove obsolete dropForeign() migration
Forgotten in commit cbc95e42dd.
2019-01-31 22:00:41 +01:00
Franz Liedke
4f829a5407 Check MariaDB version, update MySQL constraint
See flarum/docs#43.
2019-01-31 21:52:10 +01:00
Franz Liedke
f2bc007c2d Simplify DataProviderInterface
Instead of passing all these objects / arrays from one object to the
next, simply pass an Installation instance around for configuration.
2019-01-31 21:52:10 +01:00
Franz Liedke
7b2807a839 Extract DatabaseConfig class with validation 2019-01-31 21:52:09 +01:00
Franz Liedke
1e056b2c50 Extract AdminUser class that enforces invariants 2019-01-31 21:52:09 +01:00
Franz Liedke
cf56157ec7 Move password confirmation validation to frontends
Since this is not strictly speaking a domain invariant, but rather
specific to the user interface where passwords are not displayed, and
should therefore be entered twice to prevent mistakes going unnoticed,
this stuff should be checked in the frontend, not in the install steps.

Next step: Ensure that all domain-specific validation is done in the
installer's domain layer. This will ensure these validations cannot be
forgotten, and keep the frontends DRY.
2019-01-31 21:52:08 +01:00
Franz Liedke
ec88138f1d Use dedicated temporary variable instead of array 2019-01-31 21:52:08 +01:00
Franz Liedke
ee919b272b Combine building and storing config in one step 2019-01-31 21:52:08 +01:00
Franz Liedke
24c91e49bc Get rid of DefaultsDataProvider
Since we do not provide a development VM anymore, it does not make sense
to have "default" credentials etc.

To reproduce something similar, I'd suggest using a YAML or JSON file
together with the `--file` option.
2019-01-31 21:52:07 +01:00
Franz Liedke
021aafd226 Switch to a whitelist for enabling extensions 2019-01-31 21:52:07 +01:00
Franz Liedke
f0a243cc37 Move default settings to install step
The various installation "frontends" (such as GUI and console) can now
provide custom overrides, if they want to.
2019-01-31 21:52:06 +01:00
Franz Liedke
042cc54312 Collapse namespace imports 2019-01-31 21:52:06 +01:00
Franz Liedke
b678367498 Catch pipeline's own exception 2019-01-31 21:52:06 +01:00
Franz Liedke
9a415670a3 Simplify PrerequisiteInterface
I went with a return type of Collection, because it is easier to call
methods such as isEmpty() directly on those objects.
2019-01-31 21:52:05 +01:00
Franz Liedke
3314a84b4e Fix the test setup and installer tests
We are still testing the installation logic, but not testing the
actual CLI task. I would love to do that, but IMO we first need to
find a way to do this fully from the outside, by invoking and
talking to the installer through the shell.

Because acceptance tests are easier to do when fully decoupled from
the application. (After all, they are intended to save us from
breaking things when changing code; and we cannot prove that when
we change the tests at the same time.)

It might be easier to start with acceptance tests for the web
installer, though.
2019-01-31 21:52:05 +01:00
Franz Liedke
f8430cda16 Split up the installer logic
This is probably the most complicated way I could find to fix #1587.

Jokes aside, this was done with a few goals in mind:
- Reduce coupling between the installer and the rest of Flarum's
  "Application", which we are building during installation.
- Move the installer logic to several smaller classes, which can then
  be used by the web frontend and the console task, instead of the
  former hacking its way into the latter to be "DRY".
- Separate installer infrastructure (the "pipeline", with the ability
  to revert steps upon failure) from the actual steps being taken.

The problem was conceptual, and would certainly re-occur in a similar
fashion if we wouldn't tackle it at its roots.

It is fixed now, because we no longer use the ExtensionManager for
enabling extensions, but instead duplicate some of its logic. That is
fine because we don't want to do everything it does, e.g. omit
extenders' lifecycle hooks (which depend on the Application instance
being complete).

> for each desired change, make the change easy (warning: this may be
> hard), then make the easy change

- Kent Beck, https://twitter.com/kentbeck/status/250733358307500032

Fixes #1587.
2019-01-31 21:52:04 +01:00
flarum-bot
f93f169943 Bundled output for commit 2dced2e6c8 [skip ci] 2019-01-25 04:46:37 +00:00
Daniël Klabbers
2dced2e6c8 Fixes #1686
- further cleaned up the toggle action
- there's no way to remove the redraws because then the jquery isn't being fired properly
2019-01-25 05:37:45 +01:00
Toby Zerner
2d714a06b5 Make the Request available to the Formatter\Rendering event (#1721)
This is important because extensions may wish to render post content
differently depending on Request factors such as the actor. For example,
an attachments extension might wish to hide attachments from guests.

This solution is a bit of a hack-job for now, but soon when we refactor
the API layer to use tobscure/json-api-server, and also refactor the
Formatter layer, it can be revised.
2019-01-22 23:33:49 +01:00
Daniël Klabbers
ca02e2adf4 Merge branch 'master' of github.com:flarum/core 2019-01-16 11:59:04 +01:00