Skip to content

Commit

Permalink
⬆️ Symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
garak committed Jun 18, 2023
1 parent a956c60 commit 18c86f7
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 31 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
phpstan:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: PHPStan
steps:
- name: Checkout
Expand All @@ -18,28 +18,28 @@ jobs:
with:
args: analyse
cs-fixer:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: PHP-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fix CS
uses: docker://oskarstark/php-cs-fixer-ga
tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- description: 'Symfony 5.4'
php: '8.0'
composer_option: '--prefer-lowest'
- description: 'Symfony 6.1'
php: '8.1'
symfony: 6.1.*
- description: 'Symfony 6.2'
php: '8.1'
composer_option: '--prefer-lowest'
- description: 'Symfony 6.3'
php: '8.2'
symfony: 6.3.*
- description: 'Symfony 7.0'
php: '8.2'
symfony: 6.2.*
symfony: 7.0.*@dev
name: PHP ${{ matrix.php }} tests (${{ matrix.description }})
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP71Migration:risky' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'declare_strict_types' => false,
'native_function_invocation' => ['include' => ['@all']],
Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "beelab/recaptcha2-bundle",
"type": "symfony-bundle",
"description": "Provide Google Recaptch2 form type",
"description": "Provide Google Recaptcha2 form type",
"keywords": [
"Symfony",
"Form",
Expand All @@ -16,20 +16,20 @@
}
],
"require": {
"php": "^8.0",
"google/recaptcha": "^1.2",
"symfony/config": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"symfony/form": "^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0",
"symfony/validator": "^5.4 || ^6.0"
"php": "^8.1",
"google/recaptcha": "^1.3",
"symfony/config": "^6.0 || ^7.0",
"symfony/dependency-injection": "^6.0 || ^7.0",
"symfony/form": "^6.0 || ^7.0",
"symfony/http-kernel": "^6.0 || ^7.0",
"symfony/validator": "^6.0 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/phpunit-bridge": "^6.2"
"phpunit/phpunit": "^9.6",
"symfony/phpunit-bridge": "^6.3"
},
"suggest": {
"symfony/twig-bundle": "To render widget. Minimum supported Twig version is 1.34, minimum suggested is 2.4"
"symfony/twig-bundle": "To render widget. Minimum supported Twig version is 2.4"
},
"config": {
"sort-packages": true
Expand Down
3 changes: 0 additions & 3 deletions src/DependencyInjection/BeelabRecaptcha2Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

final class BeelabRecaptcha2Extension extends Extension
{
/**
* @param array<string, mixed> $configs
*/
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/RecaptchaSubmitType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

final class RecaptchaSubmitType extends AbstractType
{
public function __construct(private string $siteKey)
public function __construct(private readonly string $siteKey)
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/RecaptchaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class RecaptchaType extends AbstractType
{
public function __construct(protected string $siteKey)
public function __construct(protected readonly string $siteKey)
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/Recaptcha/RecaptchaVerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class RecaptchaVerifier
private const GOOGLE_DEFAULT_INPUT = 'g-recaptcha-response';

public function __construct(
private ReCaptcha $reCaptcha,
private RequestStack $requestStack,
private bool $enabled = true,
private readonly ReCaptcha $reCaptcha,
private readonly RequestStack $requestStack,
private readonly bool $enabled = true,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Validator/Constraints/Recaptcha2Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

final class Recaptcha2Validator extends ConstraintValidator
{
public function __construct(private RecaptchaVerifier $verifier)
public function __construct(private readonly RecaptchaVerifier $verifier)
{
}

Expand Down

0 comments on commit 18c86f7

Please sign in to comment.