Skip to content

Commit

Permalink
compatibility with PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 18, 2019
1 parent 79e883f commit 9152273
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ Are you looking for php_ssh2.dll?
- [php_ssh2.dll for PHP 7.2 x64](https://files.nette.org/misc/7.2-x64/php_ssh2.dll)
- [php_ssh2.dll for PHP 7.3 x86](https://files.nette.org/misc/7.3-x86/php_ssh2.dll)
- [php_ssh2.dll for PHP 7.3 x64](https://files.nette.org/misc/7.3-x64/php_ssh2.dll)
- [php_ssh2.dll for PHP 7.4 x86](https://files.nette.org/misc/7.4-x86/php_ssh2.dll)
- [php_ssh2.dll for PHP 7.4 x64](https://files.nette.org/misc/7.4-x64/php_ssh2.dll)

Need SSH authenticate using a public key?

Expand Down
8 changes: 4 additions & 4 deletions src/Deployment/CliRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ private function loadConfig(): ?array
$this->mode = $options['--generate'] ? 'generate' : ($options['--test'] ? 'test' : null);
$this->configFile = $options['config'];

if (!flock($this->lock = fopen($options['config'], 'r'), LOCK_EX | LOCK_NB)) {
throw new \Exception('It seems that you are in the middle of another deployment.');
}

$config = $this->loadConfigFile($options['config']);
if (!$config) {
throw new \Exception('Missing config.');
}

if (!flock($this->lock = fopen($options['config'], 'r'), LOCK_EX | LOCK_NB)) {
throw new \Exception('It seems that you are in the middle of another deployment.');
}

$this->batches = isset($config['remote']) && is_string($config['remote'])
? ['' => $config]
: array_filter($config, 'is_array');
Expand Down

0 comments on commit 9152273

Please sign in to comment.