Skip to content

Commit 7f395a5

Browse files
ohmyfelixf3l1x
authored andcommitted
Require PHP 8.4 across skeleton toolchain
1 parent fb28ad2 commit 7f395a5

File tree

10 files changed

+493
-433
lines changed

10 files changed

+493
-433
lines changed

.github/workflows/codesniffer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ jobs:
1313
codesniffer:
1414
name: "Codesniffer"
1515
uses: contributte/.github/.github/workflows/codesniffer.yml@v1
16+
with:
17+
php: "8.4"

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
name: "Phpunit"
1515
uses: contributte/.github/.github/workflows/phpunit-coverage.yml@v1
1616
with:
17+
php: "8.4"
1718
make: "init coverage"

.github/workflows/phpstan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
name: "Phpstan"
1515
uses: contributte/.github/.github/workflows/phpstan.yml@v1
1616
with:
17+
php: "8.4"
1718
make: "init phpstan"

.github/workflows/tests.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,9 @@ on:
1010
- cron: "0 8 * * 1"
1111

1212
jobs:
13-
test82:
13+
test84:
1414
name: "Phpunit"
1515
uses: contributte/.github/.github/workflows/phpunit.yml@v1
1616
with:
17-
php: "8.2"
18-
make: "init tests"
19-
20-
test81:
21-
name: "Phpunit"
22-
uses: contributte/.github/.github/workflows/phpunit.yml@v1
23-
with:
24-
php: "8.1"
17+
php: "8.4"
2518
make: "init tests"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ https://examples.contributte.org/webpack-skeleton/
3434

3535
## Installation
3636

37-
You will need `PHP 8.1+` and [Composer](https://getcomposer.org/).
37+
You will need `PHP 8.4+` and [Composer](https://getcomposer.org/).
3838

3939
Create project using composer.
4040

app/UI/Home/HomePresenter.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ protected function createComponentUserForm(): Form
4242
->setOption('description', Html::el('span')->setHtml('Try to type <strong>cool@nette.org</strong> to see validation.'))
4343
->setEmptyValue('@')
4444
->addFilter(fn ($email) => Strings::lower($email))
45-
->addRule($form::REQUIRED, 'E-mail is mandatory')
46-
->addRule($form::EMAIL, 'Given e-mail is not e-mail');
45+
->addRule(Form::Required, 'E-mail is mandatory')
46+
->addRule(Form::Email, 'Given e-mail is not e-mail');
4747

4848
$form->addInteger('age', 'Your age?')
4949
->setHtmlAttribute('Are you young?')
@@ -52,7 +52,8 @@ protected function createComponentUserForm(): Form
5252
$form->addSubmit('send', 'OK');
5353

5454
$form->onValidate[] = function (Form $form): void {
55-
$values = $form->getUnsafeValues(ArrayHash::class);
55+
$values = $form->getUntrustedValues();
56+
assert($values instanceof ArrayHash);
5657

5758
// Validate e-mail duplicities (against DB?)
5859
if (str_ends_with($values->email, '@nette.org')) {

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
"license": "MIT",
1414
"type": "project",
1515
"require": {
16-
"php": ">=8.1",
16+
"php": ">=8.4",
1717

1818
"contributte/nella": "^0.2.0"
1919
},
2020
"require-dev": {
21-
"contributte/qa": "^0.3",
22-
"contributte/tester": "^0.2",
21+
"contributte/qa": "^0.4",
22+
"contributte/tester": "^0.3",
2323
"contributte/phpstan": "^0.1",
24-
"contributte/dev": "^0.5"
24+
"contributte/dev": "^0.6"
2525
},
2626
"autoload": {
2727
"psr-4": {

0 commit comments

Comments
 (0)