Skip to content

Commit

Permalink
Merge pull request #1833 from stloyd/bugfix/sf-54
Browse files Browse the repository at this point in the history
Bugfix | Symfony 5.4 problems
  • Loading branch information
stloyd authored Dec 7, 2021
2 parents 48057af + a69991d commit 26a3433
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ jobs:
stability: 'stable'
- php: '8.0'
symfony-require: '5.4.*'
stability: 'dev'
dependencies: 'highest'
fail-fast: false
steps:
Expand Down
5 changes: 1 addition & 4 deletions DependencyInjection/HWIOAuthExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ public function createResourceOwnerService(ContainerBuilder $container, $name, a
$container->setDefinition('hwi_oauth.resource_owner.'.$name, $definition);
}

/**
* @return string
*/
public function getAlias()
public function getAlias(): string
{
return 'hwi_oauth';
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Installation

All the installation instructions are located in the documentation, check it for a specific version:

* [__2.0__](https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/1-setting_up_the_bundle.md) (upcoming) - with support for Symfony: `^4.4` & `^5.3` (PHP: `^7.3` & `^8.0`),
* [__2.0__](https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/1-setting_up_the_bundle.md) (upcoming) - with support for Symfony: `^4.4`, `^5.4` & `^6.0` (PHP: `^7.4`, `^8.0`),

* [__1.4__](https://github.com/hwi/HWIOAuthBundle/blob/1.4/Resources/doc/1-setting_up_the_bundle.md) (current) - with support for Symfony: `^4.4` & `^5.1` (PHP: `^7.3` & `^8.0`),

Expand Down
5 changes: 2 additions & 3 deletions Security/Core/Authentication/Token/AbstractOAuthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ public function __construct($accessToken, array $roles = [])

// Workaround for: Method "AbstractToken::setAuthenticated()" is deprecated
if (Kernel::VERSION_ID > 50399) {
// @phpstan-ignore-next-line
parent::setAuthenticated(\count($roles) > 0, false);
$this->setAuthenticated(\count($roles) > 0, false);
} else {
parent::setAuthenticated(\count($roles) > 0);
$this->setAuthenticated(\count($roles) > 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Security/Core/Exception/AccountNotLinkedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __unserialize(array $data): void
/**
* {@inheritdoc}
*/
public function getMessageKey()
public function getMessageKey(): string
{
return 'Account could not be linked correctly.';
}
Expand Down
12 changes: 12 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,18 @@
},

"conflict": {
"symfony/cache": "^6.0",
"symfony/config": "^6.0",
"symfony/dependency-injection": "^6.0",
"symfony/doctrine-bridge": "^6.0",
"symfony/error-handler": "^6.0",
"symfony/http-foundation": "^6.0",
"symfony/password-hasher": "^6.0",
"symfony/property-info": "^6.0",
"symfony/security-core": "^6.0",
"symfony/security-http": "^6.0",
"symfony/security-csrf": "^6.0",
"symfony/twig-bridge": "^6.0",
"twig/twig": "<1.34"
},

Expand Down

0 comments on commit 26a3433

Please sign in to comment.