Skip to content

Commit 89ff1cd

Browse files
committed
Fixes a couple of issues with PHP 7.1. Makes "composer update" automatically rebuild git-deploy.
1 parent 6eca059 commit 89ff1cd

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,10 @@
7070
},
7171
"config": {
7272
"vendor-dir": "tools/vendor"
73+
},
74+
"scripts": {
75+
"post-autoload-dump": [
76+
"php tools/build.php"
77+
]
7378
}
74-
}
79+
}

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

git-deploy

-35.6 KB
Binary file not shown.

tools/build.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ public function accept() {
3535
$d = $phar->buildFromIterator(new RecursiveIteratorIterator($iterator), dirname(__FILE__));
3636
$phar->setStub(file_get_contents(dirname(__FILE__) . "/index.php"));
3737
unset($phar);
38-
@unlink('../git-deploy');
39-
rename('git-deploy.phar', '../git-deploy');
40-
chmod('../git-deploy', 0755);
38+
$path_to_git_deploy = dirname(__FILE__) . "/../git-deploy";
39+
@unlink($path_to_git_deploy);
40+
rename('git-deploy.phar', $path_to_git_deploy);
41+
chmod($path_to_git_deploy, 0755);
4142
echo "Built git-deploy successfully!" . PHP_EOL;
4243
}

tools/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
<?php
33

44
ini_set('memory_limit', '-1');
5+
error_reporting(E_ALL ^ E_DEPRECATED);
56
Phar::mapPhar("git-deploy");
67

78
/**
89
* PSR-4 autoloader.
9-
*
10+
*
1011
* @param string $class The fully-qualified class name.
1112
* @return void
1213
*/

tools/src/Sftp.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class Sftp extends Server {
99
public function connect($test = false) {
1010
if (!$this->connection or $test) {
1111
$server = $this->server;
12-
require_once('Crypt/RSA.php');
13-
require_once('Net/SFTP.php');
1412

1513
$this->connection = new \phpseclib\Net\SFTP($server['host'], $server['port'], 10);
1614
$logged_in = false;

0 commit comments

Comments
 (0)