----- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line src/Controller/OpenIDConnectRedirectController.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
162 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
172 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
188 Call to deprecated constant USER_REGISTER_ADMINISTRATORS_ONLY: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_ADMINISTRATORS_ONLY instead.
189 Call to deprecated constant USER_REGISTER_VISITORS: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\user\UserInterface::REGISTER_VISITORS instead.
193 Call to deprecated constant USER_REGISTER_ADMINISTRATORS_ONLY: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_ADMINISTRATORS_ONLY instead.
194 Call to deprecated constant USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL instead.
200 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
208 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
211 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Form/OpenIDConnectAccountsForm.php
------ ----------------------------------------------------------------------
196 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
201 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line src/OpenIDConnect.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
331 Call to deprecated constant USER_REGISTER_ADMINISTRATORS_ONLY: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_ADMINISTRATORS_ONLY instead.
332 Call to deprecated constant USER_REGISTER_VISITORS: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\user\UserInterface::REGISTER_VISITORS instead.
337 Call to deprecated constant USER_REGISTER_ADMINISTRATORS_ONLY: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_ADMINISTRATORS_ONLY instead.
342 Call to deprecated constant USER_REGISTER_VISITORS: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\user\UserInterface::REGISTER_VISITORS instead.
348 Call to deprecated constant USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal\user\UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL instead.
685 Call to deprecated function drupal_basename():
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystem::basename().
690 Call to deprecated constant FILE_EXISTS_RENAME: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Core\File\FileSystemInterface::EXISTS_RENAME.
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------------------------------------------------------------------
Line src/Plugin/OpenIDConnectClientBase.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------
302 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
------ -----------------------------------------------------------------------------------------------------------------------------------------------

------ -------------------------------------------------------------------------------------------------------------------------------------------------------
Line src/Plugin/OpenIDConnectClientInterface.php
------ -------------------------------------------------------------------------------------------------------------------------------------------------------
12 Interface Drupal\openid_connect\Plugin\OpenIDConnectClientInterface extends deprecated interface Drupal\Component\Plugin\ConfigurablePluginInterface:
Drupal\Component\Plugin\ConfigurablePluginInterface is deprecated
in Drupal 8.7.0 and will be removed before Drupal 9.0.0. You should implement
ConfigurableInterface and/or DependentPluginInterface directly as needed. If
you implement ConfigurableInterface you may choose to implement
ConfigurablePluginInterface in Drupal 8 as well for maximum compatibility,
however this must be removed prior to Drupal 9.
------ -------------------------------------------------------------------------------------------------------------------------------------------------------

------ -------------------------------------------------------------------------------------------------------------------------
Line src/Tests/OpenIDConnectSettingsFormTest.php
------ -------------------------------------------------------------------------------------------------------------------------
12 Class Drupal\openid_connect\Tests\OpenIDConnectSettingsFormTest extends deprecated class Drupal\simpletest\WebTestBase:
in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
32 Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
------ -------------------------------------------------------------------------------------------------------------------------

  • Simpletest has been replaced with phpunit test
  • required versions in composer.json and info.yml

Comments

sleitner created an issue. See original summary.

Status: Needs review » Needs work

The last submitted patch, openid_connect_drupal9.patch, failed testing. View results

sleitner’s picture

Status: Needs work » Needs review
StatusFileSize
new13.28 KB

Test got lost when creating the patch, next try

didebru’s picture

+++ b/src/Controller/OpenIDConnectRedirectController.php
@@ -159,7 +161,7 @@ class OpenIDConnectRedirectController extends ControllerBase implements AccessIn
+        MessengerInterface::addMessage($this->t('Logging in with @provider has been canceled.', $provider_param), 'warning');

Would it be possible to Inject the messanger service instead of call it static like in patch from https://www.drupal.org/project/openid_connect/issues/2961752?

solideogloria’s picture

StatusFileSize
new12.43 KB

I made the changes following the linked issue. Please review.

didebru’s picture

Looks good to me but why did you remove the Test?

solideogloria’s picture

I didn't knowingly remove anything. I don't see the existence of such a file in the revision history on my local clone of the repo, and my commit history doesn't show that I removed a file. Feel free to fix it with a new patch.

sleitner’s picture

Assigned: Unassigned » sleitner
sleitner’s picture

Assigned: sleitner » Unassigned
StatusFileSize
new27.04 KB

Messenger service injection and a couple of drupalcheck -a and phpcs errors removed:

------ --------------------------------------------------------------------------------------------------------------------------- 
  Line   openid_connect.module                                                                                                      
 ------ --------------------------------------------------------------------------------------------------------------------------- 
  21     Call to static method fromRoute() on an unknown class Url.                                                                 
  150    PHPDoc tag @param for parameter $account with type Drupal\user\UserInterface is not subtype of native type UserInterface.  
  150    Parameter $account of function openid_connect_save_userinfo() has invalid typehint type UserInterface.                     
  165    PHPDoc tag @param for parameter $account with type Drupal\user\UserInterface is not subtype of native type UserInterface.  
  165    Parameter $account of function openid_connect_login_user() has invalid typehint type UserInterface.                        
  348    PHPDoc tag @param has invalid value (string|array &$destination                                                            
         The path to redirect to after authorization.): Unexpected token "&", expected variable at offset 241                       
 ------ --------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  Line   src/Controller/OpenIDConnectRedirectController.php                                                                                                          
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  77     Property Drupal\openid_connect\Controller\OpenIDConnectRedirectController::$currentUser (Drupal\Core\Session\AccountProxy) does not accept                  
         Drupal\Core\Session\AccountInterface.                                                                                                                       
  84     Unsafe usage of new static().                                                                                                                               
         💡 Consider making the class or the constructor final.                                                                                                       
  106    Method Drupal\openid_connect\Controller\OpenIDConnectRedirectController::access() should return bool but returns Drupal\Core\Access\AccessResultAllowed.    
  108    Method Drupal\openid_connect\Controller\OpenIDConnectRedirectController::access() should return bool but returns Drupal\Core\Access\AccessResultForbidden.  
  146    Negated boolean expression is always false.                                                                                                                 
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------- 
  Line   src/Form/OpenIDConnectAccountsForm.php                 
 ------ ------------------------------------------------------- 
  105    Unsafe usage of new static().                          
         💡 Consider making the class or the constructor final.  
 ------ ------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/Form/OpenIDConnectLoginForm.php                    
 ------ ------------------------------------------------------- 
  65     Unsafe usage of new static().                          
         💡 Consider making the class or the constructor final.  
 ------ ------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Form/OpenIDConnectSettingsForm.php                                                                                                 
 ------ --------------------------------------------------------------------------------------------------------------------------------------- 
  82     Property Drupal\openid_connect\Form\OpenIDConnectSettingsForm::$entityFieldManager (Drupal\Core\Entity\EntityManager) does not accept  
         Drupal\Core\Entity\EntityFieldManagerInterface.                                                                                        
  90     Unsafe usage of new static().                                                                                                          
         💡 Consider making the class or the constructor final.                                                                                  
  194    Call to deprecated method getFieldDefinitions() of class Drupal\Core\Entity\EntityManager:                                             
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                                                                      
         Use \Drupal\Core\Entity\EntityFieldManagerInterface::getFieldDefinitions()                                                             
         instead.                                                                                                                               
 ------ --------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/OpenIDConnect.php                                                                                                                                  
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------- 
  81     Property Drupal\openid_connect\OpenIDConnect::$moduleHandler has unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler as its type.  
  88     Property Drupal\openid_connect\OpenIDConnect::$emailValidator has unknown class Egulias\EmailValidator\EmailValidatorInterface as its type.            
  95     Property Drupal\openid_connect\OpenIDConnect::$logger has unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface as its type.   
  121    PHPDoc tag @param for parameter $email_validator with type Egulias\EmailValidator\EmailValidatorInterface is not subtype of native type                
         Drupal\Component\Utility\EmailValidatorInterface.                                                                                                      
  128    Parameter $email_validator of method Drupal\openid_connect\OpenIDConnect::__construct() has invalid typehint type                                      
         Egulias\EmailValidator\EmailValidatorInterface.                                                                                                        
  139    Property Drupal\openid_connect\OpenIDConnect::$emailValidator (Egulias\EmailValidator\EmailValidatorInterface) does not accept                         
         Drupal\Component\Utility\EmailValidatorInterface.                                                                                                      
  141    Property Drupal\openid_connect\OpenIDConnect::$moduleHandler (Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler) does not accept               
         Drupal\Core\Extension\ModuleHandler.                                                                                                                   
  142    Property Drupal\openid_connect\OpenIDConnect::$logger (Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface) does not accept                
         Drupal\Core\Logger\LoggerChannelInterface.                                                                                                             
  172    Call to method alter() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                                  
  175    Call to method alterDeprecated() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                        
  224    PHPDoc tag @param has invalid value (string|array &$destination                                                                                        
         The path to redirect to after authorization.): Unexpected token "&", expected variable at offset 314                                                   
  237    Call to method alter() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                                  
  242    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  250    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  263    Call to method invokeAll() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                              
  272    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  300    Call to method isValid() on an unknown class Egulias\EmailValidator\EmailValidatorInterface.                                                           
  373    Cannot call method isBlocked() on bool|object.                                                                                                         
  376    Cannot call method getAccountName() on bool|object.                                                                                                    
  391    Call to method invokeAll() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                              
  428    Call to method alter() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                                  
  437    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  445    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  458    Call to method invokeAll() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                              
  467    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  479    Cannot call method id() on object|true.                                                                                                                
  508    Call to method invokeAll() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                              
  669    Call to method alter() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                                  
  687    Static call to instance method Drupal\Core\File\FileSystem::basename().                                                                                
  712    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  724    Call to method error() on an unknown class Drupal\openid_connect\Drupal\Core\Logger\LoggerChannelInterface.                                            
  737    Call to method invokeAll() on an unknown class Drupal\openid_connect\Drupal\Core\Extension\ModuleHandler.                                              
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/OpenIDConnectClaims.php                            
 ------ ------------------------------------------------------- 
  61     Unsafe usage of new static().                          
         💡 Consider making the class or the constructor final.  
 ------ ------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/Plugin/Block/OpenIDConnectLoginBlock.php           
 ------ ------------------------------------------------------- 
  69     Unsafe usage of new static().                          
         💡 Consider making the class or the constructor final.  
 ------ ------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/OpenIDConnectClient/OpenIDConnectFacebookClient.php                                                                              
 ------ -------------------------------------------------------------------------------------------------------------------------------------------- 
  92     Method Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectFacebookClient::decodeIdToken() should return array but returns null.  
 ------ -------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------------------------ 
  Line   src/Plugin/OpenIDConnectClient/OpenIDConnectGithubClient.php                                                                              
 ------ ------------------------------------------------------------------------------------------------------------------------------------------ 
  75     Method Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectGithubClient::decodeIdToken() should return array but returns null.  
  92     Call to an undefined method GuzzleHttp\ClientInterface::get().                                                                            
  115    Call to an undefined method GuzzleHttp\ClientInterface::get().                                                                            
  128    Variable $claims might not be defined.                                                                                                    
 ------ ------------------------------------------------------------------------------------------------------------------------------------------ 

 ------ -------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/OpenIDConnectClient/OpenIDConnectLinkedinClient.php                                                                              
 ------ -------------------------------------------------------------------------------------------------------------------------------------------- 
  57     Method Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectLinkedinClient::decodeIdToken() should return array but returns null.  
  69     Offset 'pictureUrl' does not exist on array('sub' => mixed).                                                                                
  71     Cannot unset offset 'emailAddress' on array('sub' => mixed, 'picture' => mixed).                                                            
  71     Cannot unset offset 'id' on array('sub' => mixed, 'picture' => mixed).                                                                      
  71     Cannot unset offset 'pictureUrl' on array('sub' => mixed, 'picture' => mixed).                                                              
 ------ -------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------- 
  Line   src/Plugin/OpenIDConnectClientBase.php                           
 ------ ----------------------------------------------------------------- 
  92     Unsafe usage of new static().                                    
         💡 Consider making the class or the constructor final.            
  293    Call to an undefined method GuzzleHttp\ClientInterface::post().  
  352    Call to an undefined method GuzzleHttp\ClientInterface::get().   
 ------ ----------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/src/Unit/OpenIDConnectAuthmapTest.php                                                                                 
 ------ ---------------------------------------------------------------------------------------------------------------------------- 
         Class OpenIDConnectAuthmapTest was not found while trying to analyse it - autoloading is probably not configured properly.  
         💡 Learn more at https://phpstan.org/user-guide/autoloading                                                                  
 ------ ---------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/src/Unit/OpenIDConnectStateTokenTest.php                                                                                 
 ------ ------------------------------------------------------------------------------------------------------------------------------- 
         Class OpenIDConnectStateTokenTest was not found while trying to analyse it - autoloading is probably not configured properly.  
         💡 Learn more at https://phpstan.org/user-guide/autoloading                                                                     
 ------ ------------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------ 
  Line   tests/src/Unit/OpenIdConnectClaimsTest.php                                                                                                            
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------ 
         Class Drupal\openid_connect\Unit\OpenIdConnectClaimsTest was not found while trying to analyse it - autoloading is probably not configured properly.  
         💡 Learn more at https://phpstan.org/user-guide/autoloading                                                                                            
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------ 

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/src/Unit/OpenIdConnectSessionTest.php                                                                                                             
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- 
         Class Drupal\openid_connect\tests\OpenIdConnectSessionTest was not found while trying to analyse it - autoloading is probably not configured properly.  
         💡 Learn more at https://phpstan.org/user-guide/autoloading                                                                                              
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/drupal8_test/htdocs/web/modules/contrib/openid_connect/src/Plugin/OpenIDConnectClientInterface.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 70 | ERROR | [x] Expected "array|null" but found "array|NULL" for function return type
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------


FILE: /var/www/drupal8_test/htdocs/web/modules/contrib/openid_connect/src/OpenIDConnect.php
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------
   9 | WARNING | [x] Unused use statement
 130 | ERROR   | [ ] Expected type hint "EmailValidator"; found "EmailValidatorInterface" for $email_validator
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------


FILE: /var/www/drupal8_test/htdocs/web/modules/contrib/openid_connect/src/Form/OpenIDConnectAccountsForm.php
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 10 | WARNING | [x] Unused use statement
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: /var/www/drupal8_test/htdocs/web/modules/contrib/openid_connect/src/Controller/OpenIDConnectRedirectController.php
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
  8 | WARNING | [x] Unused use statement
 10 | WARNING | [x] Unused use statement
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
shamsher_alam’s picture

Status: Needs review » Needs work

Not working with Open_id_AD

Error: Call to undefined method Drupal\openid_connect_windows_aad\Plugin\OpenIDConnectClient\WindowsAad::isEmpty() in Drupal\openid_connect\Controller\OpenIDConnectRedirectController->authenticate() (line 148 of /mnt/www/html/nestledsu201live/docroot/modules/contrib/openid_connect/src/Controller/OpenIDConnectRedirectController.php)

#0 [internal function]: Drupal\openid_connect\Controller\OpenIDConnectRedirectController->authenticate('windows_aad')
#1 /mnt/www/html/nestledsu201live/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#2 /mnt/www/html/nestledsu201live/docroot/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#3 /mnt/www/html/nestledsu201live/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#4 /mnt/www/html/nestledsu201live/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#5 /mnt/www/html/nestledsu201live/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#6 /mnt/www/html/nestledsu201live/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#7 /mnt/www/html/nestledsu201live/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel

sleitner’s picture

Status: Needs work » Needs review
StatusFileSize
new27.04 KB
solideogloria’s picture

I didn't know what this error meant:

Unsafe usage of new static().
💡 Consider making the class or the constructor final.

Here's why: https://github.com/timber/timber/pull/2203#issuecomment-591332533

sleitner’s picture

@solideogloria: I think this a recommendation. In core "new static(" is always used without making the class or the constructor final.

shamsher_alam’s picture

Status: Needs review » Needs work

I have tried latest patch but still not working.

#0 [internal function]: Drupal\openid_connect\Controller\OpenIDConnectRedirectController->authenticate('windows_aad')
#1 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#2 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#3 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#4 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#5 /mnt/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#6 /mnt/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#7 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#8 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#9 /mnt/www/html/drupal/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#10 /mnt/www/html/drupal/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#11 /mnt/www/html/drupal/docroot/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /mnt/www/html/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /mnt/www/html/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /mnt/www/html/drupal/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#17 {main}

sleitner’s picture

Status: Needs work » Needs review
StatusFileSize
new26.64 KB
jcnventura’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Drupal 9 porting weekend

Worked just fine on a Drupal 9 site now.

solideogloria’s picture

jcnventura’s picture

Status: Reviewed & tested by the community » Needs work

Actually, maybe would be better to remove that duplicate drupal/core requirement in composer.json. Less stuff to maintain and keep in sync.

Drupal.org's packagist will fill that composer.json information from the .info.yml file.

munish.kumar’s picture

Assigned: Unassigned » munish.kumar
munish.kumar’s picture

Assigned: munish.kumar » Unassigned
Status: Needs work » Needs review
StatusFileSize
new26.31 KB
munish.kumar’s picture

StatusFileSize
new28.14 KB
new3.63 KB

Ignore the previous patch, This is the updated patch which addresses the #18 changes.

jcnventura’s picture

Status: Needs review » Needs work

The drupal/core requirement should be removed from composer.json.

mrinalini9’s picture

Assigned: Unassigned » mrinalini9
mrinalini9’s picture

Assigned: mrinalini9 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new26.7 KB
new3.59 KB

Removed drupal/core requirement from composer.json, please review.

pfrilling’s picture

Assigned: Unassigned » pfrilling
pfrilling’s picture

StatusFileSize
new33.06 KB
new6.9 KB

Thanks for the patches everyone! I made a few minor adjustments from #24, mainly updating the unit tests to reflect the changes.

pfrilling’s picture

StatusFileSize
new33.2 KB
new368 bytes

Ignore the patch in #26. This one should pass testing.

fabianderijk’s picture

I've tested the patch and everything seems to work fine. If it depended on me, this issue status can be moved to RTBC.

tomvv’s picture

Patch works, RTBC

sanduhrs’s picture

StatusFileSize
new32.91 KB

Reroll against latest HEAD.

jcnventura’s picture

Status: Needs review » Needs work

@sleitner added in #9 a lot of unnecessary $client->get|post to $client->request changes that make the patch a lot bigger than it truly needs to be. Even if that were a desired change (which it isn't), it should be in it's own issue, as it clearly is not a D9 deprecation.

And people, please create interdiffs!!

jcnventura’s picture

StatusFileSize
new3.3 KB
new30.9 KB

Let's see if tests still pass. If they do, I'll commit this based on #28 and #29.

jcnventura’s picture

Status: Needs work » Needs review
jcnventura’s picture

Related issues: +#3153515: Survive changes to OpenIDClientBase constructor
StatusFileSize
new968 bytes
new30.94 KB

Before committing this, I noticed that we're changing the API of OpenIDConnectClientBase::__construct() by adding a new parameter. This would break all other OpenIDConnectClients out there. I'm making the new parameter to the constructor optional, at the expense of breaking pure DI if that parameter is not provided.

Plugins should instead follow the pattern specified here: https://www.previousnext.com.au/blog/safely-extending-drupal-8-plugin-cl...

fabianderijk’s picture

@jcventura, I noticed this as well. Thanks for the optional parameter!

  • jcnventura authored d9d18c7 on 8.x-1.x
    Issue #3112173 by sleitner, jcnventura, pfrilling, munish.kumar,...
jcnventura’s picture

Status: Needs review » Fixed

Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.