Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Symfony 6.4 LTS #3

Merged
merged 7 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/phpcsfixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: PHPCSFixer with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -29,7 +29,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: PHPStan with ${{ matrix.php-versions }} on ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -29,7 +29,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,39 @@ on:

jobs:
phpunit:
runs-on: ${{ matrix.operating-system }}
runs-on: ubuntu-latest

strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.2", "8.3"]
include:
- php-version: "8.2"
dependency-version: "--prefer-lowest"
symfony-version: "6.4"

name: PHPUnit with ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
- php-version: "8.3"
dependency-version: "--prefer-lowest"
symfony-version: "6.4"

- php-version: "8.2"
dependency-version: ""
symfony-version: "7.x"

- php-version: "8.3"
dependency-version: ""
symfony-version: "7.x"

name: PHPUnit with PHP ${{ matrix.php-version }} (Symfony ${{ matrix.symfony-version }})

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

###> Composer ###
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
php-version: ${{ matrix.php-version }}

- name: Install Composer dependencies
run: composer install -q --prefer-dist
###< Composer ###
run: composer update ${{ matrix.dependency-version }}

- name: Run PHPUnit
run: $GITHUB_WORKSPACE/vendor/bin/phpunit
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
],
"require": {
"php": "^8.2",
"scheb/2fa-bundle": "^7.2",
"symfony/framework-bundle": "^7.0",
"symfony/clock": "^7.0"
"scheb/2fa-bundle": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/clock": "^6.4 || ^7.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.23",
"phpunit/phpunit": "^10.5",
"phpstan/phpstan": "^1.10",
"symfony/mailer": "^7.0",
"symfony/yaml": "^7.0"
"symfony/mailer": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/AuthCodeProvider/AuthCodeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function __construct(
private readonly AuthCodeGeneratorInterface $authCodeGenerator,
private readonly AuthCodeMailerInterface $mailer,
private readonly ClockInterface $clock,
private readonly string|null $expiresAfter = null,
private readonly ?string $expiresAfter = null,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Mailer/SymfonyAuthCodeEmailGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

final class SymfonyAuthCodeEmailGenerator implements AuthCodeEmailGeneratorInterface
{
private Address|string|null $senderAddress;
private Address|string|null $senderAddress = null;

public function __construct(
private readonly string $subject,
private readonly string $textBody,
string|null $senderEmail,
?string $senderEmail,
?string $senderName = null,
) {
if (null !== $senderEmail && null !== $senderName) {
Expand Down
4 changes: 2 additions & 2 deletions src/Model/TwoFactorEmailInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function getEmailAuthRecipient(): string;
/**
* The authentication code.
*/
public function getEmailAuthCode(): string|null;
public function getEmailAuthCode(): ?string;

/**
* Set the authentication code.
Expand All @@ -27,7 +27,7 @@ public function setEmailAuthCode(string $authCode): void;
/**
* Timestamp of when the authentication code will expire.
*/
public function getEmailAuthCodeExpiresAt(): \DateTimeImmutable|null;
public function getEmailAuthCodeExpiresAt(): ?\DateTimeImmutable;

/**
* Set the timestamp of when the authentication code will expire.
Expand Down