Fixed configs
This commit is contained in:
parent
1596e274a9
commit
0a70c89e75
16
.gitignore
vendored
16
.gitignore
vendored
|
@ -1,20 +1,8 @@
|
||||||
/.idea
|
/vendor
|
||||||
/vendor/
|
|
||||||
/composer.phar
|
/composer.phar
|
||||||
/.DS_Store
|
|
||||||
/.settings
|
|
||||||
/.project
|
|
||||||
/.buildpath
|
|
||||||
/app/config.yml
|
|
||||||
/runtime/builds
|
/runtime/builds
|
||||||
/runtime/daemon
|
/runtime/daemon
|
||||||
/public/.htaccess
|
|
||||||
/cache
|
|
||||||
/app/loggerconfig.php
|
/app/loggerconfig.php
|
||||||
/app/pluginconfig.php
|
/app/pluginconfig.php
|
||||||
/src/PHPCI/Model/Migration.php
|
/app/config.yml
|
||||||
/src/PHPCI/Model/Base/MigrationBase.php
|
|
||||||
/src/PHPCI/Store/MigrationStore.php
|
|
||||||
/src/PHPCI/Store/Base/MigrationStoreBase.php
|
|
||||||
/local_vars.php
|
|
||||||
/tests/PHPCI/config.yml
|
/tests/PHPCI/config.yml
|
||||||
|
|
60
.phpci.yml
60
.phpci.yml
|
@ -1,38 +1,42 @@
|
||||||
build_settings:
|
build_settings:
|
||||||
verbose: false
|
|
||||||
ignore:
|
ignore:
|
||||||
- "vendor"
|
- vendor
|
||||||
- "Tests"
|
- tests
|
||||||
- "PHPCI/Command" # PHPMD complains about un-used parameters, but they are required.
|
|
||||||
- "public/install.php" # PHPCS really doesn't like PHP mixed with HTML (and so it shouldn't)
|
|
||||||
- "PHPCI/Migrations" # Ignore the migrations directory, as both PHPMD and PHPCS can't cope with them.
|
|
||||||
- "PHPCI/Model/Base" # These files are auto-generated, and sometimes hit PHPMD complexity thresholds.
|
|
||||||
- "PHPCI/Languages" # PHPCS fails on character counts for non-Latin languages
|
|
||||||
- "public/assets" # If there are any PHP files in here, we didn't write them.
|
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
composer:
|
composer:
|
||||||
action: "install"
|
action: install
|
||||||
|
|
||||||
test:
|
test:
|
||||||
php_parallel_lint:
|
|
||||||
ignore:
|
|
||||||
# Only ignore vendor
|
|
||||||
- vendor/
|
|
||||||
php_mess_detector:
|
|
||||||
allowed_warnings: 0
|
|
||||||
rules:
|
|
||||||
- phpmd.xml
|
|
||||||
php_code_sniffer:
|
|
||||||
standard: phpcs.xml
|
|
||||||
allowed_warnings: 0
|
|
||||||
allowed_errors: 0
|
|
||||||
php_loc:
|
|
||||||
php_unit:
|
php_unit:
|
||||||
php_docblock_checker:
|
config:
|
||||||
allowed_warnings: 0
|
- phpunit.xml
|
||||||
|
coverage: coverage
|
||||||
|
|
||||||
broken:
|
php_mess_detector:
|
||||||
|
allow_failures: true
|
||||||
|
|
||||||
|
php_code_sniffer:
|
||||||
|
standard: PSR2
|
||||||
|
encoding: UTF-8
|
||||||
|
allow_failures: true
|
||||||
|
|
||||||
|
php_cpd:
|
||||||
|
allow_failures: true
|
||||||
|
|
||||||
|
php_loc:
|
||||||
|
allow_failures: true
|
||||||
|
|
||||||
|
php_parallel_lint:
|
||||||
|
allow_failures: true
|
||||||
|
|
||||||
|
php_docblock_checker:
|
||||||
|
allow_failures: true
|
||||||
|
|
||||||
|
failure:
|
||||||
email:
|
email:
|
||||||
#committer: true
|
committer: true
|
||||||
#cc: ["php-ci@googlegroups.com"]
|
|
||||||
|
complete:
|
||||||
|
email:
|
||||||
|
default_mailto_address: poisoncorpsee@gmail.com
|
||||||
|
|
|
@ -1,43 +1,73 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* PHPCI - Continuous Integration for PHP
|
* PHPCI - Continuous Integration for PHP
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2013, Block 8 Limited.
|
* @copyright Copyright 2013, Block 8 Limited.
|
||||||
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
||||||
* @link http://www.phptesting.org/
|
* @link http://www.phptesting.org/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Let PHP take a guess as to the default timezone, if the user hasn't set one:
|
use PHPCI\Logging\LoggerConfig;
|
||||||
date_default_timezone_set(@date_default_timezone_get());
|
|
||||||
|
|
||||||
// Load Composer autoloader:
|
if (!defined('ROOT_DIR')) {
|
||||||
require_once(dirname(__DIR__) . '/vendor/autoload.php');
|
define('ROOT_DIR', dirname(__DIR__) . DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
// If the PHPCI config file is not where we expect it, try looking in
|
if (!defined('PHPCI_DIR')) {
|
||||||
// env for an alternative config path.
|
define('PHPCI_DIR', ROOT_DIR . 'src' . DIRECTORY_SEPARATOR . 'PHPCI' . DIRECTORY_SEPARATOR);
|
||||||
$configFile = dirname(__DIR__) . '/app/PHPCI/config.yml';
|
}
|
||||||
|
|
||||||
if (!file_exists($configFile)) {
|
if (!defined('PHPCI_PUBLIC_DIR')) {
|
||||||
$configEnv = getenv('phpci_config_file');
|
define('PHPCI_PUBLIC_DIR', ROOT_DIR . 'public' . DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($configEnv)) {
|
if (!defined('PHPCI_APP_DIR')) {
|
||||||
$configFile = $configEnv;
|
define('PHPCI_APP_DIR', ROOT_DIR . 'app' . DIRECTORY_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!defined('PHPCI_BIN_DIR')) {
|
||||||
|
define('PHPCI_BIN_DIR', ROOT_DIR . 'bin' . DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined('PHPCI_RUNTIME_DIR')) {
|
||||||
|
define('PHPCI_RUNTIME_DIR', ROOT_DIR . 'runtime' . DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined('PHPCI_BUILDS_DIR')) {
|
||||||
|
define('PHPCI_BUILDS_DIR', ROOT_DIR . 'runtime' . DIRECTORY_SEPARATOR . 'builds' . DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined('IS_WIN')) {
|
||||||
|
define('IS_WIN', ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false));
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once(ROOT_DIR . 'vendor/autoload.php');
|
||||||
|
|
||||||
|
\PHPCI\ErrorHandler::register();
|
||||||
|
|
||||||
|
if (defined('PHPCI_IS_CONSOLE') && PHPCI_IS_CONSOLE) {
|
||||||
|
$loggerConfig = LoggerConfig::newFromFile(PHPCI_APP_DIR . "loggerconfig.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load configuration if present:
|
// Load configuration if present:
|
||||||
$conf = [];
|
$conf = [];
|
||||||
$conf['b8']['app']['namespace'] = 'PHPCI';
|
$conf['b8']['app']['namespace'] = 'PHPCI';
|
||||||
$conf['b8']['app']['default_controller'] = 'Home';
|
$conf['b8']['app']['default_controller'] = 'Home';
|
||||||
$conf['b8']['view']['path'] = dirname(__DIR__) . '/src/PHPCI/View/';
|
$conf['b8']['view']['path'] = PHPCI_DIR . 'View' . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
$config = new b8\Config($conf);
|
$config = new b8\Config($conf);
|
||||||
|
|
||||||
|
$configFile = PHPCI_APP_DIR . 'config.yml';
|
||||||
if (file_exists($configFile)) {
|
if (file_exists($configFile)) {
|
||||||
$config->loadYaml($configFile);
|
$config->loadYaml($configFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once(dirname(__DIR__) . '/vars.php');
|
if (!defined('PHPCI_URL') && !empty($config)) {
|
||||||
|
define('PHPCI_URL', $config->get('phpci.url', '') . '/');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined('PHPCI_IS_CONSOLE')) {
|
||||||
|
define('PHPCI_IS_CONSOLE', false);
|
||||||
|
}
|
||||||
|
|
||||||
\PHPCI\Helper\Lang::init($config);
|
\PHPCI\Helper\Lang::init($config);
|
||||||
\PHPCI\Helper\Lang::setLanguage("en");
|
|
||||||
|
|
Loading…
Reference in a new issue