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:
@@ -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(),
|
||||
])
|
||||
);
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user