diff --git a/.php_cs.dist b/.php_cs.dist index b2f3d6e4dd245407c68cec66cc19121f9ece5de6..feb3f1ad29fa863d5735fe4bfc25cd1615c35fd5 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -3,8 +3,8 @@ $finder = PhpCsFixer\Finder::create() ->exclude(__DIR__ . '/www/resources') ->in([ - __DIR__ . '/lib', __DIR__ . '/modules', + __DIR__ . '/src', __DIR__ . '/templates', __DIR__ . '/tests', __DIR__ . '/www', diff --git a/TESTING.md b/TESTING.md index 8b24c2fe9cc0bcd78ff8dc5dc4a982aa2ca102ed..aa9db30be3bef9b8d5f2ebebbb5fba23609d02c8 100644 --- a/TESTING.md +++ b/TESTING.md @@ -18,9 +18,9 @@ classes, and `SimpleSAML\Test\Module\modulename` for classes located in modules. For example, if you want to test the `SimpleSAML\Utils\HTTP` class -located in `lib/SimpleSAML/Utils/HTTP.php`, the tests must be in a class +located in `src/SimpleSAML/Utils/HTTP.php`, the tests must be in a class named `HTTPTest` implemented in -`tests/lib/SimpleSAML/Utils/HTTPTest.php`, with the following namespace +`tests/src/SimpleSAML/Utils/HTTPTest.php`, with the following namespace definition: ```php diff --git a/bin/get-translatable-strings b/bin/get-translatable-strings index f48a82931e7b9dafcfb76c3bab1d8758d87e6f5b..5a312c0ac6f6b76cfd3f4d4280a3d605bf89dc54 100755 --- a/bin/get-translatable-strings +++ b/bin/get-translatable-strings @@ -10,7 +10,7 @@ * - The main product and the standard modules, when invoked with '--main'. * * It will search all Twig templates for occurences of the trans() - * function, and all PHP code under lib/ for the noop() function. + * function, and all PHP code under src/ for the noop() function. */ declare(strict_types=1); @@ -22,7 +22,7 @@ use Symfony\Component\Filesystem\Filesystem; $baseDir = dirname(dirname(__FILE__)); // Add library autoloader -require_once($baseDir . '/lib/_autoload.php'); +require_once($baseDir . '/src/_autoload.php'); if($argc != 2) { echo "Usage: $argv[0] (<module>|--main)\n"; @@ -52,9 +52,9 @@ foreach($modules as $module) { $domain = $module ?: 'messages'; $moduleDir = $baseDir . ($module === '' ? '' : '/modules/' . $module); - $moduleLibDir = $moduleDir . '/lib/'; + $moduleSrcDir = $moduleDir . '/src/'; $outputDir = $moduleDir . $outputSuffix; - print `find $tempDir $moduleLibDir -name \*.php | xargs xgettext --default-domain=$domain -p $outputDir --from-code=UTF-8 -j --omit-header --no-location -ktrans -knoop -L PHP`; + print `find $tempDir $moduleSrcDir -name \*.php | xargs xgettext --default-domain=$domain -p $outputDir --from-code=UTF-8 -j --omit-header --no-location -ktrans -knoop -L PHP`; } $filesystem->remove($tempDirBase); diff --git a/bin/importPdoMetadata.php b/bin/importPdoMetadata.php index cbe27039169cd7d1f431fff9c13514118e273d83..271152a73c7572f65408921c614dbd0eaa40589a 100755 --- a/bin/importPdoMetadata.php +++ b/bin/importPdoMetadata.php @@ -3,7 +3,7 @@ $baseDir = dirname(dirname(__FILE__)); -require_once $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '_autoload.php'; +require_once $baseDir . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . '_autoload.php'; require_once \SimpleSAML\Utils\Config::getConfigDir() . DIRECTORY_SEPARATOR . 'config.php'; # Iterate through configured metadata sources and ensure diff --git a/bin/initMDSPdo.php b/bin/initMDSPdo.php index ca60292003482ebbe7a98a41cee8b3ca46c4b8e8..79af70f12511f70cb1ecec289ccb4e310fa0579d 100755 --- a/bin/initMDSPdo.php +++ b/bin/initMDSPdo.php @@ -5,7 +5,7 @@ $baseDir = dirname(dirname(__FILE__)); // Add library autoloader and configuration -require_once $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '_autoload.php'; +require_once $baseDir . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . '_autoload.php'; require_once \SimpleSAML\Utils\Config::getConfigDir() . DIRECTORY_SEPARATOR . 'config.php'; echo "Initializing Metadata Database..." . PHP_EOL; diff --git a/bin/memcacheSync.php b/bin/memcacheSync.php index cc60d614d91e4306db83269c60e1170999e096ad..85bdbacfc2d85940c055f5c5708724a7d6dcc98e 100755 --- a/bin/memcacheSync.php +++ b/bin/memcacheSync.php @@ -21,7 +21,7 @@ if (!class_exists('Memcache') && !class_exists('Memcached')) { $baseDir = dirname(dirname(__FILE__)); // Add library autoloader -require_once($baseDir . '/lib/_autoload.php'); +require_once($baseDir . '/src/_autoload.php'); // Initialize the configuration $configdir = SimpleSAML\Utils\Config::getConfigDir(); diff --git a/bin/pwgen.php b/bin/pwgen.php index 0af9b1ca48b86c8432aa40e7e2acc1ed47aa56b5..5980566bf4e06c1e27dc5261be33f2dcefeaa792 100755 --- a/bin/pwgen.php +++ b/bin/pwgen.php @@ -10,7 +10,7 @@ $baseDir = dirname(dirname(__FILE__)); // Add library autoloader -require_once($baseDir . '/lib/_autoload.php'); +require_once($baseDir . '/src/_autoload.php'); echo "Enter password: "; diff --git a/composer.json b/composer.json index 4ba8beb5f4ff839836311eba0d3788deff1251d4..549c703b0ae32b1aa60bdce700f6baacc8eceaf7 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "autoload": { "psr-4": { - "SimpleSAML\\": "lib/SimpleSAML", + "SimpleSAML\\": "src/SimpleSAML", "SimpleSAML\\Module\\admin\\": "modules/admin/lib", "SimpleSAML\\Module\\core\\": "modules/core/lib", "SimpleSAML\\Module\\cron\\": "modules/cron/lib", @@ -32,13 +32,13 @@ }, "autoload-dev": { "psr-4": { - "SimpleSAML\\Test\\": ["tests", "tests/lib/SimpleSAML"], - "SimpleSAML\\Test\\Module\\admin\\": ["tests/lib/SimpleSAML/modules/admin/lib"], - "SimpleSAML\\Test\\Module\\core\\": ["tests/lib/SimpleSAML/modules/core/lib"], - "SimpleSAML\\Test\\Module\\cron\\": ["tests/lib/SimpleSAML/modules/cron/lib"], - "SimpleSAML\\Test\\Module\\exampleauth\\": ["tests/lib/SimpleSAML/modules/exampleauth/lib"], - "SimpleSAML\\Test\\Module\\multiauth\\": ["tests/lib/SimpleSAML/modules/multiauth/lib"], - "SimpleSAML\\Test\\Module\\saml\\": ["tests/lib/SimpleSAML/modules/saml/lib"] + "SimpleSAML\\Test\\": ["tests", "tests/src/SimpleSAML"], + "SimpleSAML\\Test\\Module\\admin\\": ["tests//modules/admin/lib"], + "SimpleSAML\\Test\\Module\\core\\": ["tests/modules/core/lib"], + "SimpleSAML\\Test\\Module\\cron\\": ["tests/modules/cron/lib"], + "SimpleSAML\\Test\\Module\\exampleauth\\": ["tests/modules/exampleauth/lib"], + "SimpleSAML\\Test\\Module\\multiauth\\": ["tests/modules/multiauth/lib"], + "SimpleSAML\\Test\\Module\\saml\\": ["tests/modules/saml/lib"] } }, "require": { diff --git a/composer.lock b/composer.lock index e3ed206ef96f95f20eea82537eb1ab7a586dfdb6..25d264d8163f3a7a571423740e48f6ff10229ea9 100644 --- a/composer.lock +++ b/composer.lock @@ -7370,5 +7370,5 @@ "ext-curl": "*", "ext-pdo_sqlite": "*" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/modules/cron/bin/cron.php b/modules/cron/bin/cron.php index cb85cbe764639138582ceceda7e96947941680c2..8d4b8f41a303178dd465f2b4d80a7394546739a0 100755 --- a/modules/cron/bin/cron.php +++ b/modules/cron/bin/cron.php @@ -11,7 +11,7 @@ $baseDir = dirname(dirname(dirname(dirname(__FILE__)))); // Add library autoloader. -require_once($baseDir . '/lib/_autoload.php'); +require_once($baseDir . '/src/_autoload.php'); if (!SimpleSAML\Module::isModuleEnabled('cron')) { echo "You need to enable the cron module before this script can be used.\n"; diff --git a/phpcs.xml b/phpcs.xml index 012ba6be0e9ac90062f263ada0228bfbe718bf44..93a1bfbd54376bccf82459f47477e44f4e5746f2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -8,9 +8,9 @@ <file>bin</file> <file>config-templates</file> - <file>lib</file> <file>metadata-templates</file> <file>modules</file> + <file>resources</file> <file>src</file> <file>tests</file> <file>www</file> @@ -30,15 +30,15 @@ </properties> <!-- Exclude files with long lines that we cannot immediately fix --> - <exclude-pattern>tests/lib/SimpleSAML/Metadata/MetaDataStorageSourceTest.php</exclude-pattern> - <exclude-pattern>tests/lib/SimpleSAML/Metadata/SAMLParserTest.php</exclude-pattern> + <exclude-pattern>tests/src/SimpleSAML/Metadata/MetaDataStorageSourceTest.php</exclude-pattern> + <exclude-pattern>tests/src/SimpleSAML/Metadata/SAMLParserTest.php</exclude-pattern> <exclude-pattern>tests/modules/saml/lib/Controller/ServiceProviderTest.php</exclude-pattern> </rule> <!-- Ignore files with side effects that we cannot fix --> <rule ref="PSR1.Files.SideEffects"> <exclude-pattern>bin/*</exclude-pattern> - <exclude-pattern>lib/_autoload_modules.php</exclude-pattern> + <exclude-pattern>src/_autoload_modules.php</exclude-pattern> <exclude-pattern>tests/_autoload_modules.php</exclude-pattern> <exclude-pattern>www/_include.php</exclude-pattern> </rule> diff --git a/phpunit.xml b/phpunit.xml index e43310ecb5c497c78493f7b955c0a05cd0848af9..002bf1fe6b16077a476bffb72b2daa6e8000747e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -2,13 +2,13 @@ <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" bootstrap="./tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> <coverage processUncoveredFiles="true"> <include> - <directory suffix=".php">./lib</directory> <directory suffix=".php">./modules/admin/lib</directory> <directory suffix=".php">./modules/core/lib</directory> <directory suffix=".php">./modules/cron/lib</directory> <directory suffix=".php">./modules/exampleauth/lib</directory> <directory suffix=".php">./modules/multiauth/lib</directory> <directory suffix=".php">./modules/saml/lib</directory> + <directory suffix=".php">./src</directory> </include> <exclude> <directory>./tests</directory> diff --git a/psalm.xml b/psalm.xml index c03a78417b1b0ea625cd0f49eaeb2fc6ed7991c2..73c42a273874edb7efc90a85b6851c1cf08babfa 100644 --- a/psalm.xml +++ b/psalm.xml @@ -9,9 +9,9 @@ > <projectFiles> <directory name="config-templates" /> - <directory name="lib/SimpleSAML" /> <directory name="metadata-templates" /> <directory name="modules" /> + <directory name="src/SimpleSAML" /> <directory name="tests" /> <directory name="www" /> @@ -48,12 +48,12 @@ <UnresolvableInclude> <errorLevel type="suppress"> <file name="bin/*.php" /> - <file name="lib/SimpleSAML/Configuration.php" /> - <file name="lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php" /> - <file name="lib/SimpleSAML/Module.php" /> - <file name="lib/SimpleSAML/XHTML/Template.php" /> <file name="modules/core/lib/Auth/Process/AttributeMap.php" /> <file name="modules/*/bin/*.php" /> + <file name="src/SimpleSAML/Configuration.php" /> + <file name="src/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php" /> + <file name="src/SimpleSAML/Module.php" /> + <file name="src/SimpleSAML/XHTML/Template.php" /> <file name="tests/bootstrap.php" /> <file name="tests/routers/configLoader.php" /> </errorLevel> diff --git a/src/css/default-rtl.css b/resources/css/default-rtl.css similarity index 100% rename from src/css/default-rtl.css rename to resources/css/default-rtl.css diff --git a/src/css/default.scss b/resources/css/default.scss similarity index 100% rename from src/css/default.scss rename to resources/css/default.scss diff --git a/src/js/bundle/clipboard.js b/resources/js/bundle/clipboard.js similarity index 100% rename from src/js/bundle/clipboard.js rename to resources/js/bundle/clipboard.js diff --git a/src/js/bundle/expander.js b/resources/js/bundle/expander.js similarity index 100% rename from src/js/bundle/expander.js rename to resources/js/bundle/expander.js diff --git a/src/js/bundle/highlight.js b/resources/js/bundle/highlight.js similarity index 100% rename from src/js/bundle/highlight.js rename to resources/js/bundle/highlight.js diff --git a/src/js/bundle/language.js b/resources/js/bundle/language.js similarity index 100% rename from src/js/bundle/language.js rename to resources/js/bundle/language.js diff --git a/src/js/bundle/main.js b/resources/js/bundle/main.js similarity index 100% rename from src/js/bundle/main.js rename to resources/js/bundle/main.js diff --git a/src/js/bundle/ready.js b/resources/js/bundle/ready.js similarity index 100% rename from src/js/bundle/ready.js rename to resources/js/bundle/ready.js diff --git a/src/js/logout/logout.js b/resources/js/logout/logout.js similarity index 100% rename from src/js/logout/logout.js rename to resources/js/logout/logout.js diff --git a/src/js/logout/main.js b/resources/js/logout/main.js similarity index 100% rename from src/js/logout/main.js rename to resources/js/logout/main.js diff --git a/src/js/post/main.js b/resources/js/post/main.js similarity index 100% rename from src/js/post/main.js rename to resources/js/post/main.js diff --git a/src/js/post/post.js b/resources/js/post/post.js similarity index 100% rename from src/js/post/post.js rename to resources/js/post/post.js diff --git a/src/js/style.js b/resources/js/style.js similarity index 100% rename from src/js/style.js rename to resources/js/style.js diff --git a/lib/SimpleSAML/Auth/AuthenticationFactory.php b/src/SimpleSAML/Auth/AuthenticationFactory.php similarity index 100% rename from lib/SimpleSAML/Auth/AuthenticationFactory.php rename to src/SimpleSAML/Auth/AuthenticationFactory.php diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/src/SimpleSAML/Auth/ProcessingChain.php similarity index 100% rename from lib/SimpleSAML/Auth/ProcessingChain.php rename to src/SimpleSAML/Auth/ProcessingChain.php diff --git a/lib/SimpleSAML/Auth/ProcessingFilter.php b/src/SimpleSAML/Auth/ProcessingFilter.php similarity index 100% rename from lib/SimpleSAML/Auth/ProcessingFilter.php rename to src/SimpleSAML/Auth/ProcessingFilter.php diff --git a/lib/SimpleSAML/Auth/Simple.php b/src/SimpleSAML/Auth/Simple.php similarity index 100% rename from lib/SimpleSAML/Auth/Simple.php rename to src/SimpleSAML/Auth/Simple.php diff --git a/lib/SimpleSAML/Auth/Source.php b/src/SimpleSAML/Auth/Source.php similarity index 100% rename from lib/SimpleSAML/Auth/Source.php rename to src/SimpleSAML/Auth/Source.php diff --git a/lib/SimpleSAML/Auth/SourceFactory.php b/src/SimpleSAML/Auth/SourceFactory.php similarity index 100% rename from lib/SimpleSAML/Auth/SourceFactory.php rename to src/SimpleSAML/Auth/SourceFactory.php diff --git a/lib/SimpleSAML/Auth/State.php b/src/SimpleSAML/Auth/State.php similarity index 100% rename from lib/SimpleSAML/Auth/State.php rename to src/SimpleSAML/Auth/State.php diff --git a/lib/SimpleSAML/Command/RouterDebugCommand.php b/src/SimpleSAML/Command/RouterDebugCommand.php similarity index 100% rename from lib/SimpleSAML/Command/RouterDebugCommand.php rename to src/SimpleSAML/Command/RouterDebugCommand.php diff --git a/lib/SimpleSAML/Compat/Logger.php b/src/SimpleSAML/Compat/Logger.php similarity index 100% rename from lib/SimpleSAML/Compat/Logger.php rename to src/SimpleSAML/Compat/Logger.php diff --git a/lib/SimpleSAML/Compat/SspContainer.php b/src/SimpleSAML/Compat/SspContainer.php similarity index 100% rename from lib/SimpleSAML/Compat/SspContainer.php rename to src/SimpleSAML/Compat/SspContainer.php diff --git a/lib/SimpleSAML/Configuration.php b/src/SimpleSAML/Configuration.php similarity index 99% rename from lib/SimpleSAML/Configuration.php rename to src/SimpleSAML/Configuration.php index 73fe33ee61161258f079253a4196ad7cf1b7f10d..5284fadbedd803f3d39022383f2ac4f713674b9e 100644 --- a/lib/SimpleSAML/Configuration.php +++ b/src/SimpleSAML/Configuration.php @@ -561,7 +561,7 @@ class Configuration implements Utils\ClearableState return $dir; } - // the directory wasn't set in the configuration file, path is <base directory>/lib/SimpleSAML/Configuration.php + // the directory wasn't set in the configuration file, path is <base directory>/src/SimpleSAML/Configuration.php $dir = __FILE__; Assert::same(basename($dir), 'Configuration.php'); @@ -569,7 +569,7 @@ class Configuration implements Utils\ClearableState Assert::same(basename($dir), 'SimpleSAML'); $dir = dirname($dir); - Assert::same(basename($dir), 'lib'); + Assert::same(basename($dir), 'src'); $dir = dirname($dir); diff --git a/lib/SimpleSAML/Console/Application.php b/src/SimpleSAML/Console/Application.php similarity index 100% rename from lib/SimpleSAML/Console/Application.php rename to src/SimpleSAML/Console/Application.php diff --git a/lib/SimpleSAML/Database.php b/src/SimpleSAML/Database.php similarity index 100% rename from lib/SimpleSAML/Database.php rename to src/SimpleSAML/Database.php diff --git a/lib/SimpleSAML/Error/AuthSource.php b/src/SimpleSAML/Error/AuthSource.php similarity index 100% rename from lib/SimpleSAML/Error/AuthSource.php rename to src/SimpleSAML/Error/AuthSource.php diff --git a/lib/SimpleSAML/Error/BadRequest.php b/src/SimpleSAML/Error/BadRequest.php similarity index 100% rename from lib/SimpleSAML/Error/BadRequest.php rename to src/SimpleSAML/Error/BadRequest.php diff --git a/lib/SimpleSAML/Error/BadUserInput.php b/src/SimpleSAML/Error/BadUserInput.php similarity index 100% rename from lib/SimpleSAML/Error/BadUserInput.php rename to src/SimpleSAML/Error/BadUserInput.php diff --git a/lib/SimpleSAML/Error/CannotSetCookie.php b/src/SimpleSAML/Error/CannotSetCookie.php similarity index 100% rename from lib/SimpleSAML/Error/CannotSetCookie.php rename to src/SimpleSAML/Error/CannotSetCookie.php diff --git a/lib/SimpleSAML/Error/ConfigurationError.php b/src/SimpleSAML/Error/ConfigurationError.php similarity index 100% rename from lib/SimpleSAML/Error/ConfigurationError.php rename to src/SimpleSAML/Error/ConfigurationError.php diff --git a/lib/SimpleSAML/Error/CriticalConfigurationError.php b/src/SimpleSAML/Error/CriticalConfigurationError.php similarity index 100% rename from lib/SimpleSAML/Error/CriticalConfigurationError.php rename to src/SimpleSAML/Error/CriticalConfigurationError.php diff --git a/lib/SimpleSAML/Error/Error.php b/src/SimpleSAML/Error/Error.php similarity index 100% rename from lib/SimpleSAML/Error/Error.php rename to src/SimpleSAML/Error/Error.php diff --git a/lib/SimpleSAML/Error/ErrorCodes.php b/src/SimpleSAML/Error/ErrorCodes.php similarity index 100% rename from lib/SimpleSAML/Error/ErrorCodes.php rename to src/SimpleSAML/Error/ErrorCodes.php diff --git a/lib/SimpleSAML/Error/Exception.php b/src/SimpleSAML/Error/Exception.php similarity index 100% rename from lib/SimpleSAML/Error/Exception.php rename to src/SimpleSAML/Error/Exception.php diff --git a/lib/SimpleSAML/Error/InvalidCredential.php b/src/SimpleSAML/Error/InvalidCredential.php similarity index 100% rename from lib/SimpleSAML/Error/InvalidCredential.php rename to src/SimpleSAML/Error/InvalidCredential.php diff --git a/lib/SimpleSAML/Error/MetadataNotFound.php b/src/SimpleSAML/Error/MetadataNotFound.php similarity index 100% rename from lib/SimpleSAML/Error/MetadataNotFound.php rename to src/SimpleSAML/Error/MetadataNotFound.php diff --git a/lib/SimpleSAML/Error/NoState.php b/src/SimpleSAML/Error/NoState.php similarity index 100% rename from lib/SimpleSAML/Error/NoState.php rename to src/SimpleSAML/Error/NoState.php diff --git a/lib/SimpleSAML/Error/NotFound.php b/src/SimpleSAML/Error/NotFound.php similarity index 100% rename from lib/SimpleSAML/Error/NotFound.php rename to src/SimpleSAML/Error/NotFound.php diff --git a/lib/SimpleSAML/Error/UnserializableException.php b/src/SimpleSAML/Error/UnserializableException.php similarity index 100% rename from lib/SimpleSAML/Error/UnserializableException.php rename to src/SimpleSAML/Error/UnserializableException.php diff --git a/lib/SimpleSAML/Error/User.php b/src/SimpleSAML/Error/User.php similarity index 100% rename from lib/SimpleSAML/Error/User.php rename to src/SimpleSAML/Error/User.php diff --git a/lib/SimpleSAML/Error/UserAborted.php b/src/SimpleSAML/Error/UserAborted.php similarity index 100% rename from lib/SimpleSAML/Error/UserAborted.php rename to src/SimpleSAML/Error/UserAborted.php diff --git a/lib/SimpleSAML/Error/UserNotFound.php b/src/SimpleSAML/Error/UserNotFound.php similarity index 100% rename from lib/SimpleSAML/Error/UserNotFound.php rename to src/SimpleSAML/Error/UserNotFound.php diff --git a/lib/SimpleSAML/HTTP/RunnableResponse.php b/src/SimpleSAML/HTTP/RunnableResponse.php similarity index 100% rename from lib/SimpleSAML/HTTP/RunnableResponse.php rename to src/SimpleSAML/HTTP/RunnableResponse.php diff --git a/lib/SimpleSAML/IdP.php b/src/SimpleSAML/IdP.php similarity index 100% rename from lib/SimpleSAML/IdP.php rename to src/SimpleSAML/IdP.php diff --git a/lib/SimpleSAML/IdP/IFrameLogoutHandler.php b/src/SimpleSAML/IdP/IFrameLogoutHandler.php similarity index 100% rename from lib/SimpleSAML/IdP/IFrameLogoutHandler.php rename to src/SimpleSAML/IdP/IFrameLogoutHandler.php diff --git a/lib/SimpleSAML/IdP/LogoutHandlerInterface.php b/src/SimpleSAML/IdP/LogoutHandlerInterface.php similarity index 100% rename from lib/SimpleSAML/IdP/LogoutHandlerInterface.php rename to src/SimpleSAML/IdP/LogoutHandlerInterface.php diff --git a/lib/SimpleSAML/IdP/TraditionalLogoutHandler.php b/src/SimpleSAML/IdP/TraditionalLogoutHandler.php similarity index 100% rename from lib/SimpleSAML/IdP/TraditionalLogoutHandler.php rename to src/SimpleSAML/IdP/TraditionalLogoutHandler.php diff --git a/lib/SimpleSAML/Kernel.php b/src/SimpleSAML/Kernel.php similarity index 99% rename from lib/SimpleSAML/Kernel.php rename to src/SimpleSAML/Kernel.php index 01b45b288efd5225345b75512adefd8c504de204..3473a0fa682100190812770376496539e0eab320 100644 --- a/lib/SimpleSAML/Kernel.php +++ b/src/SimpleSAML/Kernel.php @@ -150,7 +150,7 @@ class Kernel extends BaseKernel $definition->setAutowired(true); $definition->setPublic(true); - $controllerDir = Module::getModuleDir($this->module) . '/lib/Controller'; + $controllerDir = Module::getModuleDir($this->module) . '/src/Controller'; if (!is_dir($controllerDir)) { return; diff --git a/lib/SimpleSAML/Locale/Language.php b/src/SimpleSAML/Locale/Language.php similarity index 100% rename from lib/SimpleSAML/Locale/Language.php rename to src/SimpleSAML/Locale/Language.php diff --git a/lib/SimpleSAML/Locale/Localization.php b/src/SimpleSAML/Locale/Localization.php similarity index 100% rename from lib/SimpleSAML/Locale/Localization.php rename to src/SimpleSAML/Locale/Localization.php diff --git a/lib/SimpleSAML/Locale/Translate.php b/src/SimpleSAML/Locale/Translate.php similarity index 100% rename from lib/SimpleSAML/Locale/Translate.php rename to src/SimpleSAML/Locale/Translate.php diff --git a/lib/SimpleSAML/Locale/TwigTranslator.php b/src/SimpleSAML/Locale/TwigTranslator.php similarity index 100% rename from lib/SimpleSAML/Locale/TwigTranslator.php rename to src/SimpleSAML/Locale/TwigTranslator.php diff --git a/lib/SimpleSAML/Logger.php b/src/SimpleSAML/Logger.php similarity index 100% rename from lib/SimpleSAML/Logger.php rename to src/SimpleSAML/Logger.php diff --git a/lib/SimpleSAML/Logger/ErrorLogLoggingHandler.php b/src/SimpleSAML/Logger/ErrorLogLoggingHandler.php similarity index 100% rename from lib/SimpleSAML/Logger/ErrorLogLoggingHandler.php rename to src/SimpleSAML/Logger/ErrorLogLoggingHandler.php diff --git a/lib/SimpleSAML/Logger/FileLoggingHandler.php b/src/SimpleSAML/Logger/FileLoggingHandler.php similarity index 100% rename from lib/SimpleSAML/Logger/FileLoggingHandler.php rename to src/SimpleSAML/Logger/FileLoggingHandler.php diff --git a/lib/SimpleSAML/Logger/LoggingHandlerInterface.php b/src/SimpleSAML/Logger/LoggingHandlerInterface.php similarity index 100% rename from lib/SimpleSAML/Logger/LoggingHandlerInterface.php rename to src/SimpleSAML/Logger/LoggingHandlerInterface.php diff --git a/lib/SimpleSAML/Logger/StandardErrorLoggingHandler.php b/src/SimpleSAML/Logger/StandardErrorLoggingHandler.php similarity index 100% rename from lib/SimpleSAML/Logger/StandardErrorLoggingHandler.php rename to src/SimpleSAML/Logger/StandardErrorLoggingHandler.php diff --git a/lib/SimpleSAML/Logger/SyslogLoggingHandler.php b/src/SimpleSAML/Logger/SyslogLoggingHandler.php similarity index 100% rename from lib/SimpleSAML/Logger/SyslogLoggingHandler.php rename to src/SimpleSAML/Logger/SyslogLoggingHandler.php diff --git a/lib/SimpleSAML/Memcache.php b/src/SimpleSAML/Memcache.php similarity index 100% rename from lib/SimpleSAML/Memcache.php rename to src/SimpleSAML/Memcache.php diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php b/src/SimpleSAML/Metadata/MetaDataStorageHandler.php similarity index 100% rename from lib/SimpleSAML/Metadata/MetaDataStorageHandler.php rename to src/SimpleSAML/Metadata/MetaDataStorageHandler.php diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php similarity index 100% rename from lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php rename to src/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php similarity index 100% rename from lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php rename to src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php similarity index 100% rename from lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php rename to src/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerXML.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerXML.php similarity index 100% rename from lib/SimpleSAML/Metadata/MetaDataStorageHandlerXML.php rename to src/SimpleSAML/Metadata/MetaDataStorageHandlerXML.php diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageSource.php b/src/SimpleSAML/Metadata/MetaDataStorageSource.php similarity index 100% rename from lib/SimpleSAML/Metadata/MetaDataStorageSource.php rename to src/SimpleSAML/Metadata/MetaDataStorageSource.php diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/src/SimpleSAML/Metadata/SAMLBuilder.php similarity index 100% rename from lib/SimpleSAML/Metadata/SAMLBuilder.php rename to src/SimpleSAML/Metadata/SAMLBuilder.php diff --git a/lib/SimpleSAML/Metadata/SAMLParser.php b/src/SimpleSAML/Metadata/SAMLParser.php similarity index 100% rename from lib/SimpleSAML/Metadata/SAMLParser.php rename to src/SimpleSAML/Metadata/SAMLParser.php diff --git a/lib/SimpleSAML/Metadata/Signer.php b/src/SimpleSAML/Metadata/Signer.php similarity index 100% rename from lib/SimpleSAML/Metadata/Signer.php rename to src/SimpleSAML/Metadata/Signer.php diff --git a/lib/SimpleSAML/Metadata/Sources/MDQ.php b/src/SimpleSAML/Metadata/Sources/MDQ.php similarity index 100% rename from lib/SimpleSAML/Metadata/Sources/MDQ.php rename to src/SimpleSAML/Metadata/Sources/MDQ.php diff --git a/lib/SimpleSAML/Module.php b/src/SimpleSAML/Module.php similarity index 100% rename from lib/SimpleSAML/Module.php rename to src/SimpleSAML/Module.php diff --git a/lib/SimpleSAML/Session.php b/src/SimpleSAML/Session.php similarity index 100% rename from lib/SimpleSAML/Session.php rename to src/SimpleSAML/Session.php diff --git a/lib/SimpleSAML/SessionHandler.php b/src/SimpleSAML/SessionHandler.php similarity index 100% rename from lib/SimpleSAML/SessionHandler.php rename to src/SimpleSAML/SessionHandler.php diff --git a/lib/SimpleSAML/SessionHandlerCookie.php b/src/SimpleSAML/SessionHandlerCookie.php similarity index 100% rename from lib/SimpleSAML/SessionHandlerCookie.php rename to src/SimpleSAML/SessionHandlerCookie.php diff --git a/lib/SimpleSAML/SessionHandlerPHP.php b/src/SimpleSAML/SessionHandlerPHP.php similarity index 100% rename from lib/SimpleSAML/SessionHandlerPHP.php rename to src/SimpleSAML/SessionHandlerPHP.php diff --git a/lib/SimpleSAML/SessionHandlerStore.php b/src/SimpleSAML/SessionHandlerStore.php similarity index 100% rename from lib/SimpleSAML/SessionHandlerStore.php rename to src/SimpleSAML/SessionHandlerStore.php diff --git a/lib/SimpleSAML/Stats.php b/src/SimpleSAML/Stats.php similarity index 100% rename from lib/SimpleSAML/Stats.php rename to src/SimpleSAML/Stats.php diff --git a/lib/SimpleSAML/Stats/Output.php b/src/SimpleSAML/Stats/Output.php similarity index 100% rename from lib/SimpleSAML/Stats/Output.php rename to src/SimpleSAML/Stats/Output.php diff --git a/lib/SimpleSAML/Store/MemcacheStore.php b/src/SimpleSAML/Store/MemcacheStore.php similarity index 100% rename from lib/SimpleSAML/Store/MemcacheStore.php rename to src/SimpleSAML/Store/MemcacheStore.php diff --git a/lib/SimpleSAML/Store/RedisStore.php b/src/SimpleSAML/Store/RedisStore.php similarity index 100% rename from lib/SimpleSAML/Store/RedisStore.php rename to src/SimpleSAML/Store/RedisStore.php diff --git a/lib/SimpleSAML/Store/SQLStore.php b/src/SimpleSAML/Store/SQLStore.php similarity index 100% rename from lib/SimpleSAML/Store/SQLStore.php rename to src/SimpleSAML/Store/SQLStore.php diff --git a/lib/SimpleSAML/Store/StoreFactory.php b/src/SimpleSAML/Store/StoreFactory.php similarity index 100% rename from lib/SimpleSAML/Store/StoreFactory.php rename to src/SimpleSAML/Store/StoreFactory.php diff --git a/lib/SimpleSAML/Store/StoreInterface.php b/src/SimpleSAML/Store/StoreInterface.php similarity index 100% rename from lib/SimpleSAML/Store/StoreInterface.php rename to src/SimpleSAML/Store/StoreInterface.php diff --git a/lib/SimpleSAML/Utils/Arrays.php b/src/SimpleSAML/Utils/Arrays.php similarity index 100% rename from lib/SimpleSAML/Utils/Arrays.php rename to src/SimpleSAML/Utils/Arrays.php diff --git a/lib/SimpleSAML/Utils/Attributes.php b/src/SimpleSAML/Utils/Attributes.php similarity index 100% rename from lib/SimpleSAML/Utils/Attributes.php rename to src/SimpleSAML/Utils/Attributes.php diff --git a/lib/SimpleSAML/Utils/Auth.php b/src/SimpleSAML/Utils/Auth.php similarity index 100% rename from lib/SimpleSAML/Utils/Auth.php rename to src/SimpleSAML/Utils/Auth.php diff --git a/lib/SimpleSAML/Utils/ClearableState.php b/src/SimpleSAML/Utils/ClearableState.php similarity index 100% rename from lib/SimpleSAML/Utils/ClearableState.php rename to src/SimpleSAML/Utils/ClearableState.php diff --git a/lib/SimpleSAML/Utils/Config.php b/src/SimpleSAML/Utils/Config.php similarity index 100% rename from lib/SimpleSAML/Utils/Config.php rename to src/SimpleSAML/Utils/Config.php diff --git a/lib/SimpleSAML/Utils/Config/Metadata.php b/src/SimpleSAML/Utils/Config/Metadata.php similarity index 100% rename from lib/SimpleSAML/Utils/Config/Metadata.php rename to src/SimpleSAML/Utils/Config/Metadata.php diff --git a/lib/SimpleSAML/Utils/Crypto.php b/src/SimpleSAML/Utils/Crypto.php similarity index 100% rename from lib/SimpleSAML/Utils/Crypto.php rename to src/SimpleSAML/Utils/Crypto.php diff --git a/lib/SimpleSAML/Utils/EMail.php b/src/SimpleSAML/Utils/EMail.php similarity index 100% rename from lib/SimpleSAML/Utils/EMail.php rename to src/SimpleSAML/Utils/EMail.php diff --git a/lib/SimpleSAML/Utils/HTTP.php b/src/SimpleSAML/Utils/HTTP.php similarity index 100% rename from lib/SimpleSAML/Utils/HTTP.php rename to src/SimpleSAML/Utils/HTTP.php diff --git a/lib/SimpleSAML/Utils/Net.php b/src/SimpleSAML/Utils/Net.php similarity index 100% rename from lib/SimpleSAML/Utils/Net.php rename to src/SimpleSAML/Utils/Net.php diff --git a/lib/SimpleSAML/Utils/Random.php b/src/SimpleSAML/Utils/Random.php similarity index 100% rename from lib/SimpleSAML/Utils/Random.php rename to src/SimpleSAML/Utils/Random.php diff --git a/lib/SimpleSAML/Utils/System.php b/src/SimpleSAML/Utils/System.php similarity index 100% rename from lib/SimpleSAML/Utils/System.php rename to src/SimpleSAML/Utils/System.php diff --git a/lib/SimpleSAML/Utils/Time.php b/src/SimpleSAML/Utils/Time.php similarity index 100% rename from lib/SimpleSAML/Utils/Time.php rename to src/SimpleSAML/Utils/Time.php diff --git a/lib/SimpleSAML/Utils/Translate.php b/src/SimpleSAML/Utils/Translate.php similarity index 100% rename from lib/SimpleSAML/Utils/Translate.php rename to src/SimpleSAML/Utils/Translate.php diff --git a/lib/SimpleSAML/Utils/XML.php b/src/SimpleSAML/Utils/XML.php similarity index 100% rename from lib/SimpleSAML/Utils/XML.php rename to src/SimpleSAML/Utils/XML.php diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/src/SimpleSAML/XHTML/IdPDisco.php similarity index 100% rename from lib/SimpleSAML/XHTML/IdPDisco.php rename to src/SimpleSAML/XHTML/IdPDisco.php diff --git a/lib/SimpleSAML/XHTML/Template.php b/src/SimpleSAML/XHTML/Template.php similarity index 100% rename from lib/SimpleSAML/XHTML/Template.php rename to src/SimpleSAML/XHTML/Template.php diff --git a/lib/SimpleSAML/XHTML/TemplateControllerInterface.php b/src/SimpleSAML/XHTML/TemplateControllerInterface.php similarity index 100% rename from lib/SimpleSAML/XHTML/TemplateControllerInterface.php rename to src/SimpleSAML/XHTML/TemplateControllerInterface.php diff --git a/lib/SimpleSAML/XHTML/TemplateLoader.php b/src/SimpleSAML/XHTML/TemplateLoader.php similarity index 100% rename from lib/SimpleSAML/XHTML/TemplateLoader.php rename to src/SimpleSAML/XHTML/TemplateLoader.php diff --git a/lib/SimpleSAML/XML/Errors.php b/src/SimpleSAML/XML/Errors.php similarity index 100% rename from lib/SimpleSAML/XML/Errors.php rename to src/SimpleSAML/XML/Errors.php diff --git a/lib/SimpleSAML/XML/Parser.php b/src/SimpleSAML/XML/Parser.php similarity index 100% rename from lib/SimpleSAML/XML/Parser.php rename to src/SimpleSAML/XML/Parser.php diff --git a/lib/SimpleSAML/XML/Signer.php b/src/SimpleSAML/XML/Signer.php similarity index 100% rename from lib/SimpleSAML/XML/Signer.php rename to src/SimpleSAML/XML/Signer.php diff --git a/lib/SimpleSAML/XML/Validator.php b/src/SimpleSAML/XML/Validator.php similarity index 100% rename from lib/SimpleSAML/XML/Validator.php rename to src/SimpleSAML/XML/Validator.php diff --git a/lib/_autoload.php b/src/_autoload.php similarity index 100% rename from lib/_autoload.php rename to src/_autoload.php diff --git a/webpack.config.js b/webpack.config.js index 4acbfa79b26958ae6f5ed08498a087fe080607ba..b607edb4c38b491b4d5d689c4e47f1c9e5d039d4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,10 +17,10 @@ module.exports = environment => { const secondaryBackground = env.hasOwnProperty('secondaryBackground') ? env.secondaryBackground : '#e8410c'; return { entry: { - bundle: './src/js/bundle/main', - logout: './src/js/logout/main', - post: './src/js/post/main', - stylesheet: './src/js/style' + bundle: './resources/js/bundle/main', + logout: './resources/js/logout/main', + post: './resources/js/post/main', + stylesheet: './resources/js/style' }, output: { path: path.resolve(buildDir), diff --git a/www/_include.php b/www/_include.php index 893f1fbf3798d963640dd0074ed273b727960564..3cbffa24a66efc3288587312206720f05666a395 100644 --- a/www/_include.php +++ b/www/_include.php @@ -1,7 +1,7 @@ <?php // initialize the autoloader -require_once(dirname(dirname(__FILE__)) . '/lib/_autoload.php'); +require_once(dirname(dirname(__FILE__)) . '/src/_autoload.php'); use SAML2\Compat\ContainerSingleton; use SimpleSAML\Compat\SspContainer;