Commit 5e5c8cea authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

change scoping rules

parent e4fd96df
<?php
declare(strict_types=1);
declare (strict_types=1);
use Isolated\Symfony\Component\Finder\Finder;
return [
// The prefix configuration. If a non null value will be used, a random prefix will be generated.
'prefix' => 'SimpleSamlPHP',
// By default when running php-scoper add-prefix, it will prefix all relevant code found in the current working
// directory. You can however define which files should be scoped by defining a collection of Finders in the
// following configuration key.
//
// For more see: https://github.com/humbug/php-scoper#finders-and-paths
'finders' => [
Finder::create()
->files()
->ignoreVCS(true)
->notName('/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/')
->exclude([
'vendor-bin',
'vendor/simplesamlphp'
])
->in('.'),
],
// If `true` then the user defined constants belonging to the global namespace will not be prefixed.
//
// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
'whitelist-global-constants' => true,
// If `true` then the user defined classes belonging to the global namespace will not be prefixed.
//
// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
'whitelist-global-classes' => true,
// If `true` then the user defined functions belonging to the global namespace will not be prefixed.
//
// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
'whitelist-global-functions' => true,
];
namespace {
return [
// The prefix configuration. If a non null value will be used, a random prefix will be generated.
'prefix' => 'SimpleSamlPHP',
// By default when running php-scoper add-prefix, it will prefix all relevant code found in the current working
// directory. You can however define which files should be scoped by defining a collection of Finders in the
// following configuration key.
//
// For more see: https://github.com/humbug/php-scoper#finders-and-paths
'finders' => [
\Isolated\Symfony\Component\Finder\Finder::create()
->files()
->ignoreVCS(\true)
->notName('/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/')
->exclude([
'cert',
'cache',
'config',
'metadata',
'vendor-bin',
])->in('.')],
// PHP-Scoper's goal is to make sure that all code for a project lies in a distinct PHP namespace. However, you
// may want to share a common API between the bundled code of your PHAR and the consumer code. For example if
// you have a PHPUnit PHAR with isolated code, you still want the PHAR to be able to understand the
// PHPUnit\Framework\TestCase class.
//
// A way to achieve this is by specifying a list of classes to not prefix with the following configuration key. Note
// that this does not work with functions or constants neither with classes belonging to the global namespace.
//
// Fore more see https://github.com/humbug/php-scoper#whitelist
'whitelist' => [
// 'PHPUnit\Framework\TestCase', // A specific class
// 'PHPUnit\Framework\*', // The whole namespace
'*',
// Everything
'SimpleSAML*',
'SAML2',
],
// If `true` then the user defined constants belonging to the global namespace will not be prefixed.
//
// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
'whitelist-global-constants' => \true,
// If `true` then the user defined classes belonging to the global namespace will not be prefixed.
//
// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
'whitelist-global-classes' => \true,
// If `true` then the user defined functions belonging to the global namespace will not be prefixed.
//
// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
'whitelist-global-functions' => \true,
];
}
......@@ -3,7 +3,7 @@
namespace Source\Gateways\Saml;
use Exception;
use SimpleSamlPHP\SimpleSAML_Auth_Simple;
use SimpleSAML_Auth_Simple;
use Source\Entities\SamlUser;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
......@@ -21,7 +21,7 @@ class SimpleSamlPhpSamlRepository implements SamlRepository
*
* See https://simplesamlphp.org/docs/stable/simplesamlphp-sp-api for information on these methods
*
* @var SimpleSamlPHP\SimpleSAML_Auth_Simple
* @var SimpleSAML_Auth_Simple
* @method bool isAuthenticated()
* @method void requireAuth(array $params = [])
* @method void login(array $params = [])
......@@ -50,7 +50,7 @@ class SimpleSamlPhpSamlRepository implements SamlRepository
require_once base_path($samlAutoloadPath);
$this->saml = new SimpleSamlPHP\SimpleSAML_Auth_Simple($authSource);
$this->saml = new SimpleSAML_Auth_Simple($authSource);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment