After running composer up, I'm getting a fatal error:

Fatal error: The class or interface 'SimpleSAML_Auth_Simple' is now using namespaces, please use 'SimpleSAML\Auth\Simple'.'

Here's the update composer made:

- Updating simplesamlphp/simplesamlphp (v1.14.17 => v1.15.2): Downloading (100%)
- Updating drupal/simplesamlphp_auth (3.0.0-rc4 => 3.0.0-rc6): Downloading (100%)

Comments

oknate created an issue. See original summary.

oknate’s picture

Issue summary: View changes
oknate’s picture

Here's an initial patch that fixes the fatal error when viewing the site. I haven't fully tested the changes, such as to the unit test.

oknate’s picture

Title: namespaces issue » namespaces issue, SimpleSAML_Auth_Simple changes to Simple
btully’s picture

Thanks @oknate! Looks good :)

oknate’s picture

Status: Active » Needs review
idebr’s picture

Status: Needs review » Needs work

These changes fixes the issues related to the update from the simplesamlphp library 1.14.17 to 1.15.3. However, these are a few coding standard violations that should be fixed before this is committed:

  1. +++ b/src/Service/SimplesamlphpAuthManager.php
    @@ -46,17 +46,17 @@ class SimplesamlphpAuthManager {
    +   * @param Simple $instance
    

    Data types in @param tags need to be fully namespaced

  2. +++ b/tests/simplesamlphp_auth_test/src/SimplesamlphpAuthTestManager.php
    --- a/tests/src/Unit/Service/SimplesamlphpAuthManagerTest.php
    +++ b/tests/src/Unit/Service/SimplesamlphpAuthManagerTest.php
    
    +++ b/tests/src/Unit/Service/SimplesamlphpAuthManagerTest.php
    @@ -42,7 +42,7 @@ class SimplesamlphpAuthManagerTest extends UnitTestCase {
    +   * @var \Simple|\PHPUnit_Framework_MockObject_MockObject
    

    Undefined class Simple

  3. There are a few stray occurrences of the old classname in the repository:
    - Drupal\simplesamlphp_auth\Service::__construct()
    - Drupal\simplesamlphp_auth_test\SimplesamlphpAuthTestManager::__construct()
oknate’s picture

Thanks for the feedback. Here's a revised version.

oknate’s picture

Status: Needs work » Needs review
idebr’s picture

Status: Needs review » Needs work

@oknate Thanks for working on this issue! The changes look great, only #7.1 still has to be addressed:

+++ b/src/Service/SimplesamlphpAuthManager.php
@@ -3,7 +3,7 @@
+use SimpleSAML\Auth\Simple;

@@ -46,17 +46,17 @@ class SimplesamlphpAuthManager {
+   * @param Simple $instance
+   *    SimpleSAML\Auth\Simple instance.

The @param class reference needs to be fully namespaced: \SimpleSAML\Auth\Simple rather than Simple

oknate’s picture

StatusFileSize
new4.02 KB

this patch updates that param

oknate’s picture

Status: Needs work » Needs review
oknate’s picture

ccjjmartin’s picture

Here is the 7.x-3.x patch for 1.15.x compatibility

dakku’s picture

@oknate I have pushed your code cleanup changes and some additional cleanup. Would you mind re-rolling simplesamlphp_auth-namespace-fix-2947057-11.patch against the latest dev?

oknate’s picture

StatusFileSize
new4.06 KB

Here's a reroll of #11.

dakku’s picture

@oknate sorry the latest 16 patch failed to apply for me.

oknate’s picture

StatusFileSize
new4.06 KB

OK, I'm not sure why patch 16 didn't apply. Here's another attempt.

anavarre’s picture

The patch applies correctly for me. Sorry for asking, but weren't you trying to apply against RC6 and not the Git checkout? Paths have changed, so that'd be one reason why it'd fail.

  • dakku committed c382305 on 8.x-3.x authored by oknate
    Issue #2947057 by oknate, idebr, dakku, btully, anavarre: namespaces...
dakku’s picture

Status: Needs review » Fixed

Latest one works :D more likely it was pebcak on my side.
Thanks again for your work oknate & all.

Status: Fixed » Closed (fixed)

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