Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #176

Merged
merged 2 commits into from
Apr 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ env:

matrix:
include:
- php: '7.2'
- php: '7.1'
env: DEPLOY=true
- php: '7.2'
- php: '7.2'
env: COVERAGE='true'
- php: '7.2'
env: SYMFONY_VERSION='v3'
- php: nightly
allow_failures:
- php: nightly
fast_finish: true
Expand Down
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@
"humbug/php-scoper": "^1.0@dev",
"justinrainbow/json-schema": "^5.2",
"nikic/iter": "^1.6",
"padraic/phar-updater": "^1.0",
"phpseclib/phpseclib": "~2.0",
"seld/jsonlint": "^1.6",
"symfony/console": "^3.4 || ^4.0",
"symfony/filesystem": "^3.4 || ^4.0",
"symfony/finder": "^3.4 || ^4.0",
"symfony/process": "^3.4 || ^4.0",
"symfony/var-dumper": "^3.4 || ^4.0",
"webmozart/path-util": "^2.3"
},
Expand Down
69 changes: 10 additions & 59 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 2 additions & 48 deletions src/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,55 +26,9 @@
use function sys_get_temp_dir;
use function unlink;

// TODO: update PHP-Scoper to get rid of this horrible hack at some point
$findPhpScoperFunctions = function (): void {
if (file_exists($autoload = __DIR__.'/../../php-scoper/src/functions.php')) {
// Is installed via Composer
require_once $autoload;

return;
}

if (file_exists($autoload = __DIR__.'/../vendor/humbug/php-scoper/src/functions.php')) {
// Is scoped (in PHAR or dumped directory) or is installed locally
require_once $autoload;

return;
}

if ('phar://' === substr(__FILE__, 0, 7)) {
// Is in the PHAR but the PHAR has been renamed without the extension `.phar`. As a result the PHAR protocol
// `phar://path/to/file/in/PHAR` will not work.
// See https://github.com/amphp/parallel/commit/732694688461936bec02c0ccf020dfee10c4f7ee
if (defined('PHAR_COPY')) {
return;
}

$pharPath = dirname(substr(__FILE__, 7), 2);
define('PHAR_COPY', sys_get_temp_dir().'/phar-'.bin2hex(random_bytes(10)).'.phar');

copy($pharPath, \PHAR_COPY);

$autoload = 'phar://'.\PHAR_COPY.'/vendor/humbug/php-scoper/src/functions.php';

register_shutdown_function(static function (): void {
@unlink(\PHAR_COPY);
});

require_once $autoload;

return;
}

throw new RuntimeException('Unable to find the PHP-Scoper functions.');
};

$GLOBALS['_BOX_BOOTSTRAP'] = function () use ($findPhpScoperFunctions): void {
$findPhpScoperFunctions();

($GLOBALS['_BOX_BOOTSTRAP'] = function (): void {
\KevinGH\Box\register_aliases();
};
$GLOBALS['_BOX_BOOTSTRAP']();
})();

// Convert errors to exceptions
set_error_handler(
Expand Down