Refactored InstallCommand (+ removed localization from InstallCommand, because it doesn't works actually)
This commit is contained in:
parent
97cd0b5373
commit
0a4636a379
|
@ -1,45 +0,0 @@
|
|||
b8:
|
||||
database:
|
||||
servers:
|
||||
read:
|
||||
- host: localhost
|
||||
port: 3306
|
||||
write:
|
||||
- host: localhost
|
||||
port: 3306
|
||||
type: mysql
|
||||
name: php-censor-db
|
||||
username: php-censor-user
|
||||
password: php-censor-password
|
||||
php-censor:
|
||||
language: en
|
||||
per_page: 10
|
||||
url: 'http://php-censor.local'
|
||||
email_settings:
|
||||
from_address: 'no-reply@php-censor.local'
|
||||
smtp_address:
|
||||
queue:
|
||||
use_queue: true
|
||||
host: localhost
|
||||
name: php-censor-queue
|
||||
lifetime: 600
|
||||
github:
|
||||
token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
comments:
|
||||
commit: false
|
||||
pull_request: false
|
||||
build:
|
||||
remove_builds: true
|
||||
security:
|
||||
disable_auth: false
|
||||
default_user_id: 1
|
||||
auth_providers:
|
||||
internal:
|
||||
type: internal
|
||||
ldap:
|
||||
type: ldap
|
||||
data:
|
||||
host: 'ldap.php-censor.local'
|
||||
port: 389
|
||||
base_dn: 'dc=php-censor,dc=local'
|
||||
mail_attribute: mail
|
|
@ -37,8 +37,12 @@
|
|||
}
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6.0",
|
||||
"ext-pdo": "*",
|
||||
"php": ">=5.6.0",
|
||||
"ext-openssl": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-json": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-curl": "*",
|
||||
|
||||
"swiftmailer/swiftmailer": "5.4.*",
|
||||
"symfony/yaml": "2.8.*",
|
||||
|
|
22
composer.lock
generated
22
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "991c7a5bd9a73001129408ff55f5a8f1",
|
||||
"content-hash": "147a1f73282f1c309c8f85a4e9d3bbac",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bower-asset/admin-lte",
|
||||
|
@ -1695,16 +1695,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "5.7.9",
|
||||
"version": "5.7.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "69f832b87c731d5cacad7f91948778fe98335fdd"
|
||||
"reference": "bf0804199f516fe80ffcc48ac6d4741c49baeb6e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69f832b87c731d5cacad7f91948778fe98335fdd",
|
||||
"reference": "69f832b87c731d5cacad7f91948778fe98335fdd",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bf0804199f516fe80ffcc48ac6d4741c49baeb6e",
|
||||
"reference": "bf0804199f516fe80ffcc48ac6d4741c49baeb6e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1721,11 +1721,11 @@
|
|||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-timer": "^1.0.6",
|
||||
"phpunit/phpunit-mock-objects": "^3.2",
|
||||
"sebastian/comparator": "~1.2.2",
|
||||
"sebastian/comparator": "^1.2.4",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/environment": "^1.3.4 || ^2.0",
|
||||
"sebastian/exporter": "~2.0",
|
||||
"sebastian/global-state": "^1.0 || ^2.0",
|
||||
"sebastian/global-state": "^1.1",
|
||||
"sebastian/object-enumerator": "~2.0",
|
||||
"sebastian/resource-operations": "~1.0",
|
||||
"sebastian/version": "~1.0|~2.0",
|
||||
|
@ -1773,7 +1773,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2017-01-28T06:14:33+00:00"
|
||||
"time": "2017-02-04T09:03:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
|
@ -2767,7 +2767,11 @@
|
|||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.6.0",
|
||||
"ext-pdo": "*"
|
||||
"ext-openssl": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-json": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-curl": "*"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
|
|
|
@ -25,8 +25,12 @@ php-censor:
|
|||
per_page: 10
|
||||
url: 'http://php-censor.local'
|
||||
email_settings:
|
||||
from_address: 'no-reply@php-censor.local'
|
||||
smtp_address:
|
||||
from_address: 'no-reply@php-censor.local'
|
||||
smtp_address: null
|
||||
smtp_port: null
|
||||
smtp_username: null
|
||||
smtp_password: null
|
||||
smtp_encryption: false
|
||||
queue:
|
||||
use_queue: true
|
||||
host: localhost
|
||||
|
|
|
@ -57,7 +57,7 @@ class Database extends \PDO
|
|||
|
||||
$dns = self::$details['type'] . ':host=' . $server['host'];
|
||||
if (isset($server['port'])) {
|
||||
$dns .= ';port=' . $server['port'];
|
||||
$dns .= ';port=' . (integer)$server['port'];
|
||||
}
|
||||
$dns .= ';dbname=' . self::$details['db'];
|
||||
|
||||
|
|
|
@ -61,20 +61,20 @@ class CreateAdminCommand extends Command
|
|||
/** @var $helper QuestionHelper */
|
||||
$helper = $this->getHelperSet()->get('question');
|
||||
|
||||
$question = new Question(Lang::get('enter_email'));
|
||||
$question = new Question('Admin email: ');
|
||||
$question->setValidator(function ($answer) {
|
||||
if (!filter_var($answer, FILTER_VALIDATE_EMAIL)) {
|
||||
throw new \InvalidArgumentException(Lang::get('must_be_valid_email'));
|
||||
throw new \InvalidArgumentException('Must be a valid email address.');
|
||||
}
|
||||
|
||||
return $answer;
|
||||
});
|
||||
$adminEmail = $helper->ask($input, $output, $question);
|
||||
|
||||
$question = new Question(Lang::get('enter_name'));
|
||||
$question = new Question('Admin name: ');
|
||||
$adminName = $helper->ask($input, $output, $question);
|
||||
|
||||
$question = new Question(Lang::get('enter_password'));
|
||||
$question = new Question('Admin password: ');
|
||||
$question->setHidden(true);
|
||||
$question->setHiddenFallback(false);
|
||||
|
||||
|
@ -82,9 +82,9 @@ class CreateAdminCommand extends Command
|
|||
|
||||
try {
|
||||
$userService->createUser($adminName, $adminEmail, $adminPass, true);
|
||||
$output->writeln(Lang::get('user_created'));
|
||||
$output->writeln('<info>User account created!</info>');
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln(sprintf('<error>%s</error>', Lang::get('failed_to_create')));
|
||||
$output->writeln(sprintf('<error>%s</error>', 'PHP Censor failed to create your admin account.'));
|
||||
$output->writeln(sprintf('<error>%s</error>', $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* PHPCI - Continuous Integration for PHP
|
||||
*
|
||||
* @copyright Copyright 2014, Block 8 Limited.
|
||||
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
||||
* @link https://www.phptesting.org/
|
||||
*/
|
||||
|
||||
namespace PHPCensor\Command;
|
||||
|
||||
|
@ -14,8 +7,8 @@ use PDO;
|
|||
|
||||
use b8\Config;
|
||||
use b8\Store\Factory;
|
||||
use PHPCensor\Helper\Lang;
|
||||
use PHPCensor\Model\ProjectGroup;
|
||||
use PHPCensor\Store\UserStore;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\QuestionHelper;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
@ -27,83 +20,71 @@ use Symfony\Component\Console\Question\ConfirmationQuestion;
|
|||
use Symfony\Component\Yaml\Dumper;
|
||||
|
||||
/**
|
||||
* Install console command - Installs PHPCI.
|
||||
* Install console command - Installs PHP Censor
|
||||
*
|
||||
* @author Dan Cryer <dan@block8.co.uk>
|
||||
* @package PHPCI
|
||||
* @subpackage Console
|
||||
* @author Dan Cryer <dan@block8.co.uk>
|
||||
*/
|
||||
class InstallCommand extends Command
|
||||
{
|
||||
protected $configFilePath;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $configPath = APP_DIR . 'config.yml';
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$defaultPath = APP_DIR . 'config.yml';
|
||||
|
||||
$this
|
||||
->setName('php-censor:install')
|
||||
|
||||
->addOption('url', null, InputOption::VALUE_OPTIONAL, Lang::get('installation_url'))
|
||||
->addOption('db-type', null, InputOption::VALUE_OPTIONAL, Lang::get('db_host'))
|
||||
->addOption('db-host', null, InputOption::VALUE_OPTIONAL, Lang::get('db_host'))
|
||||
->addOption('db-port', null, InputOption::VALUE_OPTIONAL, Lang::get('db_port'))
|
||||
->addOption('db-name', null, InputOption::VALUE_OPTIONAL, Lang::get('db_name'))
|
||||
->addOption('db-user', null, InputOption::VALUE_OPTIONAL, Lang::get('db_user'))
|
||||
->addOption('db-pass', null, InputOption::VALUE_OPTIONAL, Lang::get('db_pass'))
|
||||
->addOption('admin-name', null, InputOption::VALUE_OPTIONAL, Lang::get('admin_name'))
|
||||
->addOption('admin-pass', null, InputOption::VALUE_OPTIONAL, Lang::get('admin_pass'))
|
||||
->addOption('admin-mail', null, InputOption::VALUE_OPTIONAL, Lang::get('admin_email'))
|
||||
->addOption('config-path', null, InputOption::VALUE_OPTIONAL, Lang::get('config_path'), $defaultPath)
|
||||
->addOption('queue-use', null, InputOption::VALUE_OPTIONAL, 'Don\'t ask for queue details')
|
||||
->addOption('queue-host', null, InputOption::VALUE_OPTIONAL, 'Beanstalkd queue server hostname')
|
||||
->addOption('queue-name', null, InputOption::VALUE_OPTIONAL, 'Beanstalkd queue name')
|
||||
->addOption('url', null, InputOption::VALUE_OPTIONAL, 'PHP Censor installation URL')
|
||||
->addOption('db-type', null, InputOption::VALUE_OPTIONAL, 'Database type')
|
||||
->addOption('db-host', null, InputOption::VALUE_OPTIONAL, 'Database host')
|
||||
->addOption('db-port', null, InputOption::VALUE_OPTIONAL, 'Database port')
|
||||
->addOption('db-name', null, InputOption::VALUE_OPTIONAL, 'Database name')
|
||||
->addOption('db-user', null, InputOption::VALUE_OPTIONAL, 'Database user')
|
||||
->addOption('db-password', null, InputOption::VALUE_OPTIONAL, 'Database password')
|
||||
->addOption('admin-name', null, InputOption::VALUE_OPTIONAL, 'Admin name')
|
||||
->addOption('admin-password', null, InputOption::VALUE_OPTIONAL, 'Admin password')
|
||||
->addOption('admin-email', null, InputOption::VALUE_OPTIONAL, 'Admin email')
|
||||
->addOption('queue-use', null, InputOption::VALUE_OPTIONAL, 'Don\'t ask for queue details')
|
||||
->addOption('queue-host', null, InputOption::VALUE_OPTIONAL, 'Beanstalkd queue server hostname')
|
||||
->addOption('queue-name', null, InputOption::VALUE_OPTIONAL, 'Beanstalkd queue name')
|
||||
|
||||
->setDescription(Lang::get('install_app'));
|
||||
->setDescription('Install PHP Censor');
|
||||
}
|
||||
|
||||
/**
|
||||
* Installs PHPCI - Can be run more than once as long as you ^C instead of entering an email address.
|
||||
* Installs PHP Censor
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->configFilePath = $input->getOption('config-path');
|
||||
|
||||
if (!$this->verifyNotInstalled($output)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$output->writeln('');
|
||||
$output->writeln('<info>******************</info>');
|
||||
$output->writeln('<info> '.Lang::get('welcome_to_app').'</info>');
|
||||
$output->writeln('<info>******************</info>');
|
||||
$output->writeln('<info>***************************************</info>');
|
||||
$output->writeln('<info>* Welcome to PHP Censor installation *</info>');
|
||||
$output->writeln('<info>***************************************</info>');
|
||||
$output->writeln('');
|
||||
|
||||
$this->checkRequirements($output);
|
||||
|
||||
$output->writeln(Lang::get('please_answer'));
|
||||
$output->writeln('-------------------------------------');
|
||||
$output->writeln('');
|
||||
$output->writeln('Please answer the following questions:');
|
||||
$output->writeln('--------------------------------------');
|
||||
$output->writeln('');
|
||||
|
||||
// ----
|
||||
// Get DB connection information and verify that it works:
|
||||
// ----
|
||||
$connectionVerified = false;
|
||||
|
||||
while (!$connectionVerified) {
|
||||
$db = $this->getDatabaseInformation($input, $output);
|
||||
|
||||
$db = $this->getDatabaseInformation($input, $output);
|
||||
$connectionVerified = $this->verifyDatabaseDetails($db, $output);
|
||||
}
|
||||
|
||||
$output->writeln('');
|
||||
|
||||
$conf = [];
|
||||
$conf['b8']['database'] = $db;
|
||||
|
||||
// ----
|
||||
// Get basic installation details (URL, etc)
|
||||
// ----
|
||||
$conf['php-censor'] = $this->getConfigInformation($input, $output);
|
||||
|
||||
$this->writeConfigFile($conf);
|
||||
|
@ -115,58 +96,69 @@ class InstallCommand extends Command
|
|||
$this->createDefaultGroup($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OutputInterface $output
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function verifyNotInstalled(OutputInterface $output)
|
||||
{
|
||||
if (file_exists($this->configPath)) {
|
||||
$content = file_get_contents($this->configPath);
|
||||
|
||||
if (!empty($content)) {
|
||||
$output->writeln('<error>The PHP Censor config file exists and is not empty. PHP Censor is already installed!</error>');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check PHP version, required modules and for disabled functions.
|
||||
*
|
||||
* @param OutputInterface $output
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function checkRequirements(OutputInterface $output)
|
||||
{
|
||||
$output->write('Checking requirements...');
|
||||
$output->writeln('Checking requirements...');
|
||||
$errors = false;
|
||||
|
||||
// Check PHP version:
|
||||
if (!(version_compare(PHP_VERSION, '5.4.0') >= 0)) {
|
||||
if (!(version_compare(PHP_VERSION, '5.6.0') >= 0)) {
|
||||
$output->writeln('');
|
||||
$output->writeln('<error>'.Lang::get('app_php_req').'</error>');
|
||||
$output->writeln('<error>PHP Censor requires at least PHP 5.6.0! Installed PHP ' . PHP_VERSION . '</error>');
|
||||
$errors = true;
|
||||
}
|
||||
|
||||
// Check required extensions are present:
|
||||
$requiredExtensions = ['PDO'];
|
||||
$requiredExtensions = ['PDO', 'xml', 'json', 'curl', 'openssl'];
|
||||
|
||||
foreach ($requiredExtensions as $extension) {
|
||||
if (!extension_loaded($extension)) {
|
||||
$output->writeln('');
|
||||
$output->writeln('<error>'.Lang::get('extension_required', $extension).'</error>');
|
||||
$output->writeln('<error>Extension required: ' . $extension . '</error>');
|
||||
$errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Check required functions are callable:
|
||||
$requiredFunctions = ['exec', 'shell_exec'];
|
||||
$requiredFunctions = ['exec', 'shell_exec', 'proc_open', 'password_hash'];
|
||||
|
||||
foreach ($requiredFunctions as $function) {
|
||||
if (!function_exists($function)) {
|
||||
$output->writeln('');
|
||||
$output->writeln('<error>'.Lang::get('function_required', $function).'</error>');
|
||||
$output->writeln('<error>PHP Censor needs to be able to call the ' . $function . '() function. Is it disabled in php.ini?</error>');
|
||||
$errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('password_hash')) {
|
||||
$output->writeln('');
|
||||
$output->writeln('<error>'.Lang::get('function_required', $function).'</error>');
|
||||
$errors = true;
|
||||
}
|
||||
|
||||
if ($errors) {
|
||||
throw new Exception(Lang::get('requirements_not_met'));
|
||||
throw new Exception('PHP Censor cannot be installed, as not all requirements are met. Please review the errors above before continuing.');
|
||||
}
|
||||
|
||||
$output->writeln(' <info>'.Lang::get('ok').'</info>');
|
||||
$output->writeln('');
|
||||
$output->writeln('<info>OK</info>');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -183,37 +175,37 @@ class InstallCommand extends Command
|
|||
/** @var $helper QuestionHelper */
|
||||
$helper = $this->getHelperSet()->get('question');
|
||||
|
||||
// Function to validate mail address.
|
||||
// Function to validate email address.
|
||||
$mailValidator = function ($answer) {
|
||||
if (!filter_var($answer, FILTER_VALIDATE_EMAIL)) {
|
||||
throw new \InvalidArgumentException(Lang::get('must_be_valid_email'));
|
||||
throw new \InvalidArgumentException('Must be a valid email address.');
|
||||
}
|
||||
|
||||
return $answer;
|
||||
};
|
||||
|
||||
if ($adminEmail = $input->getOption('admin-mail')) {
|
||||
if ($adminEmail = $input->getOption('admin-email')) {
|
||||
$adminEmail = $mailValidator($adminEmail);
|
||||
} else {
|
||||
$questionEmail = new Question(Lang::get('enter_email'));
|
||||
$questionEmail = new Question('Admin email: ');
|
||||
$adminEmail = $helper->ask($input, $output, $questionEmail);
|
||||
}
|
||||
|
||||
if (!$adminName = $input->getOption('admin-name')) {
|
||||
$questionName = new Question(Lang::get('admin_name'));
|
||||
$questionName = new Question('Admin name: ');
|
||||
$adminName = $helper->ask($input, $output, $questionName);
|
||||
}
|
||||
|
||||
if (!$adminPass = $input->getOption('admin-pass')) {
|
||||
$questionPass = new Question(Lang::get('enter_password'));
|
||||
if (!$adminPass = $input->getOption('admin-password')) {
|
||||
$questionPass = new Question('Admin password: ');
|
||||
$questionPass->setHidden(true);
|
||||
$questionPass->setHiddenFallback(false);
|
||||
$adminPass = $helper->ask($input, $output, $questionPass);
|
||||
}
|
||||
|
||||
$admin['mail'] = $adminEmail;
|
||||
$admin['name'] = $adminName;
|
||||
$admin['pass'] = $adminPass;
|
||||
$admin['email'] = $adminEmail;
|
||||
$admin['name'] = $adminName;
|
||||
$admin['password'] = $adminPass;
|
||||
|
||||
return $admin;
|
||||
}
|
||||
|
@ -221,20 +213,19 @@ class InstallCommand extends Command
|
|||
/**
|
||||
* Load configuration for PHPCI form CLI options or ask info to user.
|
||||
*
|
||||
* @param InputInterface $input
|
||||
* @param InputInterface $input
|
||||
* @param OutputInterface $output
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getConfigInformation(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$config = [];
|
||||
|
||||
/** @var $helper QuestionHelper */
|
||||
$helper = $this->getHelperSet()->get('question');
|
||||
|
||||
$urlValidator = function ($answer) {
|
||||
if (!filter_var($answer, FILTER_VALIDATE_URL)) {
|
||||
throw new Exception(Lang::get('must_be_valid_url'));
|
||||
throw new Exception('Must be a valid URL.');
|
||||
}
|
||||
|
||||
return rtrim($answer, '/');
|
||||
|
@ -243,18 +234,44 @@ class InstallCommand extends Command
|
|||
if ($url = $input->getOption('url')) {
|
||||
$url = $urlValidator($url);
|
||||
} else {
|
||||
$question = new Question(Lang::get('enter_app_url'));
|
||||
$question = new Question('Your PHP Censor URL ("http://php-censor.local" for example): ');
|
||||
$question->setValidator($urlValidator);
|
||||
$url = $helper->ask($input, $output, $question);
|
||||
}
|
||||
|
||||
$config['language'] = 'en';
|
||||
$config['per_page'] = 10;
|
||||
|
||||
$config['url'] = $url;
|
||||
$config['queue'] = $this->getQueueInformation($input, $output);
|
||||
|
||||
return $config;
|
||||
return [
|
||||
'language' => 'en',
|
||||
'per_page' => 10,
|
||||
'url' => $url,
|
||||
'queue' => $this->getQueueInformation($input, $output),
|
||||
'email_settings' => [
|
||||
'from_address' => 'no-reply@php-censor.local',
|
||||
'smtp_address' => null,
|
||||
'smtp_port' => null,
|
||||
'smtp_username' => null,
|
||||
'smtp_password' => null,
|
||||
'smtp_encryption' => false,
|
||||
],
|
||||
'github' => [
|
||||
'token' => null,
|
||||
'comments' => [
|
||||
'commit' => false,
|
||||
'pull_request' => false,
|
||||
],
|
||||
],
|
||||
'build' => [
|
||||
'remove_builds' => true,
|
||||
],
|
||||
'security' => [
|
||||
'disable_auth' => false,
|
||||
'default_user_id' => 1,
|
||||
'auth_providers' => [
|
||||
'default' => [
|
||||
'type' => 'internal',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -262,12 +279,13 @@ class InstallCommand extends Command
|
|||
*
|
||||
* @param InputInterface $input
|
||||
* @param OutputInterface $output
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getQueueInformation(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$skipQueueConfig = [
|
||||
'queue-use' => false,
|
||||
'use_queue' => false,
|
||||
'host' => null,
|
||||
'name' => null,
|
||||
'lifetime' => 600
|
||||
|
@ -278,7 +296,7 @@ class InstallCommand extends Command
|
|||
}
|
||||
|
||||
$queueConfig = [
|
||||
'queue-use' => true,
|
||||
'use_queue' => true,
|
||||
];
|
||||
|
||||
/** @var $helper QuestionHelper */
|
||||
|
@ -305,10 +323,11 @@ class InstallCommand extends Command
|
|||
}
|
||||
|
||||
/**
|
||||
* Load configuration for DB form CLI options or ask info to user.
|
||||
* Load configuration for database form CLI options or ask info to user.
|
||||
*
|
||||
* @param InputInterface $input
|
||||
* @param InputInterface $input
|
||||
* @param OutputInterface $output
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getDatabaseInformation(InputInterface $input, OutputInterface $output)
|
||||
|
@ -319,45 +338,50 @@ class InstallCommand extends Command
|
|||
$helper = $this->getHelperSet()->get('question');
|
||||
|
||||
if (!$dbType = $input->getOption('db-type')) {
|
||||
$questionType = new Question(Lang::get('enter_db_type'), 'mysql');
|
||||
$questionType = new Question('Please enter your database type (mysql or pgsql): ');
|
||||
$dbType = $helper->ask($input, $output, $questionType);
|
||||
}
|
||||
|
||||
if (!$dbHost = $input->getOption('db-host')) {
|
||||
$questionHost = new Question(Lang::get('enter_db_host'), 'localhost');
|
||||
$questionHost = new Question('Please enter your database host (default: localhost): ', 'localhost');
|
||||
$dbHost = $helper->ask($input, $output, $questionHost);
|
||||
}
|
||||
|
||||
if (!$dbPort = $input->getOption('db-port')) {
|
||||
$questionPort = new Question(Lang::get('enter_db_port'), '3306');
|
||||
$questionPort = new Question('Please enter your database port (default: empty): ');
|
||||
$dbPort = $helper->ask($input, $output, $questionPort);
|
||||
}
|
||||
|
||||
if (!$dbName = $input->getOption('db-name')) {
|
||||
$questionDb = new Question(Lang::get('enter_db_name'), 'php-censor-db');
|
||||
$questionDb = new Question('Please enter your database name (default: php-censor-db): ', 'php-censor-db');
|
||||
$dbName = $helper->ask($input, $output, $questionDb);
|
||||
}
|
||||
|
||||
if (!$dbUser = $input->getOption('db-user')) {
|
||||
$questionUser = new Question(Lang::get('enter_db_user'), 'php-censor-user');
|
||||
$questionUser = new Question('Please enter your DB user (default: php-censor-user): ', 'php-censor-user');
|
||||
$dbUser = $helper->ask($input, $output, $questionUser);
|
||||
}
|
||||
|
||||
if (!$dbPass = $input->getOption('db-pass')) {
|
||||
$questionPass = new Question(Lang::get('enter_db_pass'));
|
||||
if (!$dbPass = $input->getOption('db-password')) {
|
||||
$questionPass = new Question('Please enter your database password: ');
|
||||
$questionPass->setHidden(true);
|
||||
$questionPass->setHiddenFallback(false);
|
||||
$dbPass = $helper->ask($input, $output, $questionPass);
|
||||
}
|
||||
|
||||
$db['servers']['read'] = [[
|
||||
'host' => $dbHost,
|
||||
'port' => $dbPort,
|
||||
]];
|
||||
$db['servers']['write'] = [[
|
||||
'host' => $dbHost,
|
||||
'port' => $dbPort,
|
||||
]];
|
||||
$dbServers = [
|
||||
[
|
||||
'host' => $dbHost,
|
||||
]
|
||||
];
|
||||
|
||||
if ($dbPort) {
|
||||
$dbServers[0]['port'] = (integer)$dbPort;
|
||||
}
|
||||
|
||||
$db['servers']['read'] = $dbServers;
|
||||
$db['servers']['write'] = $dbServers;
|
||||
|
||||
$db['type'] = $dbType;
|
||||
$db['name'] = $dbName;
|
||||
$db['username'] = $dbUser;
|
||||
|
@ -367,16 +391,24 @@ class InstallCommand extends Command
|
|||
}
|
||||
|
||||
/**
|
||||
* Try and connect to DB using the details provided.
|
||||
* Try and connect to DB using the details provided
|
||||
*
|
||||
* @param array $db
|
||||
* @param OutputInterface $output
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function verifyDatabaseDetails(array $db, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
$dns = $db['type'] . ':host=' . $db['servers']['write'][0]['host'];
|
||||
if (isset($db['servers']['write'][0]['host'])) {
|
||||
$dns .= ';port=' . (integer)$db['servers']['write'][0]['host'];
|
||||
}
|
||||
$dns .= ';dbname=' . $db['name'];
|
||||
|
||||
$pdo = new PDO(
|
||||
$db['type'] . ':host=' . $db['servers']['write'][0]['host'] . ';port=' . $db['servers']['write'][0]['host'] . 'dbname=' . $db['name'],
|
||||
$dns,
|
||||
$db['username'],
|
||||
$db['password'],
|
||||
[
|
||||
|
@ -392,7 +424,7 @@ class InstallCommand extends Command
|
|||
return true;
|
||||
|
||||
} catch (Exception $ex) {
|
||||
$output->writeln('<error>'.Lang::get('could_not_connect').'</error>');
|
||||
$output->writeln('<error>PHP Censor could not connect to database with the details provided. Please try again.</error>');
|
||||
$output->writeln('<error>' . $ex->getMessage() . '</error>');
|
||||
}
|
||||
|
||||
|
@ -408,16 +440,16 @@ class InstallCommand extends Command
|
|||
$dumper = new Dumper();
|
||||
$yaml = $dumper->dump($config, 4);
|
||||
|
||||
file_put_contents($this->configFilePath, $yaml);
|
||||
file_put_contents($this->configPath, $yaml);
|
||||
}
|
||||
|
||||
protected function setupDatabase(OutputInterface $output)
|
||||
{
|
||||
$output->write(Lang::get('setting_up_db'));
|
||||
$output->write('Setting up your database...');
|
||||
|
||||
shell_exec(ROOT_DIR . 'bin/console php-censor-migrations:migrate');
|
||||
|
||||
$output->writeln('<info>'.Lang::get('ok').'</info>');
|
||||
$output->writeln('<info>OK</info>');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -431,13 +463,14 @@ class InstallCommand extends Command
|
|||
try {
|
||||
$this->reloadConfig();
|
||||
|
||||
$userStore = Factory::getStore('User');
|
||||
/** @var UserStore $userStore */
|
||||
$userStore = Factory::getStore('User');
|
||||
$userService = new UserService($userStore);
|
||||
$userService->createUser($admin['name'], $admin['mail'], $admin['pass'], 1);
|
||||
$userService->createUser($admin['name'], $admin['email'], $admin['password'], 1);
|
||||
|
||||
$output->writeln('<info>'.Lang::get('user_created').'</info>');
|
||||
$output->writeln('<info>User account created!</info>');
|
||||
} catch (\Exception $ex) {
|
||||
$output->writeln('<error>'.Lang::get('failed_to_create').'</error>');
|
||||
$output->writeln('<error>PHP Censor failed to create your admin account!</error>');
|
||||
$output->writeln('<error>' . $ex->getMessage() . '</error>');
|
||||
}
|
||||
}
|
||||
|
@ -453,9 +486,9 @@ class InstallCommand extends Command
|
|||
|
||||
Factory::getStore('ProjectGroup')->save($group);
|
||||
|
||||
$output->writeln('<info>'.Lang::get('default_group_created').'</info>');
|
||||
$output->writeln('<info>Default project group created!</info>');
|
||||
} catch (\Exception $ex) {
|
||||
$output->writeln('<error>'.Lang::get('default_group_failed_to_create').'</error>');
|
||||
$output->writeln('<error>PHP Censor failed to create default project group!</error>');
|
||||
$output->writeln('<error>' . $ex->getMessage() . '</error>');
|
||||
}
|
||||
}
|
||||
|
@ -464,27 +497,8 @@ class InstallCommand extends Command
|
|||
{
|
||||
$config = Config::getInstance();
|
||||
|
||||
if (file_exists($this->configFilePath)) {
|
||||
$config->loadYaml($this->configFilePath);
|
||||
if (file_exists($this->configPath)) {
|
||||
$config->loadYaml($this->configPath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OutputInterface $output
|
||||
* @return bool
|
||||
*/
|
||||
protected function verifyNotInstalled(OutputInterface $output)
|
||||
{
|
||||
if (file_exists($this->configFilePath)) {
|
||||
$content = file_get_contents($this->configFilePath);
|
||||
|
||||
if (!empty($content)) {
|
||||
$output->writeln('<error>'.Lang::get('config_exists').'</error>');
|
||||
$output->writeln('<error>'.Lang::get('update_instead').'</error>');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ class Lang
|
|||
return call_user_func_array('sprintf', $vars);
|
||||
}
|
||||
|
||||
return '%%MISSING STRING: ' . $string . '%%';
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -284,42 +284,6 @@ du kører composer update.',
|
|||
'search_packagist_for_more' => 'Søg på Packagist efter flere pakker',
|
||||
'search' => 'Søg »',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'PHP Censor Installations-URL',
|
||||
'db_host' => 'Database-hostnavn',
|
||||
'db_name' => 'Database-navn',
|
||||
'db_user' => 'Database-brugernavn',
|
||||
'db_pass' => 'Database-adgangskode',
|
||||
'admin_name' => 'Administrator-navn',
|
||||
'admin_pass' => 'Administrator-adgangskode',
|
||||
'admin_email' => 'Administrators email-adresse',
|
||||
'config_path' => 'Konfigurations-fil',
|
||||
'install_app' => 'Installér PHP Censor',
|
||||
'welcome_to_app' => 'Velkommen til PHP Censor',
|
||||
'please_answer' => 'Besvar venligst følgende spørgsmål:',
|
||||
'app_php_req' => 'PHP Censor kræver minimum PHP version 5.4.0 for at fungere.',
|
||||
'extension_required' => 'Extension påkrævet: %s',
|
||||
'function_required' => 'PHP Censor behøver adgang til funktion %s() i PHP. Er den deaktiveret i php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor kan ikke installeres da nogle krav ikke opfyldtes.
|
||||
Kontrollér venligst nedenstående fejl før du fortsætter.',
|
||||
'must_be_valid_email' => 'Skal være en gyldig email-adresse.',
|
||||
'must_be_valid_url' => 'Skal være en gyldig URL.',
|
||||
'enter_name' => 'Administrator-navn: ',
|
||||
'enter_email' => 'Administrators email-adresse: ',
|
||||
'enter_password' => 'Administrator-adgangskode: ',
|
||||
'enter_app_url' => 'Din PHP Censor URL (eksempelvis "http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Indtast dit DB-hostnavn [localhost]: ',
|
||||
'enter_db_name' => 'Indtast dit DB database-navn [php-censor-db]: ',
|
||||
'enter_db_user' => 'Indtast dit DB-brugernavn [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Indtast dit DB-password: ',
|
||||
'could_not_connect' => 'PHP Censor kunne ikke forbinde til DB med de angivning oplysninger. Forsøg igen.',
|
||||
'setting_up_db' => 'Indlæser database...',
|
||||
'user_created' => 'Brugerkonto oprettet!',
|
||||
'failed_to_create' => 'PHP Censor kunne ikke oprette din administrator-konto.',
|
||||
'config_exists' => 'PHP Censor konfigurationsfilen findes og er ikke tom.',
|
||||
'update_instead' => 'Hvis du forsøgte at opdatere PHP Censor, forsøg da venligst med php-censor:update istedet.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Opdatér databasen med ændrede modeller',
|
||||
'updating_app' => 'Opdaterer PHP Censor-database:',
|
||||
|
|
|
@ -307,42 +307,6 @@ generiert. Um es zu verwenden, fügen Sie einfach den folgenden Public Key im Ab
|
|||
'stage_broken' => 'Defekt',
|
||||
'stage_fixed' => 'Behoben',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'PHP Censor Installations-URL',
|
||||
'db_host' => 'Datenbankserver',
|
||||
'db_name' => 'Datenbankname',
|
||||
'db_user' => 'Datenbankbenutzer',
|
||||
'db_pass' => 'Datenbankpasswort',
|
||||
'admin_name' => 'Administratorname',
|
||||
'admin_pass' => 'Administratorpasswort',
|
||||
'admin_email' => 'Emailadresse des Administrators',
|
||||
'config_path' => 'Dateipfad für Konfiguration',
|
||||
'install_app' => 'PHP Censor installieren',
|
||||
'welcome_to_app' => 'Willkommen bei PHP Censor',
|
||||
'please_answer' => 'Bitte beantworten Sie die folgenden Fragen:',
|
||||
'app_php_req' => 'PHP Censor benötigt mindestens PHP 5.4.0 um zu funktionieren.',
|
||||
'extension_required' => 'Benötigte Extensions: %s',
|
||||
'function_required' => 'PHP Censor muss die Funktion %s() aufrufen können. Ist sie in php.ini deaktiviert?',
|
||||
'requirements_not_met' => 'PHP Censor konnte nicht installiert werden, weil nicht alle Bedingungen erfüllt sind.
|
||||
Bitte überprüfen Sie die Fehler, bevor Sie fortfahren,',
|
||||
'must_be_valid_email' => 'Muss eine gültige Emailadresse sein.',
|
||||
'must_be_valid_url' => 'Muss eine valide URL sein.',
|
||||
'enter_name' => 'Name des Administrators: ',
|
||||
'enter_email' => 'Emailadresse des Administrators: ',
|
||||
'enter_password' => 'Passwort des Administrators: ',
|
||||
'enter_app_url' => 'Ihre PHP Censor-URL (z.B. "http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Bitte geben Sie Ihren DB-Host ein [localhost]: ',
|
||||
'enter_db_name' => 'Bitte geben Sie Ihren DB-Namen ein [php-censor-db]: ',
|
||||
'enter_db_user' => 'Bitte geben Sie Ihren DB-Benutzernamen ein [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Bitte geben Sie Ihr DB-Passwort ein: ',
|
||||
'could_not_connect' => 'PHP Censor konnte wegen folgender Details nicht mit DB verbinden. Bitte versuchen Sie es erneut.',
|
||||
'setting_up_db' => 'Ihre Datenbank wird aufgesetzt... ',
|
||||
'user_created' => 'Benutzerkonto wurde erstellt!',
|
||||
'failed_to_create' => 'PHP Censor konnte Ihr Administratorenkonto nicht erstellen.',
|
||||
'config_exists' => 'Die PHP Censor-Konfigurationsdatei existiert und ist nicht leer..',
|
||||
'update_instead' => 'Falls Sie versucht haben PHP Censor zu aktualisieren, benutzen Sie bitte stattdessen php-censor:update.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Datenbank wird aktualisiert, um den Änderungen der Models zu entsprechen.',
|
||||
'updating_app' => 'Aktualisiere PHP Censor-Datenbank:',
|
||||
|
|
|
@ -286,42 +286,6 @@ Services</a> του Bitbucket αποθετηρίου σας.',
|
|||
'search_packagist_for_more' => 'Αναζήτηση στο Packagist για περισσότερα πακέτα',
|
||||
'search' => 'Αναζήτηση »',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'Σύνδεσμος URL εγκατάστασης του PHP Censor',
|
||||
'db_host' => 'Φιλοξενία βάσης δεδομένων',
|
||||
'db_name' => 'Όνομα βάσης δεδομένων',
|
||||
'db_user' => 'Όνομα χρήστη βάσης δεδομένων',
|
||||
'db_pass' => 'Κωδικός πρόσβασης βάσης δεδομένων',
|
||||
'admin_name' => 'Όνομα διαχειριστή',
|
||||
'admin_pass' => 'Κωδικός πρόσβασης διαχειριστή',
|
||||
'admin_email' => 'Διεύθυνση email διαχειριστή',
|
||||
'config_path' => 'Διαδρομή αρχείου ρυθμίσεων',
|
||||
'install_app' => 'Εγκατάσταση PHP Censor',
|
||||
'welcome_to_app' => 'Καλώς ήρθατε στο PHP Censor',
|
||||
'please_answer' => 'Παρακαλώ απαντήστε στις ακόλουθες ερωτήσεις:',
|
||||
'app_php_req' => 'Το PHP Censor απαιτεί τουλάχιστον την έκδοση PHP 5.4.0 για να λειτουργήσει',
|
||||
'extension_required' => 'Απαιτούμενη επέκταση: %s ',
|
||||
'function_required' => 'Το PHP Censor πρέπει να είναι σε θέση να καλέσει την %s() συνάρτηση. Είναι απενεργοποιημένη στο php.ini;',
|
||||
'requirements_not_met' => 'Το PHP Censor δεν μπορεί να εγκατασταθεί, καθώς όλες οι απαιτήσεις δεν ικανοποιούνται.
|
||||
Παρακαλούμε διαβάστε τα παραπάνω λάθη πριν συνεχίσετε.',
|
||||
'must_be_valid_email' => 'Πρέπει να είναι μια έγκυρη διεύθυνση ηλεκτρονικού ταχυδρομείου.',
|
||||
'must_be_valid_url' => 'Πρέπει να είναι μια έγκυρη διεύθυνση URL.',
|
||||
'enter_name' => 'Όνομα διαχειριστή: ',
|
||||
'enter_email' => 'Ηλ. Διεύθυνση διαχειριστή: ',
|
||||
'enter_password' => 'Κωδικός πρόσβασης διαχειριστή: ',
|
||||
'enter_app_url' => 'Ο URL σύνδεσμος σας για το PHP Censor ("http://php-censor.local" για παράδειγμα): ',
|
||||
|
||||
'enter_db_host' => 'Παρακαλώ εισάγετε τον DB οικοδεσπότη σας [localhost]: ',
|
||||
'enter_db_name' => 'Παρακαλώ εισάγετε το όνομα της DB βάσης δεδομένων σας [php-censor-db]: ',
|
||||
'enter_db_user' => 'Παρακαλώ εισάγετε το όνομα χρήστη της DB σας [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Παρακαλώ εισάγετε τον κωδικό χρήστη της DB σας: ',
|
||||
'could_not_connect' => 'Το PHP Censor δεν μπόρεσε να συνδεθεί με την DB με τα στοχεία που δώσατε. Παρακαλώ δοκιμάστε ξανά.',
|
||||
'setting_up_db' => 'Γίνεται ρύθμιση της βάσης δεδομένων σας ...',
|
||||
'user_created' => 'Λογαριασμός χρήστη δημιουργήθηκε!',
|
||||
'failed_to_create' => 'Το PHP Censor απέτυχε να δημιουργήσει το λογαριασμό διαχειριστή σας.',
|
||||
'config_exists' => 'Το αρχείο ρυθμίσεων PHP Censor υπάρχει και δεν είναι άδειο.',
|
||||
'update_instead' => 'Εάν προσπαθούσατε να ενημερώσετε PHP Censor, παρακαλούμε χρησιμοποιήστε καλύτερα το php-censor:update αντ \'αυτού.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Ενημέρωστε την βάση δεδομένων ώστε να αντικατοπτρίζει τροποποιημένα μοντέλα.',
|
||||
'updating_app' => 'Γίνεται ενημέρωση της βάσης δεδομένων PHP Censor:',
|
||||
|
|
|
@ -337,43 +337,6 @@ PHP Censor',
|
|||
'started' => 'Started',
|
||||
'finished' => 'Finished',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'PHP Censor Installation URL',
|
||||
'db_host' => 'Database Host',
|
||||
'db_name' => 'Database Name',
|
||||
'db_user' => 'Database Username',
|
||||
'db_pass' => 'Database Password',
|
||||
'admin_name' => 'Admin Name',
|
||||
'admin_pass' => 'Admin Password',
|
||||
'admin_email' => 'Admin Email Address',
|
||||
'config_path' => 'Config File Path',
|
||||
'install_app' => 'Install PHP Censor',
|
||||
'welcome_to_app' => 'Welcome to PHP Censor',
|
||||
'please_answer' => 'Please answer the following questions:',
|
||||
'app_php_req' => 'PHP Censor requires at least PHP 5.4.0 to function.',
|
||||
'extension_required' => 'Extension required: %s',
|
||||
'function_required' => 'PHP Censor needs to be able to call the %s() function. Is it disabled in php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor cannot be installed, as not all requirements are met.
|
||||
Please review the errors above before continuing.',
|
||||
'must_be_valid_email' => 'Must be a valid email address.',
|
||||
'must_be_valid_url' => 'Must be a valid URL.',
|
||||
'enter_name' => 'Admin Name: ',
|
||||
'enter_email' => 'Admin Email: ',
|
||||
'enter_password' => 'Admin Password: ',
|
||||
'enter_app_url' => 'Your PHP Censor URL ("http://php-censor.local" for example): ',
|
||||
|
||||
'enter_db_host' => 'Please enter your DB host [localhost]: ',
|
||||
'enter_db_port' => 'Please enter your DB port [3306]: ',
|
||||
'enter_db_name' => 'Please enter your DB database name [php-censor-db]: ',
|
||||
'enter_db_user' => 'Please enter your DB username [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Please enter your DB password: ',
|
||||
'could_not_connect' => 'PHP Censor could not connect to DB with the details provided. Please try again.',
|
||||
'setting_up_db' => 'Setting up your database... ',
|
||||
'user_created' => 'User account created!',
|
||||
'failed_to_create' => 'PHP Censor failed to create your admin account.',
|
||||
'config_exists' => 'The PHP Censor config file exists and is not empty.',
|
||||
'update_instead' => 'If you were trying to update PHP Censor, please use php-censor:update instead.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Update the database to reflect modified models.',
|
||||
'updating_app' => 'Updating PHP Censor database: ',
|
||||
|
|
|
@ -281,42 +281,6 @@ PHP Censor',
|
|||
'search_packagist_for_more' => 'Buscar más paquetes en Packagist',
|
||||
'search' => 'Buscar »',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'URL de la instalación PHP Censor',
|
||||
'db_host' => 'Host',
|
||||
'db_name' => 'Nombre de la base de datos',
|
||||
'db_user' => 'Usuario de la base de datos',
|
||||
'db_pass' => 'Clave de la base de datos',
|
||||
'admin_name' => 'Nombre del Admin',
|
||||
'admin_pass' => 'Clave del Admin',
|
||||
'admin_email' => 'Email de Admin',
|
||||
'config_path' => 'Ruta al archivo config',
|
||||
'install_app' => 'Instalar PHP Censor',
|
||||
'welcome_to_app' => 'Bienvenido a PHP Censor',
|
||||
'please_answer' => 'Por favor, responde las siguientes preguntas:',
|
||||
'app_php_req' => 'PHP Censor requiere al menos PHP 5.4.0 para funcionar.',
|
||||
'extension_required' => 'Extensión requerida: %s',
|
||||
'function_required' => 'PHP Censor debe poder invocar la función %s(). Está deshabilitada en php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor no pudo ser instalado, ya que no se cumplen todos los requerimientos.
|
||||
Por favor, corrige los errores antes de continuar.',
|
||||
'must_be_valid_email' => 'Debe ser una dirección de correos válida.',
|
||||
'must_be_valid_url' => 'Debe ser una URL válida.',
|
||||
'enter_name' => 'Nombre del Admin:',
|
||||
'enter_email' => 'Email del Admin:',
|
||||
'enter_password' => 'Contraseña de Admin:',
|
||||
'enter_app_url' => 'La URL de PHP Censor ("Por ejemplo: http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Por favor, ingresa el servidor DB [localhost]: ',
|
||||
'enter_db_name' => 'Por favor, ingresa el nombre de la base de datos DB [php-censor-db]: ',
|
||||
'enter_db_user' => 'Por favor, ingresa el usuario DB [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Por favor, ingresa la contraseña DB: ',
|
||||
'could_not_connect' => 'PHP Censor no pudo conectarse a DB con los datos dados. Por favor, intenta nuevamente.',
|
||||
'setting_up_db' => 'Configurando base de datos... ',
|
||||
'user_created' => '¡Cuenta de usuario creada!',
|
||||
'failed_to_create' => 'PHP Censor no pudo crear la cuenta de admin.',
|
||||
'config_exists' => 'El archivo config de PHP Censor ya existe y no es vacío.',
|
||||
'update_instead' => 'Si está intentando actualizar PHP Censor, por favor, utiliza php-censor:update.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Actuliza la base de datos para reflejar los modelos actualizados.',
|
||||
'updating_app' => 'Actualizando base de datos PHP Censor: ',
|
||||
|
|
|
@ -301,42 +301,6 @@ PHP Censor',
|
|||
'stage_success' => 'Succes',
|
||||
'stage_failure' => 'Échec',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'URL d\'installation de PHP Censor',
|
||||
'db_host' => 'Hôte de la BDD',
|
||||
'db_name' => 'Nom de la BDD',
|
||||
'db_user' => 'Nom d\'utilisateur de la BDD',
|
||||
'db_pass' => 'Mot de passe de la BDD',
|
||||
'admin_name' => 'Nom de l\'admin',
|
||||
'admin_pass' => 'Mot de passe admin',
|
||||
'admin_email' => 'Adresse email de l\'admin',
|
||||
'config_path' => 'Chemin vers le fichier de configuration',
|
||||
'install_app' => 'Installer PHP Censor',
|
||||
'welcome_to_app' => 'Bienvenue sur PHP Censor',
|
||||
'please_answer' => 'Merci de répondre aux questions suivantes :',
|
||||
'app_php_req' => 'PHP Censor requiert au moins PHP 5.4.0 pour fonctionner.',
|
||||
'extension_required' => 'Extensions requises : %s',
|
||||
'function_required' => 'PHP Censor doit être capable d\'appeler la fonction %s(). Est-ce qu\'elle est désactivée dans votre php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor ne peut pas être installé parce que toutes les conditions requises ne sont pas respectées.
|
||||
Merci de corriger les erreurs ci-dessus avant de continuer.',
|
||||
'must_be_valid_email' => 'Doit être une adresse email valide.',
|
||||
'must_be_valid_url' => 'Doit être une URL valide.',
|
||||
'enter_name' => 'Nom de l\'admin: ',
|
||||
'enter_email' => 'Email de l\'admin: ',
|
||||
'enter_password' => 'Mot de passe de l\'admin: ',
|
||||
'enter_app_url' => 'Votre URL vers PHP Censor (par exemple "http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Merci d\'entrer le nom d\'hôte DB [localhost]: ',
|
||||
'enter_db_name' => 'Merci d\'entrer le nom de la base DB [php-censor-db]: ',
|
||||
'enter_db_user' => 'Merci d\'entrer le nom d\'utilisateur DB [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Merci d\'entrer le mot de passe DB: ',
|
||||
'could_not_connect' => 'PHP Censor ne peut pas se connecter à DB à partir des informations fournies. Veuillez réessayer..',
|
||||
'setting_up_db' => 'Paramétrage de la base de données... ',
|
||||
'user_created' => 'Le compte utilisateur a été créé !',
|
||||
'failed_to_create' => 'PHP Censor n\'a pas réussi à créer votre compte admin.',
|
||||
'config_exists' => 'Le fichier de configuration PHP Censor existe et n\'est pas vide.',
|
||||
'update_instead' => 'Si vous essayez de mettre à jour PHP Censor, merci d\'utiliser la commande php-censor:update.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Mise à jour de la base de données pour refléter les modifications apportées aux modèles.',
|
||||
'updating_app' => 'Mise à jour de la base de données PHP Censor : ',
|
||||
|
|
|
@ -286,43 +286,6 @@ PHP Censor',
|
|||
'search_packagist_for_more' => 'Cerca altri pacchetti su Packagist',
|
||||
'search' => 'Cerca »',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'URL di installazione di PHP Censor',
|
||||
'db_host' => 'Host del Database',
|
||||
'db_name' => 'Nome del Database',
|
||||
'db_user' => 'Username del Database',
|
||||
'db_pass' => 'Password del Database',
|
||||
'admin_name' => 'Nome dell\'amministratore',
|
||||
'admin_pass' => 'Password dell\'amministratore',
|
||||
'admin_email' => 'Email dell\'amministratore',
|
||||
'config_path' => 'Percorso del file di configurazione',
|
||||
'install_app' => 'Installa PHP Censor',
|
||||
'welcome_to_app' => 'Benvenuto in PHP Censor',
|
||||
'please_answer' => 'Per favore rispondi alle seguenti domande:',
|
||||
'app_php_req' => 'PHP Censor richiede come minimo PHP 5.4.0 per funzionare.',
|
||||
'extension_required' => 'Le estensioni richieste sono: %s',
|
||||
'function_required' => 'PHP Censor richiede di poter chiamare la funzione %s(). Questa funzionalità è disabibiltata nel
|
||||
php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor non può essere installato, non tutti i requisiti sono soddisfatti.
|
||||
Per favore controlla gli errori riportati prima di proseguire.',
|
||||
'must_be_valid_email' => 'Deve essere un indirizzo email valido.',
|
||||
'must_be_valid_url' => 'Deve essere un URL valido.',
|
||||
'enter_name' => 'Nome dell\'amministratore: ',
|
||||
'enter_email' => 'Email dell\'amministratore: ',
|
||||
'enter_password' => 'Password dell\'amministratore: ',
|
||||
'enter_app_url' => 'L\'URL di PHP Censor ("http://php-censor.locale" ad esempio): ',
|
||||
|
||||
'enter_db_host' => 'Per favore inserisci l\'host DB [localhost]: ',
|
||||
'enter_db_name' => 'Per favore inserisci il nome DB [php-censor-db]: ',
|
||||
'enter_db_user' => 'Per favore inserisci l\'username DB [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Per favore inserisci la password DB: ',
|
||||
'could_not_connect' => 'PHP Censor non può connettersi a DB con le informazioni fornite. Per favore prova ancora.',
|
||||
'setting_up_db' => 'Configurzione del tuo database... ',
|
||||
'user_created' => 'Account utente creato!',
|
||||
'failed_to_create' => 'PHP Censor non è riuscito a creare il tuo account amministrativo.',
|
||||
'config_exists' => 'Il file di configurazione di PHP Censor esiste e non è vuoto.',
|
||||
'update_instead' => 'Se stai cercando di aggiornare PHP Censor, per favore usa php-censor:update.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Aggiorna il database per riflettere le modifiche ai model.',
|
||||
'updating_app' => 'Aggiornamenti del database di PHP Censor: ',
|
||||
|
|
|
@ -286,42 +286,6 @@ keer je composer update uitvoert.',
|
|||
'search_packagist_for_more' => 'Doorzoek Packagist naar meer packages',
|
||||
'search' => 'Zoek »',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'PHP Censor installatie URL',
|
||||
'db_host' => 'Database host',
|
||||
'db_name' => 'Database naam',
|
||||
'db_user' => 'Database gebruikersnaam',
|
||||
'db_pass' => 'Database wachtwoord',
|
||||
'admin_name' => 'Administrator naam',
|
||||
'admin_pass' => 'Administrator wachtwoord',
|
||||
'admin_email' => 'Administrator e-mailadres',
|
||||
'config_path' => 'Pad naar configuratiebestand',
|
||||
'install_app' => 'Installeer PHP Censor',
|
||||
'welcome_to_app' => 'Welkom bij PHP Censor',
|
||||
'please_answer' => 'Gelieve onderstaande vragen te beantwoorden:',
|
||||
'app_php_req' => 'PHP Censor heeft ten minste PHP 5.4.0 nodig om te werken.',
|
||||
'extension_required' => 'Extensie benodigd: %s',
|
||||
'function_required' => 'PHP Censor moet functie %s() kunnen aanroepen. Is deze uitgeschakeld in php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor kan niet worden geïnstalleerd omdat niet aan alle vereisten is voldaan.
|
||||
Gelieve de fouten na te kijken vooraleer verder te gaan.',
|
||||
'must_be_valid_email' => 'Moet een geldig e-mailadres zijn.',
|
||||
'must_be_valid_url' => 'Moet een geldige URL zijn.',
|
||||
'enter_name' => 'Administrator naam: ',
|
||||
'enter_email' => 'Administrator e-mailadres: ',
|
||||
'enter_password' => 'Administrator wachtwoord: ',
|
||||
'enter_app_url' => 'Je PHP Censor URL (bijvoorbeeld "http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Vul je DB host in [localhost]: ',
|
||||
'enter_db_name' => 'Vul je DB databasenaam in [php-censor-db]: ',
|
||||
'enter_db_user' => 'Vul je DB gebruikersnaam in [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Vul je DB watchtwoord in: ',
|
||||
'could_not_connect' => 'PHP Censor kon met deze gegevens geen verbinding maken met DB. Gelieve opnieuw te proberen.',
|
||||
'setting_up_db' => 'Database wordt aangemaakt...',
|
||||
'user_created' => 'Gebruikersprofiel aangemaakt!',
|
||||
'failed_to_create' => 'PHP Censor kon je administratorprofiel niet aanmaken.',
|
||||
'config_exists' => 'Het PHP Censor configuratiebestand bestaat en is niet leeg.',
|
||||
'update_instead' => 'Liever php-censor:update te gebruiken indien je PHP Censor probeerde te updaten, ',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Update de database naar het beeld van gewijzigde modellen.',
|
||||
'updating_app' => 'PHP Censor database wordt geüpdatet:',
|
||||
|
|
|
@ -287,42 +287,6 @@ wywołaniu polecenia composer update.',
|
|||
'search_packagist_for_more' => 'Przeszukaj Packagist po więcej pakietów',
|
||||
'search' => 'Szukaj »',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'URL instalacyjny PHP Censor',
|
||||
'db_host' => 'Host Bazy Danych',
|
||||
'db_name' => 'Nazwa Bazy Danych',
|
||||
'db_user' => 'Nazwa Użytkownika Bazy Danych',
|
||||
'db_pass' => 'Hasło Bazy Danych',
|
||||
'admin_name' => 'Imię Admina',
|
||||
'admin_pass' => 'Hasło Admina',
|
||||
'admin_email' => 'Adres Email Admina',
|
||||
'config_path' => 'Ścieżka Pliku Config',
|
||||
'install_app' => 'Zainstaluj PHP Censor',
|
||||
'welcome_to_app' => 'Witaj w PHP Censor',
|
||||
'please_answer' => 'Odpowiedz na poniższe pytania:',
|
||||
'app_php_req' => 'PHP Censor wymaga przynajmniej PHP 5.4.0 do prawidłowego funkcjonowania.',
|
||||
'extension_required' => 'Wymagane rozszerzenie: %s',
|
||||
'function_required' => 'PHP Censor musi mieć możliwość wywołania funkcji %s(). Czy ona jest wyłączona w php.ini?',
|
||||
'requirements_not_met' => 'Nie można zainstalować PHP Censor, ponieważ nie wszystkie wymagania zostały spełnione.
|
||||
Przejrzyj powyższą listę błędów przed kontynuowaniem.',
|
||||
'must_be_valid_email' => 'Poprawny adres email jest wymagany.',
|
||||
'must_be_valid_url' => 'Poprawny URL jest wymagany.',
|
||||
'enter_name' => 'Imię Admina: ',
|
||||
'enter_email' => 'Email Admina: ',
|
||||
'enter_password' => 'Hasło Admina: ',
|
||||
'enter_app_url' => 'URL PHP Censor (na przykład "http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Wpisz hosta DB [host lokalny]: ',
|
||||
'enter_db_name' => 'Wpisz nazwę bazy danych DB [php-censor-db]: ',
|
||||
'enter_db_user' => 'Wpisz nazwę użytkownika DB [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Wpisz hasło DB: ',
|
||||
'could_not_connect' => 'Z podanymi ustawieniami PHP Censor nie udało się połączyć z DB. Spróbuj ponownie.',
|
||||
'setting_up_db' => 'Ustawianie Twojej bazy danych...',
|
||||
'user_created' => 'Utworzono konto użytkownika!',
|
||||
'failed_to_create' => 'PHP Censor nie udało się założyc Twojego konta administratora.',
|
||||
'config_exists' => 'Plik konfiguracji PHP Censor istnieje i nie jest pusty.',
|
||||
'update_instead' => 'Jeśli próbowałeś zaktualizować PHP Censor, użyj php-censor:update.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Zaktualizuj bazę danych zgodnie ze zmodyfikowanymi modelami.',
|
||||
'updating_app' => 'Aktualizacja bazy danych PHP Censor:',
|
||||
|
|
|
@ -308,42 +308,6 @@ PHP Censor',
|
|||
'stage_broken' => 'Broken',
|
||||
'stage_fixed' => 'Fixed',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'PHP Censor Installation URL',
|
||||
'db_host' => 'Database Host',
|
||||
'db_name' => 'Database Name',
|
||||
'db_user' => 'Database Username',
|
||||
'db_pass' => 'Database Password',
|
||||
'admin_name' => 'Admin Name',
|
||||
'admin_pass' => 'Admin Password',
|
||||
'admin_email' => 'Admin Email Address',
|
||||
'config_path' => 'Config File Path',
|
||||
'install_app' => 'Install PHP Censor',
|
||||
'welcome_to_app' => 'Welcome to PHP Censor',
|
||||
'please_answer' => 'Please answer the following questions:',
|
||||
'app_php_req' => 'PHP Censor requires at least PHP 5.3.8 to function.',
|
||||
'extension_required' => 'Extension required: %s',
|
||||
'function_required' => 'PHP Censor needs to be able to call the %s() function. Is it disabled in php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor cannot be installed, as not all requirements are met.
|
||||
Please review the errors above before continuing.',
|
||||
'must_be_valid_email' => 'Must be a valid email address.',
|
||||
'must_be_valid_url' => 'Must be a valid URL.',
|
||||
'enter_name' => 'Admin Name: ',
|
||||
'enter_email' => 'Admin Email: ',
|
||||
'enter_password' => 'Admin Password: ',
|
||||
'enter_app_url' => 'Your PHP Censor URL ("http://php-censor.local" for example): ',
|
||||
|
||||
'enter_db_host' => 'Please enter your DB host [localhost]: ',
|
||||
'enter_db_name' => 'Please enter your DB database name [php-censor-db]: ',
|
||||
'enter_db_user' => 'Please enter your DB username [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Please enter your DB password: ',
|
||||
'could_not_connect' => 'PHP Censor could not connect to DB with the details provided. Please try again.',
|
||||
'setting_up_db' => 'Setting up your database... ',
|
||||
'user_created' => 'User account created!',
|
||||
'failed_to_create' => 'PHP Censor failed to create your admin account.',
|
||||
'config_exists' => 'The PHP Censor config file exists and is not empty.',
|
||||
'update_instead' => 'If you were trying to update PHP Censor, please use php-censor:update instead.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Update the database to reflect modified models.',
|
||||
'updating_app' => 'Updating PHP Censor database: ',
|
||||
|
|
|
@ -326,43 +326,6 @@ PHP Censor',
|
|||
'started' => 'Началась',
|
||||
'finished' => 'Закончилась',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'URL-адрес PHP Censor для установки',
|
||||
'db_host' => 'Хост базы данных',
|
||||
'db_name' => 'Имя базы данных',
|
||||
'db_user' => 'Пользователь базы данных',
|
||||
'db_pass' => 'Пароль базы данных',
|
||||
'admin_name' => 'Имя администратора',
|
||||
'admin_pass' => 'Пароль администратора',
|
||||
'admin_email' => 'Email администратора',
|
||||
'config_path' => 'Путь до файла конфигурации',
|
||||
'install_app' => 'Установить PHP Censor',
|
||||
'welcome_to_app' => 'Добро пожаловать в PHP Censor',
|
||||
'please_answer' => 'Пожалуйста, ответьте на несколько вопросов:',
|
||||
'app_php_req' => 'PHP Censor необходима для работы версия PHP не ниже 5.4.0.',
|
||||
'extension_required' => 'Требуется расширение PHP: %s',
|
||||
'function_required' => 'PHP Censor необходима возможность вызывать %s() функцию. Она выключена в php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor не может быть установлен, пока не все требования выполнены.
|
||||
Пожалуйста, просмотрите возникшие ошибки перед тем, как продолжить.',
|
||||
'must_be_valid_email' => 'Должен быть корректным email-адресом.',
|
||||
'must_be_valid_url' => 'Должен быть корректным URL-адресом.',
|
||||
'enter_name' => 'Имя администратора: ',
|
||||
'enter_email' => 'Email администратора: ',
|
||||
'enter_password' => 'Пароль администратора: ',
|
||||
'enter_app_url' => 'URL-адрес вашего PHP Censor (например: "http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Пожалуйста, введите хост DB [localhost]: ',
|
||||
'enter_db_port' => 'Пожалуйста, введите порт DB [3306]: ',
|
||||
'enter_db_name' => 'Пожалуйста, введите имя базы данных DB [php-censor-db]: ',
|
||||
'enter_db_user' => 'Пожалуйста, введите пользователя DB [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Пожалуйста, введите пароль DB: ',
|
||||
'could_not_connect' => 'PHP Censor не может подключится к DB с переданными параметрами. Пожалуйста, попробуйте еще раз.',
|
||||
'setting_up_db' => 'Установка базы данных... ',
|
||||
'user_created' => 'Аккаунт пользователя создан!',
|
||||
'failed_to_create' => 'PHP Censor не удалось создать аккаунт администратора.',
|
||||
'config_exists' => 'Файл конфигурации PHP Censor уже существует, и он не пустой.',
|
||||
'update_instead' => 'Если вы собираетесь обновить PHP Censor, пожалуйста, используйте команду php-censor:update.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Обновите базу данных с учетом обновленных моделей.',
|
||||
'updating_app' => 'Обновление базы данных PHP Censor: ',
|
||||
|
|
|
@ -286,42 +286,6 @@ PHP Censor',
|
|||
'search_packagist_for_more' => 'Знайти більше пакетів на Packagist',
|
||||
'search' => 'Знайти »',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'URL встановлення PHP Censor',
|
||||
'db_host' => 'Хост бази даних',
|
||||
'db_name' => 'Назва бази даних',
|
||||
'db_user' => 'Ім’я користувача бази даних',
|
||||
'db_pass' => 'Пароль бази даних',
|
||||
'admin_name' => 'Ім’я адміністратора',
|
||||
'admin_pass' => 'Пароль адміністратора',
|
||||
'admin_email' => 'Email адреса адміністратора',
|
||||
'config_path' => 'Шлях до файла конфігурації',
|
||||
'install_app' => 'Встановити PHP Censor',
|
||||
'welcome_to_app' => 'Ласкаво просимо до PHP Censor',
|
||||
'please_answer' => 'Будь ласка, дайте відповідь на наступні питання:',
|
||||
'app_php_req' => 'PHP Censor вимагає для роботи, принаймні, версію PHP 5.4.0.',
|
||||
'extension_required' => 'Необхідне розширення: %s',
|
||||
'function_required' => 'PHP Censor необхідна можливість викликати функцію %s(). Вона відключена у php.ini?',
|
||||
'requirements_not_met' => 'Неможливо встановити PHP Censor, оскільки не всі вимоги виконані.
|
||||
Будь ласка, продивіться наявні помилки перед тим, як продовжити.',
|
||||
'must_be_valid_email' => 'Повинно бути коректною email адресою.',
|
||||
'must_be_valid_url' => 'Повинно бути коректним URL.',
|
||||
'enter_name' => 'Ім’я адміністратора: ',
|
||||
'enter_email' => 'Email адміністратора: ',
|
||||
'enter_password' => 'Пароль адміністратора: ',
|
||||
'enter_app_url' => 'URL адреса вашого PHP Censor (наприклад, "http://php-censor.local"): ',
|
||||
|
||||
'enter_db_host' => 'Будь ласка, введіть хост DB [localhost]: ',
|
||||
'enter_db_name' => 'Будь ласка, введить ім’я бази даних DB [php-censor-db]: ',
|
||||
'enter_db_user' => 'Будь ласка, введить ім’я користувача DB [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Будь ласка, введить ваш пароль DB: ',
|
||||
'could_not_connect' => 'PHP Censor не може підключитися до DB із наданими параметрами. Будь ласка, спробуйте ще раз.',
|
||||
'setting_up_db' => 'Налаштування вашої бази даних...',
|
||||
'user_created' => 'Аккаунт користувача створено!',
|
||||
'failed_to_create' => 'PHP Censor не вдалося створити ваш аккаунт адміністратора.',
|
||||
'config_exists' => 'Файл конфігурації PHP Censor вже існує та не є порожнім.',
|
||||
'update_instead' => 'Якщо ви збираєтесь оновити PHP Censor, будь ласка, використовуйте команду php-censor:update.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Оновити базу даних для відображення змінених моделей.',
|
||||
'updating_app' => 'Оновлення бази даних PHP Censor:',
|
||||
|
|
|
@ -301,42 +301,6 @@ PHP Censor',
|
|||
'stage_broken' => 'Broken',
|
||||
'stage_fixed' => 'Fixed',
|
||||
|
||||
// Installer
|
||||
'installation_url' => 'PHP Censor Installation URL',
|
||||
'db_host' => 'Database Host',
|
||||
'db_name' => 'Database Name',
|
||||
'db_user' => 'Database Username',
|
||||
'db_pass' => 'Database Password',
|
||||
'admin_name' => 'Admin Name',
|
||||
'admin_pass' => 'Admin Password',
|
||||
'admin_email' => 'Admin Email Address',
|
||||
'config_path' => 'Config File Path',
|
||||
'install_app' => 'Install PHP Censor',
|
||||
'welcome_to_app' => 'Welcome to PHP Censor',
|
||||
'please_answer' => 'Please answer the following questions:',
|
||||
'app_php_req' => 'PHP Censor requires at least PHP 5.3.8 to function.',
|
||||
'extension_required' => 'Extension required: %s',
|
||||
'function_required' => 'PHP Censor needs to be able to call the %s() function. Is it disabled in php.ini?',
|
||||
'requirements_not_met' => 'PHP Censor cannot be installed, as not all requirements are met.
|
||||
Please review the errors above before continuing.',
|
||||
'must_be_valid_email' => 'Must be a valid email address.',
|
||||
'must_be_valid_url' => 'Must be a valid URL.',
|
||||
'enter_name' => 'Admin Name: ',
|
||||
'enter_email' => 'Admin Email: ',
|
||||
'enter_password' => 'Admin Password: ',
|
||||
'enter_app_url' => 'Your PHP Censor URL ("http://php-censor.local" for example): ',
|
||||
|
||||
'enter_db_host' => 'Please enter your DB host [localhost]: ',
|
||||
'enter_db_name' => 'Please enter your DB database name [php-censor-db]: ',
|
||||
'enter_db_user' => 'Please enter your DB username [php-censor-user]: ',
|
||||
'enter_db_pass' => 'Please enter your DB password: ',
|
||||
'could_not_connect' => 'PHP Censor could not connect to DB with the details provided. Please try again.',
|
||||
'setting_up_db' => 'Setting up your database... ',
|
||||
'user_created' => 'User account created!',
|
||||
'failed_to_create' => 'PHP Censor failed to create your admin account.',
|
||||
'config_exists' => 'The PHP Censor config file exists and is not empty.',
|
||||
'update_instead' => 'If you were trying to update PHP Censor, please use php-censor:update instead.',
|
||||
|
||||
// Update
|
||||
'update_app' => 'Update the database to reflect modified models.',
|
||||
'updating_app' => 'Updating PHP Censor database: ',
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* PHPCI - Continuous Integration for PHP
|
||||
*
|
||||
* @copyright Copyright 2015, Block 8 Limited.
|
||||
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
||||
* @link https://www.phptesting.org/
|
||||
*/
|
||||
|
||||
namespace Tests\PHPCensor\Plugin\Command;
|
||||
|
||||
use Symfony\Component\Console\Application;
|
||||
|
@ -17,6 +9,7 @@ use Symfony\Component\Console\Helper\HelperSet;
|
|||
class InstallCommandTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public $config;
|
||||
|
||||
public $admin;
|
||||
|
||||
/**
|
||||
|
@ -101,11 +94,11 @@ class InstallCommandTest extends \PHPUnit_Framework_TestCase
|
|||
'--db-port' => '3306',
|
||||
'--db-name' => 'php-censor-db',
|
||||
'--db-user' => 'php-censor-user',
|
||||
'--db-pass' => 'php-censor-password',
|
||||
'--db-password' => 'php-censor-password',
|
||||
'--db-type' => 'mysql',
|
||||
'--admin-mail' => 'admin@php-censor.local',
|
||||
'--admin-email' => 'admin@php-censor.local',
|
||||
'--admin-name' => 'admin',
|
||||
'--admin-pass' => 'admin-password',
|
||||
'--admin-password' => 'admin-password',
|
||||
'--url' => 'http://php-censor.local',
|
||||
'--queue-use' => null,
|
||||
];
|
||||
|
@ -125,7 +118,7 @@ class InstallCommandTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
// Get tester and execute with extracted parameters.
|
||||
$commandTester = $this->getCommandTester($dialog);
|
||||
$parameters = $this->getConfig($param);
|
||||
$parameters = $this->getConfig($param);
|
||||
$commandTester->execute($parameters);
|
||||
}
|
||||
|
||||
|
@ -183,7 +176,7 @@ class InstallCommandTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$dialog->expects($this->once())->method('ask')->willReturn('testedvalue');
|
||||
|
||||
$this->executeWithoutParam('--db-pass', $dialog);
|
||||
$this->executeWithoutParam('--db-password', $dialog);
|
||||
|
||||
// Check that specified arguments are correctly loaded.
|
||||
$this->assertEquals('testedvalue', $this->config['b8']['database']['password']);
|
||||
|
@ -209,10 +202,10 @@ class InstallCommandTest extends \PHPUnit_Framework_TestCase
|
|||
// We specified an input value for hostname.
|
||||
$dialog->expects($this->once())->method('ask')->willReturn('admin@php-censor.local');
|
||||
|
||||
$this->executeWithoutParam('--admin-mail', $dialog);
|
||||
$this->executeWithoutParam('--admin-email', $dialog);
|
||||
|
||||
// Check that specified arguments are correctly loaded.
|
||||
$this->assertEquals('admin@php-censor.local', $this->admin['mail']);
|
||||
$this->assertEquals('admin@php-censor.local', $this->admin['email']);
|
||||
}
|
||||
|
||||
public function testAdminNameConfig()
|
||||
|
@ -235,9 +228,9 @@ class InstallCommandTest extends \PHPUnit_Framework_TestCase
|
|||
// We specified an input value for hostname.
|
||||
$dialog->expects($this->once())->method('ask')->willReturn('testedvalue');
|
||||
|
||||
$this->executeWithoutParam('--admin-pass', $dialog);
|
||||
$this->executeWithoutParam('--admin-password', $dialog);
|
||||
|
||||
// Check that specified arguments are correctly loaded.
|
||||
$this->assertEquals('testedvalue', $this->admin['pass']);
|
||||
$this->assertEquals('testedvalue', $this->admin['password']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue