Skip to content

Commit ca0cf73

Browse files
mfnlaravel-ide-helper
andauthored
[GHA] Misc improvements (#1101)
* gha: be more specific which OS to use Avoids "surprises" when Github changes the underlying version, like they currently announce with a warning: > Ubuntu-latest workflows will use Ubuntu-20.04 soon. For more details, see actions/runner-images#1816 Note: basically right now "latest" is actually 18.04 and not 20.04 * composer fix-style * gha: require league/flysystem:^1 for lumen 2.* doesn't work out of the box * gha: explicit version of composer isn't necessary anymore v2 is already the default * Be explicit to require the pdo SQLite extension for tests Co-authored-by: laravel-ide-helper <[email protected]>
1 parent 336ae44 commit ca0cf73

File tree

7 files changed

+11
-13
lines changed

7 files changed

+11
-13
lines changed

.github/workflows/composer-normalize.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
normalize:
1010
timeout-minutes: 15
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
steps:
1313
- name: Git checkout
1414
uses: actions/checkout@v2

.github/workflows/fix-code-style.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
fix-style:
88
name: Fix Code Style
99
timeout-minutes: 15
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-20.04
1111
env:
1212
COMPOSER_NO_INTERACTION: 1
1313

@@ -20,7 +20,6 @@ jobs:
2020
with:
2121
php-version: 7.4
2222
coverage: none
23-
tools: composer:v2
2423

2524
- name: Install dependencies
2625
run: composer update --prefer-dist --no-progress

.github/workflows/run-integration-tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
php-lumen-integration-tests:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-20.04
1616
timeout-minutes: 15
1717
env:
1818
COMPOSER_NO_INTERACTION: 1
@@ -35,13 +35,12 @@ jobs:
3535
with:
3636
php-version: ${{ matrix.php }}
3737
coverage: none
38-
tools: composer:v2
3938

4039
- name: Install dependencies
4140
run: |
4241
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample
4342
cd sample
44-
composer require "league/flysystem" --no-update --no-progress
43+
composer require "league/flysystem:^1" --no-update --no-progress
4544
composer update --prefer-stable --prefer-dist --no-progress
4645
4746
- name: Add package from source
@@ -73,7 +72,7 @@ jobs:
7372
if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi
7473
7574
php-laravel-integration-tests:
76-
runs-on: ubuntu-latest
75+
runs-on: ubuntu-20.04
7776
timeout-minutes: 15
7877
env:
7978
COMPOSER_NO_INTERACTION: 1
@@ -96,7 +95,6 @@ jobs:
9695
with:
9796
php-version: ${{ matrix.php }}
9897
coverage: none
99-
tools: composer:v2
10098

10199
- name: Install dependencies
102100
run: |

.github/workflows/run-static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
build:
1111
timeout-minutes: 15
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-20.04
1313

1414
steps:
1515
- uses: actions/checkout@v2

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
php-tests:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-20.04
1616
timeout-minutes: 15
1717
env:
1818
COMPOSER_NO_INTERACTION: 1
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
php-version: ${{ matrix.php }}
3939
coverage: none
40-
tools: composer:v2
40+
extensions: pdo_sqlite
4141

4242
- name: Install dependencies
4343
run: |

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"phpdocumentor/type-resolver": "^1.1.0"
3232
},
3333
"require-dev": {
34+
"ext-pdo_sqlite": "*",
3435
"friendsofphp/php-cs-fixer": "^2",
3536
"illuminate/config": "^6 || ^7 || ^8",
3637
"illuminate/view": "^6 || ^7 || ^8",

resources/views/helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function <?= $method->getName() ?>(<?= $method->getParamsWithDefau
3535
//Method inherited from <?= $method->getDeclaringClass() ?>
3636
<?php endif; ?>
3737

38-
<?php if ($method->isInstanceCall()) :?>
38+
<?php if ($method->isInstanceCall()) : ?>
3939
/** @var <?=$method->getRoot()?> $instance */
4040
<?php endif?>
4141
<?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>;
@@ -58,7 +58,7 @@ public static function <?= $method->getName() ?>(<?= $method->getParamsWithDefau
5858
//Method inherited from <?= $method->getDeclaringClass() ?>
5959
<?php endif; ?>
6060

61-
<?php if ($method->isInstanceCall()) :?>
61+
<?php if ($method->isInstanceCall()) : ?>
6262
/** @var <?=$method->getRoot()?> $instance */
6363
<?php endif?>
6464
<?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>;

0 commit comments

Comments
 (0)