Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Fixed for more recent versions of SimpleSAMLphp #3

Merged
merged 1 commit into from
Mar 6, 2017
Merged

Fixed for more recent versions of SimpleSAMLphp #3

merged 1 commit into from
Mar 6, 2017

Conversation

infostreams
Copy link
Contributor

Newer versions of SimpleSAMLphp don't have the SimpleSAML_autoload function anymore.

Newer versions of SimpleSAMLphp don't have the SimpleSAML_autoload function anymore.
@asasmoyo
Copy link
Owner

asasmoyo commented Mar 6, 2017

Wow thanks for the PR!
Have you test this on your side? Sorry I do not maintain Yii app with Simplesamlphp anymore so I can't test it.

@infostreams
Copy link
Contributor Author

Yeah, without this code it doesn't work on my side. The reason being that the function SimpleSAML_autoload doesn't exist anymore in newer versions of SimpleSAMLphp. What this code does is

  • First it checks if the function SimpleSAML_autoload exists anyway. If it exists, it does the exact same thing it did before, so there's no change in functionality.
  • If the function does not exist, it checks if Composer added an autoload class, and then registers that autoload class with Yii. This is the new codepath that I needed to add for my situation. Otherwise, it wouldn't start the authentication flow and my application wouldn't authenticate with the identity provider (I'd get a fatal error about a non-existing function SimpleSAML_autoload instead)

So yes, it is tested. With this code it works in newer versions of SimpleSAML. Without this code, it doesn't.

@asasmoyo
Copy link
Owner

asasmoyo commented Mar 6, 2017

Nice!
Thanks a lot. Will merge it.

@asasmoyo asasmoyo merged commit a24b151 into asasmoyo:master Mar 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants