Skip to content

Commit

Permalink
TASK: Add package consolidation/self-update
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbelasichon committed Feb 27, 2023
1 parent 089da34 commit e1ed402
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 231 deletions.
9 changes: 7 additions & 2 deletions bin/surf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@
* file that was distributed with this source code.
*/

use SelfUpdate\SelfUpdateCommand;
use Symfony\Component\DependencyInjection\Container;
use TYPO3\Surf\Cli\Symfony\ConsoleApplication;

requireAutoloader();

$kernel = new \TYPO3\Surf\Cli\Symfony\ConsoleKernel('prod', false);
$kernel->boot();
/** @var \Symfony\Component\DependencyInjection\Container $container */
/** @var Container $container */
$container = $kernel->getContainer();

/** @var ConsoleApplication $application */
$application = $container->get(\TYPO3\Surf\Cli\Symfony\ConsoleApplication::class);
$application->add(new SelfUpdateCommand('Surf', $application->getVersion(), 'typo3/surf'));
$application->run();

function requireAutoloader()
Expand All @@ -30,7 +36,6 @@ function requireAutoloader()
];
foreach ($autoloadPaths as $path) {
if (file_exists($path)) {
/** @noinspection PhpIncludeInspection */
return include $path;
}
}
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"require": {
"php": "^7.4 || ^8.0",
"consolidation/self-update": "^2.1",
"guzzlehttp/guzzle": "^6.0 || ^7.0",
"monolog/monolog": "^2.9.1",
"myclabs/php-enum": "^1.8",
Expand Down

0 comments on commit e1ed402

Please sign in to comment.