Skip to content

Commit b682d88

Browse files
Feature/php8.3 support (#16)
* Fix styling * Updated style linting Set style type to 'per' Removed phpcpd * update deps * disabled phpmd check @see: pdepend/pdepend#695 * Updated workflows * Install pestphp for verison dependent tests --------- Co-authored-by: LaravelFreelancerNL <[email protected]>
1 parent 87bd5c0 commit b682d88

File tree

14 files changed

+47
-53
lines changed

14 files changed

+47
-53
lines changed

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99

1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
with:
1414
fetch-depth: 0
1515

1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: 8.1
19+
php-version: 8.3
2020
extensions: mbstring, intl
2121
ini-values: post_max_size=256M, short_open_tag=On
2222
coverage: xdebug

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ jobs:
99

1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
with:
1414
ref: ${{ github.head_ref }}
1515

16-
- name: Checkout
17-
uses: actions/checkout@v3
18-
1916
- name: Cache dependencies
2017
uses: actions/cache@v3
2118
with:
@@ -25,7 +22,7 @@ jobs:
2522
- name: Setup PHP
2623
uses: shivammathur/setup-php@v2
2724
with:
28-
php-version: 8.1
25+
php-version: 8.3
2926
extensions: mbstring, intl
3027
ini-values: post_max_size=256M, short_open_tag=On
3128
coverage: none
@@ -41,6 +38,6 @@ jobs:
4138
"${GITHUB_WORKSPACE}/vendor/bin/pint"
4239
4340
- name: Commit changes
44-
uses: stefanzweifel/git-auto-commit-action@v4
41+
uses: stefanzweifel/git-auto-commit-action@v5
4542
with:
4643
commit_message: Fix styling

.github/workflows/quality-assurance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313

1414
- name: Cache dependencies
1515
uses: actions/cache@v3
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
2222
with:
23-
php-version: 8.1
23+
php-version: 8.3
2424
extensions: mbstring, intl
2525
ini-values: post_max_size=256M, short_open_tag=On
2626
coverage: none

.github/workflows/run-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ubuntu-latest]
12-
php: [8.1, 8.2]
12+
php: [8.1, 8.2, 8.3]
1313
laravel: [9.*, 10.*]
1414
stability: [prefer-stable]
1515
include:
1616
- laravel: 9.*
1717
testbench: 7.*
1818
illuminate-contracts: 9.*
19+
phpunit: 9.*
20+
pestphp: 1.*
1921
- laravel: 10.*
2022
testbench: 8.*
2123
illuminate-contracts: 10.*
24+
pestphp: 2.*
2225

23-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
26+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
2427

2528
steps:
2629
- name: Checkout code
@@ -40,6 +43,7 @@ jobs:
4043
4144
- name: Install dependencies
4245
run: |
46+
composer require pestphp/pest:${{ matrix.pestphp }} --dev --with-all-dependencies
4347
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "illuminate/contracts:${{ matrix.illuminate-contracts }}" --no-interaction --no-update --dev
4448
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4549

.github/workflows/update-changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
with:
1515
ref: next
1616

bin/qa.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env bash
22
printf "\nRun PHPMD\n"
3-
./vendor/bin/phpmd src/ text phpmd-ruleset.xml
4-
5-
printf "\nRun PHPCPD\n"
6-
./vendor/bin/phpcpd src
3+
# disabled for now @see: https://github.com/pdepend/pdepend/issues/695
4+
#./vendor/bin/phpmd src/ text phpmd-ruleset.xml
75

86
printf "\nRun PHPStan\n"
97
composer analyse

composer.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,20 @@
2121
"guzzlehttp/guzzle": "^7.4",
2222
"illuminate/contracts": "^9.0|^10.0",
2323
"nunomaduro/termwind": "^1.10",
24-
"phpmd/phpmd": "^2.12",
2524
"spatie/laravel-package-tools": "^1.9.2"
2625
},
2726
"require-dev": {
28-
"laravel/pint": "^1.2.1",
29-
"nunomaduro/collision": "^6.0",
27+
"laravel/pint": "^1.13",
3028
"nunomaduro/larastan": "^2.2.0",
31-
"orchestra/testbench": "^7.0",
32-
"pestphp/pest": "^1.21",
33-
"pestphp/pest-plugin-faker": "^1.0",
34-
"pestphp/pest-plugin-laravel": "^1.1|^2.0",
29+
"orchestra/testbench": "^8.0",
30+
"pestphp/pest": "^2.26",
31+
"phpmd/phpmd": "^2.14",
3532
"phpstan/extension-installer": "^1.1",
3633
"phpstan/phpstan": "^1.8",
3734
"phpstan/phpstan-deprecation-rules": "^1.0",
3835
"phpstan/phpstan-phpunit": "^1.0",
39-
"phpunit/phpunit": "^9.5",
4036
"scrutinizer/ocular": "^1.9",
41-
"sebastian/phpcpd": "^6.0",
4237
"spatie/laravel-ray": "^1.26",
43-
"spatie/pest-plugin-test-time": "^1.1",
4438
"timacdonald/log-fake": "^2.0"
4539
},
4640
"autoload": {
@@ -57,7 +51,7 @@
5751
"analyse": "vendor/bin/phpstan analyse",
5852
"test": "vendor/bin/pest",
5953
"test-coverage": "vendor/bin/pest --coverage",
60-
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
54+
"format": "vendor/bin/pint"
6155
},
6256
"config": {
6357
"sort-packages": true,

pint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"preset": "per"
3+
}

src/Commands/GenerateKeyCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function handle(): int
1919

2020
$this->info('The keyfile was generated. Please add the following key to your .env file:');
2121
$this->newLine();
22-
$this->info('INDEXNOW_KEY='.$key);
22+
$this->info('INDEXNOW_KEY=' . $key);
2323

2424
return self::SUCCESS;
2525
}

src/IndexNow.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace LaravelFreelancerNL\LaravelIndexNow;
5+
namespace LaravelFreelancerNL\LaravelIndexNow;
66

77
use Exception;
88
use Illuminate\Foundation\Bus\PendingDispatch;
@@ -26,13 +26,13 @@ public function generateKey(): string
2626

2727
$key = Str::uuid()->toString();
2828

29-
$filename = $prefix.$key.'.txt';
29+
$filename = $prefix . $key . '.txt';
3030

31-
if (! file_exists(public_path(dirname($filename)))) {
31+
if (!file_exists(public_path(dirname($filename)))) {
3232
throw new KeyFileDirectoryMissing();
3333
}
3434

35-
File::put(public_path().'/'.$filename, $key);
35+
File::put(public_path() . '/' . $filename, $key);
3636

3737
return $key;
3838
}
@@ -115,7 +115,7 @@ protected function generateTargetUrl(): string
115115
{
116116
$searchEngineDomain = config('index-now.search-engine');
117117

118-
return 'https://'.$searchEngineDomain.'/indexnow';
118+
return 'https://' . $searchEngineDomain . '/indexnow';
119119
}
120120

121121
/**

0 commit comments

Comments
 (0)