File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 99 */
1010
1111use SelfUpdate \SelfUpdateCommand ;
12+ use SelfUpdate \SelfUpdateManager ;
1213use Symfony \Component \Config \FileLocator ;
1314use Symfony \Component \DependencyInjection \Container ;
1415use Symfony \Component \DependencyInjection \ContainerBuilder ;
@@ -29,7 +30,15 @@ foreach ($commandNamesToHide as $commandNameToHide) {
2930 $ commandToHide = $ application ->get ($ commandNameToHide );
3031 $ commandToHide ->setHidden (true );
3132}
32- $ application ->add (new SelfUpdateCommand ('TYPO3 Surf ' , $ application ->getVersion (), 'typo3/surf ' ));
33+
34+ if (class_exists (SelfUpdateManager::class)){
35+ $ selfUpdateManager = new SelfUpdateManager ('TYPO3 Surf ' , $ application ->getVersion (), 'typo3/surf ' );
36+ $ selfUpdateCommand = new SelfUpdateCommand ($ selfUpdateManager );
37+ } else {
38+ $ selfUpdateCommand = new SelfUpdateCommand ('TYPO3 Surf ' , $ application ->getVersion (), 'typo3/surf ' );
39+ }
40+ $ application ->add ($ selfUpdateCommand );
41+
3342$ application ->run ();
3443
3544function requireAutoloader ()
Original file line number Diff line number Diff line change 99 },
1010 "require" : {
1111 "php" : " ^7.4 || ^8.0" ,
12- "consolidation/self-update" : " ^2.1" ,
12+ "consolidation/self-update" : " ^2.1 || ^3.0 " ,
1313 "guzzlehttp/guzzle" : " ^6.0 || ^7.0" ,
1414 "monolog/monolog" : " ^2.9.1" ,
1515 "myclabs/php-enum" : " ^1.8" ,
You can’t perform that action at this time.
0 commit comments