Skip to content

fix : Unit Tests #200

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

Merged
merged 10 commits into from
May 13, 2025
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,4 @@ Please do not report security vulnerabilities on the public Github issue tracker

<p align="center">Auth0 is an easy to implement, adaptable authentication and authorization platform.<br />To learn more checkout <a href="https://auth0.com/why-auth0">Why Auth0?</a></p>

<p align="center">This project is licensed under the MIT license. See the <a href="./LICENSE"> LICENSE</a> file for more info.</p>
<p align="center">This project is licensed under the MIT license. See the <a href="./LICENSE"> LICENSE</a> file for more info.</p>
6 changes: 6 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ parameters:
-
message: '#Parameter \#1 \$object of function method_exists expects object\|string, Psr\\Http\\Client\\ClientInterface\|null given.#'
path: src\Utility\HttpRequest.php
-
message: '#Method Auth0\\Symfony\\Models\\User::getUserIdentifier\(\) should return non-empty-string but returns string.#'
path: src\Models\User.php
-
message: "#^Method Auth0\\\\Symfony\\\\Models\\\\User::getUserIdentifier\\(\\) should return non-empty-string but returns ''\\.$#"
path: src\Models\User.php

reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: false
11 changes: 11 additions & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</projectFiles>

<issueHandlers>
<MoreSpecificReturnType errorLevel="suppress" />
<InvalidStringClass errorLevel="suppress" />
<MixedArgument errorLevel="suppress" />
<MixedArgumentTypeCoercion errorLevel="suppress" />
Expand All @@ -29,5 +30,15 @@
<referencedProperty name="Symfony\Bundle\FrameworkBundle\Controller\AbstractController::$container" /> <!-- Injected by Symfony DI via setContainer() because marked as #[Required] -->
</errorLevel>
</PropertyNotSetInConstructor>
<InvalidReturnStatement>
<errorLevel type="suppress">
<file name="src/Models/User.php" />
</errorLevel>
</InvalidReturnStatement>
<LessSpecificReturnStatement>
<errorLevel type="suppress">
<file name="src/Models/User.php" />
</errorLevel>
</LessSpecificReturnStatement>
</issueHandlers>
</psalm>
2 changes: 1 addition & 1 deletion src/Auth0Bundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\{RequestFactoryInterface, ResponseFactoryInterface, StreamFactoryInterface};
use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\DependencyInjection\{ContainerBuilder, Reference};
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;

final class Auth0Bundle extends AbstractBundle implements BundleInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Stores/SessionStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Auth0\SDK\Contract\StoreInterface;
use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpFoundation\{Request, RequestStack};
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Throwable;

use function gettype;
Expand Down