1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Inject hardcoded prerequisite parameters

This affects version numbers, extensions and paths, which might be
skeleton-specific. This commit moves those hardcoded values out of
the classes and instead injects them through the constructor. This
way, all prerequisites can be configured in the service provider.
This commit is contained in:
Franz Liedke
2015-11-11 19:30:35 +01:00
parent e199997231
commit 6d895e6d77
4 changed files with 41 additions and 14 deletions

View File

@@ -32,9 +32,22 @@ class InstallServiceProvider extends AbstractServiceProvider
'Flarum\Install\Prerequisite\PrerequisiteInterface',
function () {
return new Composite(
new PhpVersion(),
new PhpExtensions(),
new WritablePaths()
new PhpVersion('5.5.0'),
new PhpExtensions([
'dom',
'fileinfo',
'gd',
'json',
'mbstring',
'openssl',
'pdo_mysql',
]),
new WritablePaths([
public_path(),
public_path('assets'),
public_path('extensions'),
storage_path(),
])
);
}
);