Skip to content

Commit 3c71e67

Browse files
committed
update for php 8.1
php 8.1, composer update, nullable_type_declaration_for_default_null_value Google.php
1 parent 40587e4 commit 3c71e67

File tree

6 files changed

+85
-74
lines changed

6 files changed

+85
-74
lines changed

.github/workflows/coding-style.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: Coding Style
33
on: [push, pull_request]
44

55
jobs:
6-
nette_cc:
7-
name: Nette Code Checker
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v2
11-
- uses: shivammathur/setup-php@v2
12-
with:
13-
php-version: 8.0
14-
coverage: none
6+
nette_cc:
7+
name: Nette Code Checker
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: 8.0
14+
coverage: none
1515

16-
- run: composer create-project nette/code-checker temp/code-checker ^3 --no-progress
17-
- run: php temp/code-checker/code-checker --strict-types --no-progress
16+
- run: composer create-project nette/code-checker temp/code-checker ^3 --no-progress
17+
- run: php temp/code-checker/code-checker --strict-types --no-progress

.github/workflows/paralel-lint.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: Parallel Lint
33
on: [push, pull_request]
44

55
jobs:
6-
nette_pp:
7-
name: Parallel Lint
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v2
11-
- uses: shivammathur/setup-php@v2
12-
with:
13-
php-version: 7.4
14-
coverage: none
6+
nette_pp:
7+
name: Parallel Lint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: 8.1
14+
coverage: none
1515

16-
- run: composer create-project --no-interaction --no-progress --prefer-dist php-parallel-lint/php-parallel-lint temp/php-parallel-lint --no-dev "~1.3"
17-
- run: php temp/php-parallel-lint/parallel-lint -e php,phpt -j 8 --exclude tests/_temp --exclude temp --exclude vendor .
16+
- run: composer create-project --no-interaction --no-progress --prefer-dist php-parallel-lint/php-parallel-lint temp/php-parallel-lint --no-dev "~1.3"
17+
- run: php temp/php-parallel-lint/parallel-lint -e php,phpt -j 8 --exclude tests/_temp --exclude temp --exclude vendor .

.github/workflows/test.yaml

+44-45
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,47 @@ name: Tests
33
on: [push, pull_request]
44

55
jobs:
6-
tests:
7-
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
php: ['7.3', '7.4', '8.0', '8.1']
11-
12-
fail-fast: false
13-
14-
name: PHP ${{ matrix.php }} tests
15-
steps:
16-
- uses: actions/checkout@v2
17-
- uses: shivammathur/setup-php@v2
18-
with:
19-
php-version: ${{ matrix.php }}
20-
coverage: none
21-
22-
- run: mkdir -p tests/_temp
23-
- run: mkdir -p tests/_tmp
24-
- run: mkdir temp/
25-
- run: composer self-update
26-
- run: composer update --no-progress --prefer-dist --prefer-stable
27-
- run: vendor/bin/tester ./tests/KdybyTests/ -s -C
28-
- if: failure()
29-
uses: actions/upload-artifact@v2
30-
with:
31-
name: output
32-
path: tests/**/output
33-
34-
35-
lowest_dependencies:
36-
name: Lowest Dependencies
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v2
40-
- uses: shivammathur/setup-php@v2
41-
with:
42-
php-version: 7.3
43-
coverage: none
44-
45-
- run: mkdir -p tests/_temp
46-
- run: mkdir -p tests/_tmp
47-
- run: mkdir temp/
48-
- run: composer self-update
49-
- run: composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable
50-
- run: vendor/bin/tester ./tests/KdybyTests/ -s -C
6+
tests:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php: ['8.1','8.2','8.3']
11+
fail-fast: false
12+
13+
name: PHP ${{ matrix.php }} tests
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: ${{ matrix.php }}
19+
coverage: none
20+
21+
- run: mkdir -p tests/_temp
22+
- run: mkdir -p tests/_tmp
23+
- run: mkdir temp/
24+
- run: composer self-update
25+
- run: composer update --no-progress --prefer-dist --prefer-stable
26+
- run: vendor/bin/tester ./tests/KdybyTests/ -s -C
27+
- if: failure()
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: output
31+
path: tests/**/output
32+
33+
34+
lowest_dependencies:
35+
name: Lowest Dependencies
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: 8.1
42+
coverage: none
43+
44+
- run: mkdir -p tests/_temp
45+
- run: mkdir -p tests/_tmp
46+
- run: mkdir temp/
47+
- run: composer self-update
48+
- run: composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable
49+
- run: vendor/bin/tester ./tests/KdybyTests/ -s -C

composer.json

+15-3
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,26 @@
2626
}
2727
],
2828
"require": {
29-
"php": ">=7.3",
30-
"nette/nette": "dev-master",
29+
"php": ">=8.1",
3130
"ext-curl": "*",
3231
"ext-json": "*",
32+
33+
"nette/application": "~3.1.0",
34+
"nette/bootstrap": "^3.1",
35+
"nette/caching": "^3.1",
36+
"nette/database": "^3.1",
37+
"nette/di": "^3.1",
38+
"nette/http": "^3.3",
39+
"nette/robot-loader": "^4.0",
40+
"nette/security": "^3.1",
41+
"nette/utils": "^4.0",
42+
"latte/latte": "^3.0",
43+
"tracy/tracy": "^2.9",
44+
3345
"google/apiclient": "^2.0"
3446
},
3547
"require-dev": {
36-
"nette/tester": ">=2.3"
48+
"nette/tester": "^2.5"
3749
},
3850
"autoload": {
3951
"psr-0": {

src/Kdyby/Google/Google.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function getIdToken($key = null)
208208

209209

210210
/**
211-
* @return \Google_Service_Oauth2_Userinfoplus
211+
* @return \Google_Service_Oauth2_Userinfo
212212
* @throws Google_Exception
213213
*/
214214
public function getProfile()
@@ -463,7 +463,7 @@ public function getCurrentUrl()
463463
* @param AbstractDialog $dialog
464464
* @return Application\UI\Link|UrlScript
465465
*/
466-
public function getReturnLink(AbstractDialog $dialog = null)
466+
public function getReturnLink(?AbstractDialog $dialog = null)
467467
{
468468
$destination = $this->config->getReturnDestination();
469469

tests/phpW.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[PHP]
2-
extension_dir ="c:/wamp/bin/php/php8.0.13/ext/"
2+
extension_dir ="c:/wamp/bin/php/php8.1.13/ext/"
33
extension=pdo_mysql
44
extension=pdo_sqlite
55
extension=mbstring
@@ -9,7 +9,7 @@ extension=openssl
99

1010
[XDebug]
1111
; Note that profiler is enabled separately.
12-
zend_extension="c:/Wamp/bin/php/php8.0.13/zend_ext/php_xdebug-3.1.2-8.0-vs16-x86_64.dll"
12+
zend_extension="c:/Wamp/bin/php/php8.1.13/zend_ext/php_xdebug-3.4.0-8.1-vs16-x86_64.dll"
1313
xdebug.mode = develop,coverage,debug,trace
1414
xdebug.profiler_enable = off
1515
xdebug.profiler_enable_trigger = Off

0 commit comments

Comments
 (0)