Skip to content

Commit ef0a171

Browse files
committed
Fixed Quickstarts.
1 parent 93697aa commit ef0a171

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

.github/workflows/Quickstart Symfony.yaml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
env:
19-
php: 8.1
19+
php: 8.2
2020

2121
steps:
2222
- uses: actions/checkout@v3
@@ -31,18 +31,10 @@ jobs:
3131
working-directory:
3232

3333
- name: Create Symfony project
34-
run: composer create-project symfony/skeleton . ^5
34+
run: composer create-project symfony/skeleton . ^7
3535

36-
- name: Configure minimum stability for Amp v3.
37-
run: |
38-
composer config minimum-stability beta
39-
composer config prefer-stable true
40-
41-
- name: Require Steam
42-
run: composer require --with-dependencies provider/steam
43-
44-
- name: Require Doctrine annotations
45-
run: composer require doctrine/annotations ^1
36+
- name: Require IANA
37+
run: composer require --with-dependencies provider/iana
4638

4739
- name: Add Porter services
4840
run: |
@@ -55,9 +47,9 @@ jobs:
5547
class: Symfony\Component\DependencyInjection\ServiceLocator
5648
arguments:
5749
-
58-
- '@ScriptFUSION\Porter\Provider\Steam\SteamProvider'
50+
- '@ScriptFUSION\Porter\Provider\Iana\Provider\IanaProvider'
5951
60-
ScriptFUSION\Porter\Provider\Steam\SteamProvider: ~
52+
ScriptFUSION\Porter\Provider\Iana\Provider\IanaProvider:
6153
.
6254
6355
- name: Add AppListAction
@@ -70,7 +62,7 @@ jobs:
7062
7163
use ScriptFUSION\Porter\Import\Import;
7264
use ScriptFUSION\Porter\Porter;
73-
use ScriptFUSION\Porter\Provider\Steam\Resource\GetAppList;
65+
use ScriptFUSION\Porter\Provider\Iana\Provider\Resource\IanaPortNumbers;
7466
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
7567
use Symfony\Component\HttpFoundation\Response;
7668
use Symfony\Component\HttpFoundation\StreamedResponse;
@@ -83,8 +75,12 @@ jobs:
8375
{
8476
return new StreamedResponse(
8577
function () use ($porter): void {
86-
foreach ($porter->import(new Import(new GetAppList())) as $app) {
87-
echo "$app[appid]\n";
78+
foreach ($porter->import(new Import(new IanaPortNumbers())) as $port) {
79+
if ($port['Port Number'] === '') {
80+
continue;
81+
}
82+
83+
echo "{$port['Port Number']}:{$port['Transport Protocol']}\n";
8884
}
8985
},
9086
headers: ['content-type' => 'text/plain'],
@@ -99,7 +95,7 @@ jobs:
9995
- name: Download home page
10096
run: curl localhost | tee out
10197

102-
- name: Test output contains over 150k lines
98+
- name: Test output contains over 13k lines
10399
run: |
104100
echo Lines: ${lines=$(wc --lines <out)}
105-
((lines > 150000))
101+
((lines > 13000))

.github/workflows/Quickstart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Test output contains USD
7272
run: 'grep --perl-regexp ''^USD: [\d.]+$'' out'
7373

74-
- name: Test output contains between 30-40 lines
74+
- name: Test output contains between 25-35 lines
7575
run: |
7676
echo Lines: ${lines=$(wc --lines <out)}
77-
((lines >= 30 && lines <= 40))
77+
((lines >= 25 && lines <= 35))

0 commit comments

Comments
 (0)