Skip to content

Commit

Permalink
Merge pull request #7779 in SW/shopware from sw-24135/5.5/add-support…
Browse files Browse the repository at this point in the history
…-for-open_basedir-envs to 5.5

* commit '002f22b9d3487b7a8919328f28e7c5d29d16a336':
  SW-24135 - Add support for environments using `open_basedir` for restricting access to the filesystem
  • Loading branch information
shyim committed Jun 5, 2019
2 parents f4f31ad + 002f22b commit ad5ea26
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 27 deletions.
8 changes: 6 additions & 2 deletions UPGRADE-5.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ This changelog references changes done in Shopware 5.5 patch versions.

## 5.5.10

[View all changes from v5.5.8...v5.5.9](https://github.com/shopware/shopware/compare/v5.5.9...v5.5.10)
[View all changes from v5.5.9...v5.5.10](https://github.com/shopware/shopware/compare/v5.5.9...v5.5.10)

### Additions

* Added support for environments using `open_basedir` for restricting access to the filesystem

### Changes

- Changed `\Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\CategoryGateway::get` to support `int` and `array` parameters
* Changed `\Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\CategoryGateway::get` to support `int` and `array` parameters

### Deprecations

Expand Down
28 changes: 16 additions & 12 deletions engine/Shopware/Components/Check/Requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,18 +277,22 @@ private function checkOpcache()
'error' => '',
]];

if (fileinode('/') > 2) {
$validateRootOption = $this->compare('opcache.validate_root', ini_get('opcache.validate_root'), '1');
$opcacheRequirements[] = [
'name' => 'opcache.validate_root',
'group' => 'core',
'required' => 1,
'version' => ini_get('opcache.validate_root'),
'result' => ini_get('opcache.validate_root'),
'notice' => '',
'check' => $this->compare('opcache.validate_root', ini_get('opcache.validate_root'), '1'),
'error' => '',
];
try {
if (fileinode('/') > 2) {
$validateRootOption = $this->compare('opcache.validate_root', ini_get('opcache.validate_root'), '1');
$opcacheRequirements[] = [
'name' => 'opcache.validate_root',
'group' => 'core',
'required' => 1,
'version' => ini_get('opcache.validate_root'),
'result' => ini_get('opcache.validate_root'),
'notice' => '',
'check' => $this->compare('opcache.validate_root', ini_get('opcache.validate_root'), '1'),
'error' => '',
];
}
} catch (\ErrorException $x) {
// Systems that have an 'open_basedir' defined might not allow an access of '/'
}

return $opcacheRequirements;
Expand Down
28 changes: 15 additions & 13 deletions recovery/install/src/Requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ private function checkOpcache()
return [];
}

$useCwdOption = $this->compare('opcache.use_cwd', ini_get('opcache.use_cwd'), '1');
$opcacheRequirements = [[
'name' => 'opcache.use_cwd',
'group' => 'core',
Expand All @@ -245,18 +244,21 @@ private function checkOpcache()
'error' => '',
]];

if (fileinode('/') > 2) {
$validateRootOption = $this->compare('opcache.validate_root', ini_get('opcache.validate_root'), '1');
$opcacheRequirements[] = [
'name' => 'opcache.validate_root',
'group' => 'core',
'required' => 1,
'version' => ini_get('opcache.validate_root'),
'result' => ini_get('opcache.validate_root'),
'notice' => '',
'check' => $this->compare('opcache.validate_root', ini_get('opcache.validate_root'), '1'),
'error' => '',
];
try {
if (fileinode('/') > 2) {
$opcacheRequirements[] = [
'name' => 'opcache.validate_root',
'group' => 'core',
'required' => 1,
'version' => ini_get('opcache.validate_root'),
'result' => ini_get('opcache.validate_root'),
'notice' => '',
'check' => $this->compare('opcache.validate_root', ini_get('opcache.validate_root'), '1'),
'error' => '',
];
}
} catch (\ErrorException $x) {
// Systems that have an 'open_basedir' defined might not allow an access of '/'
}

return $opcacheRequirements;
Expand Down

0 comments on commit ad5ea26

Please sign in to comment.