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

fix(tests): deprecate warning in Symfony 5.4 for setAuthenticated #847

Merged
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f8fc4de
fix(tests): deprecate warning in Symfony 5.4 for setAuthenticated
shakaran May 27, 2024
abc5d8c
fix: error with phpstan with Parameter #2 of function preg_replace_c…
shakaran Jun 3, 2024
ac6b793
fix: since PHPUnit 8 filters config changed by whitelist/blacklist
shakaran Jun 3, 2024
26af81b
fix: use global namespace for is_string
shakaran Jun 3, 2024
98b1b4c
fix: handle non scalar values
shakaran Jun 3, 2024
de9b825
fix: remove warning configuration option is deprecated
shakaran Jun 3, 2024
8be62f0
fix: php-cs-fixer warnings
shakaran Jun 3, 2024
ef568e5
feat: add load of config file for 5.4 deprecations
shakaran Jun 3, 2024
f356da0
fix: allow equals to 5.4 version for authenticated
shakaran Jun 3, 2024
2a0b841
fix: adjust kernel version to only 5.4 load
shakaran Jun 3, 2024
06cca8c
fix: improve condition check 5.4 to 6.0
shakaran Jun 3, 2024
7673f2b
fix: authenticathed for non guard versions of symfony
shakaran Jun 3, 2024
0d9bc2f
fix: remove strong typed params for PHP 7.x version
shakaran Jun 3, 2024
9299180
fix: wrong condition inverse
shakaran Jun 3, 2024
f8e50a8
fix: phpstan warning for authentication
shakaran Jun 3, 2024
7533b6f
fix: implement a legacy version token stub for Symfony 4.x
shakaran Jun 3, 2024
f9e70f0
fix: php-cs-fixer warnings
shakaran Jun 3, 2024
1331c1a
fix: phpstan ignore lines
shakaran Jun 3, 2024
69a7df9
fix: more phpstan warnings and errors
shakaran Jun 3, 2024
7057406
fix: typo php-cs-fixer
shakaran Jun 3, 2024
f8e95f2
fix: improve pcov test with invalid values
shakaran Jun 3, 2024
8e85a9c
fix: check for symfony/messenger class present for autoload config
shakaran Jun 3, 2024
cdc72c9
fix: typo blank line php-cs-fixer
shakaran Jun 3, 2024
91f0809
Merge branch 'master' into fix/deprecated-warning-authenticated
cleptric Jun 4, 2024
832bfe5
fix: generate new baseline
shakaran Jun 4, 2024
b5f07ac
Revert "fix: generate new baseline"
shakaran Jun 4, 2024
3af4261
Merge branch 'master' into fix/deprecated-warning-authenticated
shakaran Jun 4, 2024
d56b138
Merge branch 'master' into fix/deprecated-warning-authenticated
stayallive Jun 4, 2024
51af755
fix: add more ignore error to phpstan
shakaran Jun 4, 2024
7c72979
fix: add ignore errors to baseline
shakaran Jun 4, 2024
338c16a
fix: get rid of report unmatched ignored errors by default
shakaran Jun 4, 2024
eecd3b2
fix: update removing from baseline
shakaran Jun 4, 2024
3938fd5
fix: remove more unmatched
shakaran Jun 4, 2024
dbe9792
fix: remove last one unmatched
shakaran Jun 4, 2024
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
Prev Previous commit
Next Next commit
fix: generate new baseline
  • Loading branch information
shakaran committed Jun 4, 2024
commit 832bfe577d769ba7db067fb8f10983d82950907f
164 changes: 87 additions & 77 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ parameters:
count: 1
path: src/DependencyInjection/SentryExtension.php

-
message: "#^Parameter \\#1 \\$array of function array_filter expects array, mixed given\\.$#"
count: 1
path: src/DependencyInjection/SentryExtension.php

-
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(mixed\\)\\: mixed\\)\\|null, Closure\\(string\\)\\: Symfony\\\\Component\\\\DependencyInjection\\\\Reference given\\.$#"
count: 1
Expand All @@ -95,6 +90,11 @@ parameters:
count: 9
path: src/DependencyInjection/SentryExtension.php

-
message: "#^Parameter \\#1 \\$input of function array_filter expects array, mixed given\\.$#"
count: 1
path: src/DependencyInjection/SentryExtension.php

-
message: "#^Parameter \\#1 \\$integrations of method Sentry\\\\SentryBundle\\\\DependencyInjection\\\\SentryExtension\\:\\:configureIntegrationsOption\\(\\) expects array\\<string\\>, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -171,27 +171,42 @@ parameters:
path: src/EventListener/LoginListener.php

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\KernelEvent\\:\\:isMasterRequest\\(\\)\\.$#"
message: "#^Call to method getWrappedExceptions\\(\\) on an unknown class Symfony\\\\Component\\\\Messenger\\\\Exception\\\\WrappedExceptionsInterface\\.$#"
count: 1
path: src/EventListener/RequestListener.php
path: src/EventListener/MessengerListener.php

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\KernelEvent\\:\\:isMasterRequest\\(\\)\\.$#"
message: "#^Class Symfony\\\\Component\\\\Messenger\\\\Exception\\\\WrappedExceptionsInterface not found\\.$#"
count: 1
path: src/EventListener/SubRequestListener.php
path: src/EventListener/MessengerListener.php

-
message: "#^Parameter \\#1 \\$driver of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverMiddleware\\:\\:wrap\\(\\) expects Doctrine\\\\DBAL\\\\Driver, mixed given\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/ConnectionConfigurator.php

-
message: "#^Class Doctrine\\\\DBAL\\\\Platforms\\\\SQLitePlatform not found\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionFactoryForV4.php

-
message: "#^Anonymous function never returns string so it can be removed from the return type\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Call to an undefined method Doctrine\\\\DBAL\\\\Driver\\\\Connection\\:\\:getServerVersion\\(\\)\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionForV4\\:\\:errorInfo\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionForV4\\:\\:exec\\(\\) should return int\\|numeric\\-string but returns int\\|string\\.$#"
message: "#^Method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionForV4\\:\\:lastInsertId\\(\\) should return int\\|string but returns int\\|string\\|false\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

Expand All @@ -205,6 +220,11 @@ parameters:
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionForV4\\:\\:quote\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Parameter \\#1 \\$sql of method Doctrine\\\\DBAL\\\\Driver\\\\Connection\\:\\:query\\(\\) expects string, string\\|null given\\.$#"
count: 1
Expand All @@ -215,6 +235,46 @@ parameters:
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Return type \\(void\\) of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionForV4\\:\\:beginTransaction\\(\\) should be compatible with return type \\(bool\\) of method Doctrine\\\\DBAL\\\\Driver\\\\Connection\\:\\:beginTransaction\\(\\)$#"
count: 2
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Return type \\(void\\) of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionForV4\\:\\:commit\\(\\) should be compatible with return type \\(bool\\) of method Doctrine\\\\DBAL\\\\Driver\\\\Connection\\:\\:commit\\(\\)$#"
count: 2
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Return type \\(void\\) of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionForV4\\:\\:rollBack\\(\\) should be compatible with return type \\(bool\\) of method Doctrine\\\\DBAL\\\\Driver\\\\Connection\\:\\:rollBack\\(\\)$#"
count: 2
path: src/Tracing/Doctrine/DBAL/TracingDriverConnectionForV4.php

-
message: "#^Call to an undefined method Doctrine\\\\DBAL\\\\Driver\\\\Connection\\:\\:getServerVersion\\(\\)\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverForV4.php

-
message: "#^Instantiated class Doctrine\\\\DBAL\\\\Connection\\\\StaticServerVersionProvider not found\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverForV4.php

-
message: "#^Method Doctrine\\\\DBAL\\\\Driver\\\\Middleware\\\\AbstractDriverMiddleware\\:\\:getDatabasePlatform\\(\\) invoked with 1 parameter, 0 required\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingDriverForV4.php

-
message: "#^Parameter \\#2 \\$callback of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\AbstractTracingStatement\\:\\:traceFunction\\(\\) expects callable\\(mixed \\.\\.\\.\\)\\: Doctrine\\\\DBAL\\\\Driver\\\\Result, array\\{Doctrine\\\\DBAL\\\\Driver\\\\Statement, 'execute'\\} given\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingStatementForV4.php

-
message: "#^Parameter \\#3 \\$type of method Doctrine\\\\DBAL\\\\Driver\\\\Statement\\:\\:bindValue\\(\\) expects int, Doctrine\\\\DBAL\\\\ParameterType given\\.$#"
count: 1
path: src/Tracing/Doctrine/DBAL/TracingStatementForV4.php

-
message: "#^Method Sentry\\\\SentryBundle\\\\Tracing\\\\HttpClient\\\\AbstractTraceableHttpClient\\:\\:request\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -255,16 +315,6 @@ parameters:
count: 1
path: tests/DependencyInjection/ConfigurationTest.php

-
message: "#^Function Symfony\\\\Component\\\\DependencyInjection\\\\Loader\\\\Configurator\\\\ref not found\\.$#"
count: 1
path: tests/DependencyInjection/Fixtures/php/release_option_fallback_to_env_var.php

-
message: "#^Used function Symfony\\\\Component\\\\DependencyInjection\\\\Loader\\\\Configurator\\\\ref not found\\.$#"
count: 1
path: tests/DependencyInjection/Fixtures/php/release_option_fallback_to_env_var.php

-
message: "#^Cannot access offset 'dsn' on mixed\\.$#"
count: 1
Expand All @@ -285,70 +335,15 @@ parameters:
count: 1
path: tests/End2End/TracingEnd2EndTest.php

-
message: "#^Access to undefined constant Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:\\:MASTER_REQUEST\\.$#"
count: 1
path: tests/EventListener/ErrorListenerTest.php

-
message: "#^Access to undefined constant Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:\\:MASTER_REQUEST\\.$#"
count: 2
path: tests/EventListener/LoginListenerTest.php

-
message: "#^Call to function method_exists\\(\\) with \\$this\\(Sentry\\\\SentryBundle\\\\Tests\\\\EventListener\\\\AuthenticatedTokenStub\\) and 'setAuthenticated' will always evaluate to false\\.$#"
count: 1
path: tests/EventListener/LoginListenerTest.php

-
message: "#^Parameter \\#1 \\$user of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\AbstractToken\\:\\:setUser\\(\\) expects Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface, string\\|Stringable\\|Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface given\\.$#"
count: 1
path: tests/EventListener/LoginListenerTest.php

-
message: "#^Parameter \\#2 \\$firewallName of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\SwitchUserToken constructor expects string, null given\\.$#"
count: 1
path: tests/EventListener/LoginListenerTest.php

-
message: "#^Parameter \\#3 \\$roles of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\SwitchUserToken constructor expects array\\<string\\>, string given\\.$#"
count: 1
path: tests/EventListener/LoginListenerTest.php

-
message: "#^Parameter \\#4 \\$originalToken of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\SwitchUserToken constructor expects Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface, array\\<int, string\\> given\\.$#"
message: "#^Class Symfony\\\\Component\\\\Messenger\\\\Exception\\\\DelayedMessageHandlingException constructor invoked with 2 parameters, 1 required\\.$#"
count: 1
path: tests/EventListener/LoginListenerTest.php

-
message: "#^Parameter \\#5 \\$originatedFromUri of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\SwitchUserToken constructor expects string\\|null, Sentry\\\\SentryBundle\\\\Tests\\\\EventListener\\\\AuthenticatedTokenStub given\\.$#"
count: 1
path: tests/EventListener/LoginListenerTest.php

-
message: "#^Access to undefined constant Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:\\:MASTER_REQUEST\\.$#"
count: 6
path: tests/EventListener/RequestListenerTest.php

-
message: "#^Access to undefined constant Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:\\:MASTER_REQUEST\\.$#"
count: 2
path: tests/EventListener/SubRequestListenerTest.php

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\KernelEvent\\:\\:isMasterRequest\\(\\)\\.$#"
count: 1
path: tests/EventListener/SubRequestListenerTest.php

-
message: "#^Access to undefined constant Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:\\:MASTER_REQUEST\\.$#"
count: 3
path: tests/EventListener/TracingRequestListenerTest.php

-
message: "#^Access to undefined constant Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:\\:MASTER_REQUEST\\.$#"
count: 2
path: tests/EventListener/TracingSubRequestListenerTest.php
path: tests/EventListener/MessengerListenerTest.php

-
message: "#^Call to an undefined method TCacheAdapter of Symfony\\\\Component\\\\Cache\\\\Adapter\\\\AdapterInterface\\:\\:delete\\(\\)\\.$#"
Expand All @@ -370,6 +365,11 @@ parameters:
count: 1
path: tests/Tracing/Cache/AbstractTraceableCacheAdapterTest.php

-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{foo\\: Symfony\\\\Component\\\\Cache\\\\CacheItem\\} and Traversable\\<string, Symfony\\\\Component\\\\Cache\\\\CacheItem\\> will always evaluate to false\\.$#"
count: 1
path: tests/Tracing/Cache/AbstractTraceableCacheAdapterTest.php

-
message: "#^Parameter \\#1 \\$decoratedAdapter of method Sentry\\\\SentryBundle\\\\Tests\\\\Tracing\\\\Cache\\\\AbstractTraceableCacheAdapterTest\\<TCacheAdapter of Symfony\\\\Component\\\\Cache\\\\Adapter\\\\AdapterInterface,TDecoratedCacheAdapter of Symfony\\\\Component\\\\Cache\\\\Adapter\\\\AdapterInterface\\>\\:\\:createCacheAdapter\\(\\) expects TDecoratedCacheAdapter of Symfony\\\\Component\\\\Cache\\\\Adapter\\\\AdapterInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject&Sentry\\\\SentryBundle\\\\Tests\\\\Tracing\\\\Cache\\\\CacheInterface given\\.$#"
count: 2
Expand All @@ -385,6 +385,11 @@ parameters:
count: 1
path: tests/Tracing/Cache/AbstractTraceableCacheAdapterTest.php

-
message: "#^Class Doctrine\\\\DBAL\\\\Platforms\\\\SQLitePlatform not found\\.$#"
count: 1
path: tests/Tracing/Doctrine/DBAL/TracingDriverConnectionFactoryV4Test.php

-
message: "#^Property Sentry\\\\SentryBundle\\\\Tests\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingDriverConnectionFactoryV4Test\\:\\:\\$databasePlatform is never read, only written\\.$#"
count: 1
Expand All @@ -405,6 +410,11 @@ parameters:
count: 1
path: tests/Tracing/Doctrine/DBAL/TracingDriverMiddlewareTest.php

-
message: "#^Parameter \\#3 \\$type of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\TracingStatementForV4\\:\\:bindValue\\(\\) expects Doctrine\\\\DBAL\\\\ParameterType, int given\\.$#"
count: 1
path: tests/Tracing/Doctrine/DBAL/TracingStatementForV4Test.php

-
message: "#^Parameter \\#1 \\$responses of method Sentry\\\\SentryBundle\\\\Tracing\\\\HttpClient\\\\AbstractTraceableHttpClient\\:\\:stream\\(\\) expects iterable\\<\\(int\\|string\\), Symfony\\\\Contracts\\\\HttpClient\\\\ResponseInterface\\>\\|Symfony\\\\Contracts\\\\HttpClient\\\\ResponseInterface, stdClass given\\.$#"
count: 1
Expand Down
Loading