Compare commits

..

33 Commits

Author SHA1 Message Date
Yuri Kuznetsov bc19a6bb5f flotr2 fix 2020-11-30 12:48:53 +02:00
Eymen Elkum 8cc6a2ddf0 fix bc (#1853) 2020-11-29 11:25:07 +02:00
Yuri Kuznetsov c1f0c47cf7 bc fix 2020-11-28 19:33:12 +02:00
Yuri Kuznetsov 7e71eb0aeb fix warning 2020-11-27 18:42:52 +02:00
Taras Machyshyn 196f787a1f Fix installer for PHP 8 2020-11-27 17:32:00 +02:00
Taras Machyshyn b7bec1793c Fix installer for PHP 8 2020-11-27 12:26:57 +02:00
Taras Machyshyn b97aa8e3a7 Fix gitignore 2020-11-27 12:26:30 +02:00
Taras Machyshyn 21dcf59f21 Fix gitignore 2020-11-27 12:25:06 +02:00
Taras Machyshyn 326b6c8c53 Merge branch 'hotfix/6.0.7' of https://github.com/espocrm/espocrm into hotfix/6.0.7 2020-11-27 12:16:34 +02:00
Taras Machyshyn 7ebf0e7bf8 Fix installer for PHP 8 2020-11-27 12:16:01 +02:00
Yuri Kuznetsov 014df8b9d3 Merge branch 'hotfix/6.0.7' of github.com:espocrm/espocrm into hotfix/6.0.7 2020-11-27 12:12:28 +02:00
Yuri Kuznetsov 6d85055147 fix loaders 2020-11-27 12:12:16 +02:00
Taras Machyshyn 077f7d8855 Fix installer for PHP 8 2020-11-27 12:03:04 +02:00
Taras Machyshyn 296484360f Fix installer for PHP 8 2020-11-27 11:03:40 +02:00
Yuri Kuznetsov 1071f8a045 v 2020-11-26 12:09:45 +02:00
Yuri Kuznetsov 962d3a049c disable edit access to user email address 2020-11-26 09:44:22 +02:00
Yuri Kuznetsov 161859606a ceanup 2020-11-21 14:20:14 +02:00
Yuri Kuznetsov a71df0cff6 fix layout 2020-11-20 09:52:54 +02:00
Yuri Kuznetsov fb9ff0b8c0 fix deprecated 2020-11-18 13:16:24 +02:00
Yuri Kuznetsov d1a62baa12 fix deprecated 2020-11-18 12:53:17 +02:00
Yuri Kuznetsov cdec7ccfe8 v 2020-11-18 11:34:14 +02:00
Yuri Kuznetsov 25bc3a40f7 fix export currency 2020-11-18 09:41:54 +02:00
Yuri Kuznetsov 02e5c1fc44 v 2020-11-16 13:40:49 +02:00
Yuri Kuznetsov 844e9dd8e3 Merge branch 'hotfix/6.0.5' of github.com:espocrm/espocrm into hotfix/6.0.5 2020-11-16 13:38:16 +02:00
Yuri Kuznetsov 39f2ec83d5 fix duplicate attachments multiple 2020-11-16 13:35:53 +02:00
Taras Machyshyn e4d2af03a5 Fixed PHP binary path 2020-11-16 13:34:24 +02:00
Taras Machyshyn 37616d69bf Merge branch 'hotfix/6.0.5' of https://github.com/espocrm/espocrm into hotfix/6.0.5 2020-11-16 13:28:03 +02:00
Taras Machyshyn 4e36f71dd8 Fixed PHP binary path 2020-11-16 13:27:16 +02:00
Yuri Kuznetsov b5877ac32a fix person name 2020-11-16 13:03:56 +02:00
Yuri Kuznetsov 92de588a6e update npm packages 2020-11-16 11:07:12 +02:00
Yuri Kuznetsov 700f4b5b10 fix export 2020-11-14 10:24:22 +02:00
Yuri Kuznetsov 9c0a7b6778 app service changes 2020-11-13 12:39:27 +02:00
Yuri Kuznetsov 9a54c66f68 preferences fixes 2020-11-13 12:32:13 +02:00
30 changed files with 1962 additions and 1097 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
/data/tmp/*
/build
/node_modules
npm-debug.log
/npm-debug.log
/test.php
/main.html
@@ -15,7 +15,7 @@ npm-debug.log
!/tests/unit/testData/cache/.data
/tests/integration/config.php
.phpunit.result.cache
composer.phar
vendor/
/composer.phar
/vendor/
/custom/Espo/Custom/*
/install/config.php
+2
View File
@@ -178,6 +178,8 @@ class Auth
}
if ($hasAuthData) {
$authResult = null;
try {
$authResult = $this->authentication->login($username, $password, $request, $authenticationMethod);
}
+17 -4
View File
@@ -155,9 +155,11 @@ class InjectableFactory
$dependencyClass = null;
if ($param->getType()) {
$type = $param->getType();
if ($type && !$type->isBuiltin()) {
try {
$dependencyClass = $param->getClass();
$dependencyClass = new ReflectionClass($type->getName());
}
catch (Throwable $e) {
$badClassName = $param->getType()->getName();
@@ -241,15 +243,26 @@ class InjectableFactory
}
$params = $class->getMethod($methodName)->getParameters();
if (!$params || !count($params)) {
return false;
}
if ($skipInstanceCheck) {
return true;
}
$injection = $this->container->get($name);
$paramClass = $params[0]->getClass();
$paramClass = null;
if ($skipInstanceCheck || $paramClass && $paramClass->isInstance($injection)) {
$type = $params[0]->getType();
if ($type && !$type->isBuiltin()) {
$paramClass = new ReflectionClass($type->getName());
}
if ($paramClass && $paramClass->isInstance($injection)) {
return true;
}
@@ -59,7 +59,7 @@ class BaseLanguage implements Loader
$this->fileManager,
$this->metadata,
$this->dataCache,
$this->config->get('useCache')
$this->config->get('useCache') ?? false
);
}
}
@@ -42,7 +42,7 @@ class DefaultLanguage extends BaseLanguage
$this->fileManager,
$this->metadata,
$this->dataCache,
$this->config->get('useCache')
$this->config->get('useCache') ?? false
);
}
}
+1 -1
View File
@@ -64,7 +64,7 @@ class Language implements Loader
$this->fileManager,
$this->metadata,
$this->dataCache,
$this->config->get('useCache')
$this->config->get('useCache') ?? false
);
}
}
+1 -1
View File
@@ -52,7 +52,7 @@ class Metadata implements Loader
public function load() : MetadataService
{
$useCache = $this->config->get('useCache');
$useCache = $this->config->get('useCache') ?? false;
return new MetadataService($this->fileManager, $this->dataCache, $useCache);
}
@@ -123,4 +123,22 @@ class DefaultNotificator implements Notificator
return $this->userIdEnabledMap[$userId];
}
/**
* For backward compatibility.
* @todo Remove.
*/
protected function getEntityManager()
{
return $this->entityManager;
}
/**
* For backward compatibility.
* @todo Remove.
*/
protected function getUser()
{
return $this->user;
}
}
@@ -96,7 +96,7 @@ class PersonName extends Base
$whereItems[] = "CONCAT:({$firstName}, ' ', {$middleName}, ' ', {$lastName})";
} else
if ($format === 'lastFirstMiddle') {
$whereItems[] = "CONCAT:({$lastName}, ' ', {$firstColumn}, ' ', {$middleName})";
$whereItems[] = "CONCAT:({$lastName}, ' ', {$firstName}, ' ', {$middleName})";
}
$selectExpression = $this->getSelect($fullList);
+3 -4
View File
@@ -53,10 +53,10 @@ class ScheduledJob
protected $checkingCronPeriod = '25 hours';
protected $cronSetup = [
'linux' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BIN-DIR} -f {CRON-FILE} > /dev/null 2>&1',
'linux' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BINARY} -f {CRON-FILE} > /dev/null 2>&1',
'windows' => '{PHP-BINARY} -f {FULL-CRON-PATH}',
'mac' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BIN-DIR} -f {CRON-FILE} > /dev/null 2>&1',
'default' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BIN-DIR} -f {CRON-FILE} > /dev/null 2>&1',
'mac' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BINARY} -f {CRON-FILE} > /dev/null 2>&1',
'default' => '* * * * * cd {DOCUMENT_ROOT}; {PHP-BINARY} -f {CRON-FILE} > /dev/null 2>&1',
];
protected $classFinder;
@@ -105,7 +105,6 @@ class ScheduledJob
$desc = $language->translate('cronSetup', 'options', 'ScheduledJob');
$data = array(
'PHP-BIN-DIR' => $this->getSystemUtil()->getPhpBin(),
'PHP-BINARY' => $this->getSystemUtil()->getPhpBinary(),
'CRON-FILE' => $this->cronFile,
'DOCUMENT_ROOT' => $this->getSystemUtil()->getRootDir(),
+5 -14
View File
@@ -29,6 +29,8 @@
namespace Espo\Core\Utils;
use Symfony\Component\Process\PhpExecutableFinder;
class System
{
/**
@@ -100,22 +102,11 @@ class System
}
/**
* Get path to PHP
*
* @return string
* Deprecated. Use getPhpBinary()
*/
public function getPhpBin()
{
if (isset($_SERVER['PHP_PATH']) && !empty($_SERVER['PHP_PATH'])) {
return $_SERVER['PHP_PATH'];
}
$phpBin = @exec('which php');
if (!empty($phpBin)) {
return $phpBin;
}
return defined("PHP_BINDIR") ? PHP_BINDIR . DIRECTORY_SEPARATOR . 'php' : 'php';
return $this->getPhpBinary();
}
/**
@@ -125,7 +116,7 @@ class System
*/
public function getPhpBinary()
{
return defined("PHP_BINARY") ? PHP_BINARY : 'php';
return (new PhpExecutableFinder)->find();
}
/**
+1 -7
View File
@@ -37,13 +37,7 @@ interface Builder
{
/**
* Build a query instance.
* @todo Uncomment when 7.4 is a min supported PHP version. Need the support of contravariant method parameters.
* @todo Uncomment when 7.4 is a min supported PHP version.
*/
//public function build() : Query;
/**
* Clone an existing query for a further modification and building.
* @todo Uncomment when 7.4 is a min supported PHP version. Need the support of contravariant method parameters.
*/
//public function clone(Query $query) : self;
}
@@ -29,6 +29,9 @@
"isActive": {
"nonAdminReadOnly": true
},
"emailAddress": {
"nonAdminReadOnly": true
},
"teams": {
"nonAdminReadOnly": true
},
@@ -2,7 +2,7 @@
"fields": {
"timeZone": {
"type": "enum",
"detault": "",
"default": "",
"view": "views/preferences/fields/time-zone"
},
"dateFormat": {
@@ -124,7 +124,8 @@
"assignmentNotificationsIgnoreEntityTypeList": {
"type": "checklist",
"translation": "Global.scopeNamesPlural",
"view": "views/preferences/fields/assignment-notifications-ignore-entity-type-list"
"view": "views/preferences/fields/assignment-notifications-ignore-entity-type-list",
"default": []
},
"assignmentEmailNotificationsIgnoreEntityTypeList": {
"type": "checklist",
@@ -140,14 +141,17 @@
},
"signature": {
"type": "wysiwyg",
"view": "views/preferences/fields/signature"
"view": "views/preferences/fields/signature",
"default": ""
},
"defaultReminders": {
"type": "jsonArray",
"view": "crm:views/meeting/fields/reminders"
"view": "crm:views/meeting/fields/reminders",
"default": []
},
"theme": {
"type": "enum",
"default": "",
"view": "views/preferences/fields/theme",
"translation": "Global.themes"
},
@@ -173,7 +177,8 @@
},
"doNotFillAssignedUserIfNotRequired": {
"type": "bool",
"tooltip": true
"tooltip": true,
"default": false
},
"followEntityOnStreamPost": {
"type": "bool",
@@ -187,16 +192,20 @@
"type": "multiEnum",
"view": "views/preferences/fields/auto-follow-entity-type-list",
"translation": "Global.scopeNamesPlural",
"default": [],
"tooltip": true
},
"emailUseExternalClient": {
"type": "bool"
"type": "bool",
"default": false
},
"scopeColorsDisabled": {
"type": "bool"
"type": "bool",
"default": false
},
"tabColorsDisabled": {
"type": "bool"
"type": "bool",
"default": false
}
},
"noDeletedAttribute": true
+60 -13
View File
@@ -46,6 +46,7 @@ use Espo\Core\{
Utils\Config,
Utils\Util,
Utils\Language,
Utils\FieldUtil,
};
use Espo\Entities\User;
@@ -57,8 +58,24 @@ use Espo\ORM\{
Entity,
};
use StdClass;
use Throwable;
class App
{
protected $config;
protected $entityManager;
protected $metadata;
protected $acl;
protected $aclManager;
protected $dataManager;
protected $selectManagerFactory;
protected $injectableFactory;
protected $serviceFactory;
protected $user;
protected $preferences;
protected $fieldUtil;
public function __construct(
Config $config,
EntityManager $entityManager,
@@ -70,7 +87,8 @@ class App
InjectableFactory $injectableFactory,
ServiceFactory $serviceFactory,
User $user,
Preferences $preferences
Preferences $preferences,
FieldUtil $fieldUtil
) {
$this->config = $config;
$this->entityManager = $entityManager;
@@ -83,12 +101,14 @@ class App
$this->serviceFactory = $serviceFactory;
$this->user = $user;
$this->preferences = $preferences;
$this->fieldUtil = $fieldUtil;
}
public function getUserData()
{
$preferencesData = $this->preferences->getValueMap();
unset($preferencesData->smtpPassword);
$this->filterPreferencesData($preferencesData);
$settingsService = $this->serviceFactory->create('Settings');
@@ -134,11 +154,16 @@ class App
foreach (($this->metadata->get(['app', 'appParams']) ?? []) as $paramKey => $item) {
$className = $item['className'] ?? null;
if (!$className) continue;
if (!$className) {
continue;
}
try {
$itemParams = $this->injectableFactory->create($className)->get();
} catch (\Throwable $e) {
} catch (Throwable $e) {
$GLOBALS['log']->error("appParam {$paramKey}: " . $e->getMessage());
continue;
}
$appParams[$paramKey] = $itemParams;
@@ -452,19 +477,41 @@ class App
$entityTypeList = ['Contact', 'Lead'];
foreach ($entityTypeList as $entityType) {
$entityList = $this->entityManager->getRepository($entityType)->where([
'doNotCall' => true,
'phoneNumber!=' => null,
])->select(['id', 'phoneNumber'])->find();
$entityList = $this->entityManager
->getRepository($entityType)
->where([
'doNotCall' => true,
'phoneNumber!=' => null,
])
->select(['id', 'phoneNumber'])
->find();
foreach ($entityList as $entity) {
$phoneNumber = $entity->get('phoneNumber');
if (!$phoneNumber) continue;
$phoneNumberEntity = $this->entityManager->getRepository('PhoneNumber')->getByNumber($phoneNumber);
if (!$phoneNumberEntity) continue;
$phoneNumberEntity->set('optOut', true);
$this->entityManager->saveEntity($phoneNumberEntity);
if (!$phoneNumber) {
continue;
}
$phoneNumberEntity = $this->entityManager->getRepository('PhoneNumber')->getByNumber($phoneNumber);
if (!$phoneNumberEntity) {
continue;
}
$phoneNumberEntity->set('optOut', true);
$this->entityManager->saveEntity($phoneNumberEntity);
}
}
}
protected function filterPreferencesData(StdClass $data)
{
$passwordFieldList = $this->fieldUtil->getFieldByTypeList('Preferences', 'password');
foreach ($passwordFieldList as $field) {
unset($data->$field);
}
}
}
+4
View File
@@ -2550,6 +2550,10 @@ class Record implements Crud,
->getRepository('Attachment')
->getCopiedAttachment($attachment);
$attachment->set('field', $field);
$this->getEntityManager()->saveEntity($attachment);
if ($attachment) {
$idList[] = $attachment->id;
$nameHash->{$attachment->id} = $attachment->get('name');
@@ -351,7 +351,7 @@ class Xlsx
if (array_key_exists($name.'Currency', $row) && array_key_exists($name, $row)) {
$sheet->setCellValue("$col$rowNumber", $row[$name] ? $row[$name] : '');
$currency = $row[$name . 'Currency'];
$currency = $row[$name . 'Currency'] ?? $this->getConfig()->get('defaultCurrency');
$sheet->getStyle("$col$rowNumber")
->getNumberFormat()
+239 -228
View File
File diff suppressed because it is too large Load Diff
+7 -1
View File
@@ -219,7 +219,13 @@ define('views/admin/layouts/index', 'view', function (Dep) {
},
navigate: function (scope, type) {
this.getRouter().navigate('#Admin/layouts/scope=' + scope + '&type=' + type, {trigger: false});
var url = '#Admin/layouts/scope=' + scope + '&type=' + type;
if (this.em) {
url += '&em=true';
}
this.getRouter().navigate(url, {trigger: false});
},
renderDefaultPage: function () {
+2
View File
@@ -44,6 +44,8 @@ define('views/fields/enum', ['views/fields/base', 'lib!Selectize'], function (De
translatedOptions: null,
fetchEmptyValueAsNull: false,
searchTypeList: ['anyOf', 'noneOf', 'isEmpty', 'isNotEmpty'],
data: function () {
+8
View File
@@ -44,6 +44,8 @@ define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], function
seeMoreDisabled: true,
fetchEmptyValueAsNull: false,
setup: function () {
Dep.prototype.setup.call(this);
@@ -532,6 +534,12 @@ define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], function
data[this.name] = code;
} else {
data[this.name] = this.$element.val();
if (this.fetchEmptyValueAsNull) {
if (!data[this.name]) {
data[this.name] = null;
}
}
}
if (this.model.has('isHtml') && this.hasBodyPlainField) {
@@ -30,6 +30,8 @@ define('views/preferences/fields/signature', 'views/fields/wysiwyg', function (D
return Dep.extend({
fetchEmptyValueAsNull: true,
toolbar: [
["style", ["bold", "italic", "underline", "clear"]],
["color", ["color"]],
+1 -1
View File
@@ -998,7 +998,7 @@ define('views/record/list', 'view', function (Dep) {
}, this);
if (
this.getConfig().get('exportDisabled') && !this.getUser().get('isAdmin')
this.getConfig().get('exportDisabled') && !this.getUser().isAdmin()
||
this.getAcl().get('exportPermission') === 'no'
||
+25 -2
View File
@@ -126,7 +126,9 @@ define('views/user/record/detail', 'views/record/detail', function (Dep) {
},
setupNonAdminFieldsAccess: function () {
if (this.getUser().isAdmin()) return;
if (this.getUser().isAdmin()) {
return;
}
var nonAdminReadOnlyFieldList = [
'userName',
@@ -138,9 +140,30 @@ define('views/user/record/detail', 'views/record/detail', function (Dep) {
'portalRoles',
'contact',
'accounts',
'type'
'type',
'emailAddress',
];
nonAdminReadOnlyFieldList = nonAdminReadOnlyFieldList.filter(
function (item) {
if (!this.model.hasField(item)) {
return true;
}
var aclDefs = this.getMetadata().get(['entityAcl', 'User', 'fields', item]);
if (!aclDefs) {
return true;
}
if (aclDefs.nonAdminReadOnly) {
return true;
}
return false;
}.bind(this),
);
nonAdminReadOnlyFieldList.forEach(function (field) {
this.setFieldReadOnly(field, true);
}, this);
+16 -4
View File
@@ -82,12 +82,24 @@ class SystemHelper extends \Espo\Core\Utils\System
public function getBaseUrl()
{
$pageUrl = ($_SERVER["HTTPS"] == 'on') ? 'https://' : 'http://';
$pageUrl = 'http://';
if ($_SERVER["SERVER_PORT"] != "80") {
$pageUrl .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
if (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https') {
$pageUrl = 'https://';
}
if (isset($_SERVER['HTTPS']) && $_SERVER["HTTPS"] == 'on') {
$pageUrl = 'https://';
}
if ($_SERVER["SERVER_PORT"] == '443') {
$pageUrl = 'https://';
}
if (in_array($_SERVER["SERVER_PORT"], ['80', '443'])) {
$pageUrl .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
} else {
$pageUrl .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
}
$baseUrl = str_ireplace('/install/index.php', '', $pageUrl);
+9 -9
View File
@@ -13,10 +13,10 @@
{foreach from=$phpRequirementList key=name item=value}
<tr class="list-row">
<td class="cell col-md-5">
{if $langs['systemRequirements'][$name] eq ''}
{$name}
{if isset($langs['systemRequirements'][$name])}
{$langs['systemRequirements'][{$name}]}
{else}
{$langs['systemRequirements'][{$name}]}
{$name}
{/if}
</td>
<td class="cell col-md-3">{$value['actual']}</td>
@@ -41,10 +41,10 @@
{foreach from=$mysqlRequirementList key=name item=value}
<tr class="list-row">
<td class="cell col-md-5">
{if $langs['systemRequirements'][$name] eq ''}
{$name}
{if isset($langs['systemRequirements'][$name])}
{$langs['systemRequirements'][{$name}]}
{else}
{$langs['systemRequirements'][{$name}]}
{$name}
{/if}
</td>
<td class="cell col-md-3">{$value['actual']}</td>
@@ -68,10 +68,10 @@
{foreach from=$permissionRequirementList key=name item=value}
<tr class="list-row">
<td class="cell col-md-5">
{if $langs['systemRequirements'][$name] eq ''}
{$name}
{if isset($langs['systemRequirements'][$name])}
{$langs['systemRequirements'][{$name}]}
{else}
{$langs['systemRequirements'][{$name}]}
{$name}
{/if}
</td>
<td class="cell col-md-3">{$langs['systemRequirements'][{$value['type']}]}</td>
@@ -72,30 +72,31 @@ abstract class Smarty_Internal_CompileBase
}
// named attribute
} else {
$kv = each($mixed);
// option flag?
if (in_array($kv['key'], $this->option_flags)) {
if (is_bool($kv['value'])) {
$_indexed_attr[$kv['key']] = $kv['value'];
} elseif (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) {
if (trim($kv['value']) == 'true') {
$_indexed_attr[$kv['key']] = true;
foreach ($mixed as $k => $v) {
// option flag?
if (in_array($k, $this->option_flags)) {
if (is_bool($v)) {
$_indexed_attr[$k] = $v;
} elseif (is_string($v) && in_array(trim($v, '\'"'), array('true', 'false'))) {
if (trim($v) == 'true') {
$_indexed_attr[$k] = true;
} else {
$_indexed_attr[$k] = false;
}
} elseif (is_numeric($v) && in_array($v, array(0, 1))) {
if ($v == 1) {
$_indexed_attr[$k] = true;
} else {
$_indexed_attr[$k] = false;
}
} else {
$_indexed_attr[$kv['key']] = false;
}
} elseif (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
if ($kv['value'] == 1) {
$_indexed_attr[$kv['key']] = true;
} else {
$_indexed_attr[$kv['key']] = false;
$compiler->trigger_template_error("illegal value of option flag \"{$k}\"", $compiler->lex->taglineno);
}
// must be named attribute
} else {
$compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $compiler->lex->taglineno);
reset($mixed);
$_indexed_attr[key($mixed)] = $mixed[key($mixed)];
}
// must be named attribute
} else {
reset($mixed);
$_indexed_attr[key($mixed)] = $mixed[key($mixed)];
}
}
}
+1484 -764
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "6.0.4",
"version": "6.0.7",
"description": "",
"main": "index.php",
"repository": {
@@ -12,21 +12,21 @@
"devDependencies": {
"archiver": "^3.1.1",
"fstream": ">=1.0.12",
"grunt": "^1.0.4",
"grunt": "^1.3.0",
"grunt-chmod": "~1.1.0",
"grunt-contrib-clean": "~2.0.0",
"grunt-contrib-concat": "~1.0.1",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-cssmin": "~3.0.0",
"grunt-contrib-less": "~2.0.0",
"grunt-contrib-less": "^2.0.0",
"grunt-contrib-uglify": "~4.0.0",
"grunt-mkdir": "~1.0.0",
"grunt-replace": "~1.0.1",
"js-yaml": "^3.13.1",
"lodash": "^4.17.19",
"lodash": "^4.17.20",
"minimist": ">=1.2.2",
"pofile": "~1.0.11",
"tar": "^4.4.8"
"tar": "^6.0.5"
},
"dependencies": {}
}
+4 -4
View File
@@ -86,12 +86,12 @@ class SystemTest extends \PHPUnit\Framework\TestCase
$this->assertEquals($rootDir, $this->object->getRootDir());
}
public function testGetPhpBin()
public function testGetPhpBinary()
{
$phpBin = @exec('which php');
$phpBinary = (new \Symfony\Component\Process\PhpExecutableFinder)->find();
if (isset($phpBin)) {
$this->assertEquals($phpBin, $this->object->getPhpBin());
if (isset($phpBinary)) {
$this->assertEquals($phpBinary, $this->object->getPhpBinary());
}
}