Skip to content

Commit 23cd5e0

Browse files
committed
Update libraries and Symfony libs, require PHP 7.4
1 parent 81995c6 commit 23cd5e0

18 files changed

+89
-159
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
create:
55
tags:
66
- '*'
7+
workflow_dispatch:
78

89
jobs:
910
build:
@@ -14,7 +15,7 @@ jobs:
1415
- name: Setup PHP
1516
uses: shivammathur/setup-php@v2
1617
with:
17-
php-version: '7.3'
18+
php-version: '7.4'
1819
extensions: mbstring, intl, posix
1920
ini-values: memory_limit=256M, max_execution_time=0, phar.readonly=0
2021
tools: pecl

.idea/php.xml

Lines changed: 20 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/project-manager.iml

Lines changed: 29 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
"description": "A CLI utility for helping manage a micro-services project",
55
"license": "MIT",
66
"require": {
7-
"php": "^7.3",
7+
"php": ">=7.4",
88
"ext-ctype": "*",
99
"ext-iconv": "*",
1010
"ext-json": "*",
1111
"pragmarx/ia-str": "~7.3",
12-
"somnambulist/collection": "~3.2",
13-
"symfony/config": "5.1.*",
14-
"symfony/console": "5.1.*",
15-
"symfony/dependency-injection": "5.1.*",
16-
"symfony/dotenv": "5.1.*",
17-
"symfony/finder": "5.1.*",
18-
"symfony/http-kernel": "5.1.*",
19-
"symfony/process": "5.1.*",
20-
"symfony/yaml": "5.1.*"
12+
"somnambulist/collection": "~4.0.1",
13+
"symfony/config": "5.2.*",
14+
"symfony/console": "5.2.*",
15+
"symfony/dependency-injection": "5.2.*",
16+
"symfony/dotenv": "5.2.*",
17+
"symfony/finder": "5.2.*",
18+
"symfony/http-kernel": "5.2.*",
19+
"symfony/process": "5.2.*",
20+
"symfony/yaml": "5.2.*"
2121
},
2222
"require-dev": {
2323
"phpunit/phpunit": "~9",
24-
"symfony/var-dumper": "5.1.*"
24+
"symfony/var-dumper": "5.2.*"
2525
},
2626
"config": {
2727
"preferred-install": {

src/Application.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\Console\Style\SymfonyStyle;
1919
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
2020
use Symfony\Component\HttpKernel\KernelInterface;
21+
use Throwable;
2122

2223
/**
2324
* Class Application
@@ -72,7 +73,7 @@ public function reset()
7273
* @param OutputInterface $output
7374
*
7475
* @return int 0 if everything went fine, or an error code
75-
* @throws \Throwable
76+
* @throws Throwable
7677
*/
7778
public function doRun(InputInterface $input, OutputInterface $output)
7879
{
@@ -196,7 +197,7 @@ protected function registerCommands()
196197
if (!isset($lazyCommandIds[$id])) {
197198
try {
198199
$this->add($container->get($id));
199-
} catch (\Throwable $e) {
200+
} catch (Throwable $e) {
200201
$this->registrationErrors[] = $e;
201202
}
202203
}

src/Commands/Behaviours/GetServicesFromInput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ protected function getServicesFrom(InputInterface $input, string $allMessage, st
2727
$services = $input->getArgument('service');
2828

2929
if (empty($services)) {
30-
$libs = $this->config->projects()->active()->services()->list()->sortByKey()->keys()->add('all');
30+
$libs = $this->config->projects()->active()->services()->list()->sortBy('key')->keys()->add('all');
3131

3232
$services = [$this->tools()->choose($chooseMessage, $libs->toArray())];
3333
}
3434

3535
if (strtolower(trim($services[0])) === 'all') {
3636
$this->tools()->info($allMessage);
3737

38-
return $this->config->projects()->active()->services()->list()->sortByKey()->keys();
38+
return $this->config->projects()->active()->services()->list()->sortBy('key')->keys();
3939
}
4040

4141
return new MutableCollection($services);

src/Commands/CheckCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function templates()
9797
$items->merge($project->templates()->list());
9898
}
9999

100-
$items->sortUsing(function (Template $t1, Template $t2) {
100+
$items->sort(function (Template $t1, Template $t2) {
101101
return $t1->name() <=> $t2->name();
102102
});
103103

src/Commands/Config/ChangeConfigCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ private function getLibraries(Project $project): MutableCollection
318318
->map(function ($value) {
319319
return $value . ' (lib)';
320320
})
321-
->sortByValue()
321+
->sortBy('value')
322322
->values()
323323
;
324324
}
@@ -330,7 +330,7 @@ private function getServices(Project $project): MutableCollection
330330
->map(function ($value) {
331331
return $value . ' (service)';
332332
})
333-
->sortByValue()
333+
->sortBy('value')
334334
->values()
335335
;
336336
}

src/Commands/Libraries/CreateLibraryCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
8989
switch (true):
9090
case $template->isGitResource():
9191
return (new GitInstaller($this->tools(), 'library'))->installInto($project, $template, $name, $cwd);
92-
break;
9392

9493
case $template->isComposerResource():
9594
return (new ComposerInstaller($this->tools(), 'library'))->installInto($project, $template, $name, $cwd);
96-
break;
9795

9896
case $template->hasResource():
9997
return (new ConfigTemplateInstaller($this->tools(), 'library'))->installInto($project, $template, $name, $cwd);
100-
break;
10198

10299
default:
103100
return (new EmptyLibraryInstaller($this->tools(), 'library'))->installInto($project, $name, $cwd);

src/Commands/Libraries/ListCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
5050
$project
5151
->libraries()
5252
->list()
53-
->sortUsing(function (Library $a, Library $b) {
53+
->sort(function (Library $a, Library $b) {
5454
return $a->name() <=> $b->name();
5555
})
5656
->each(function (Library $service) use ($table) {

0 commit comments

Comments
 (0)