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

TASK: Add package consolidation/self-update #692

Merged
merged 1 commit into from
Apr 1, 2023
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
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('TYPO3 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
Loading