diff --git a/.gitignore b/.gitignore index bb6a7a94..96019f77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .idea/ -phpunit.xml vendor/ +phpunit.xml .php_cs.cache .php_cs # The Api reference is auto generated and should not be part of the repository @@ -8,4 +8,3 @@ vendor/ sphpdox.phar _Output/ Documentation/.doctrees -bin/ diff --git a/bin/release b/bin/release new file mode 100755 index 00000000..02994d04 --- /dev/null +++ b/bin/release @@ -0,0 +1,33 @@ +#!/usr/bin/env php +add(new \TYPO3\Surf\Command\ReleaseCommand()); +$app->setDefaultCommand('release'); +$app->run(); + +function requireAutoloader() +{ + $autoloadPaths = [ + // Package was included as a library + __DIR__ . '/../../../autoload.php', + // Local package usage + __DIR__ . '/../vendor/autoload.php', + // Local package in packages folder + __DIR__ . '/../../../vendor/autoload.php', + ]; + foreach ($autoloadPaths as $path) { + if (file_exists($path)) { + /** @noinspection PhpIncludeInspection */ + return file_exists($path) && include $path; + } + } + + $msg = 'You must set up the project dependencies, run the following commands:' . PHP_EOL . + 'curl -sS https://getcomposer.org/installer | php' . PHP_EOL . + 'php composer.phar install' . PHP_EOL; + fwrite(STDERR, $msg); + exit(1); +} diff --git a/bin/surf b/bin/surf new file mode 100755 index 00000000..55d430c1 --- /dev/null +++ b/bin/surf @@ -0,0 +1,32 @@ +#!/usr/bin/env php +setFactory(new \TYPO3\Surf\Integration\Factory()); +$app->run(); + +function requireAutoloader() +{ + $autoloadPaths = [ + // Package was included as a library + __DIR__ . '/../../../autoload.php', + // Local package usage + __DIR__ . '/../vendor/autoload.php', + // Local package in packages folder + __DIR__ . '/../../../vendor/autoload.php', + ]; + foreach ($autoloadPaths as $path) { + if (file_exists($path)) { + /** @noinspection PhpIncludeInspection */ + return file_exists($path) && include $path; + } + } + + $msg = 'You must set up the project dependencies, run the following commands:' . PHP_EOL . + 'curl -sS https://getcomposer.org/installer | php' . PHP_EOL . + 'php composer.phar install' . PHP_EOL; + fwrite(STDERR, $msg); + exit(1); +} diff --git a/composer.json b/composer.json index fea10aca..917a3ac5 100644 --- a/composer.json +++ b/composer.json @@ -33,11 +33,11 @@ }, "autoload-dev": { "psr-4": { - "TYPO3\\Surf\\Tests\\": "Tests" + "TYPO3\\Surf\\Tests\\": "tests" } }, "bin": [ - "surf" + "bin/surf" ], "config": { "platform": { diff --git a/release b/release deleted file mode 100755 index 86f4c1ed..00000000 --- a/release +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env php -add(new \TYPO3\Surf\Command\ReleaseCommand()); -$app->setDefaultCommand('release'); -$app->run(); diff --git a/surf b/surf deleted file mode 100755 index efe96de0..00000000 --- a/surf +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env php -setFactory(new \TYPO3\Surf\Integration\Factory()); -$app->run(); diff --git a/Tests/Unit/AssertCommandExecuted.php b/tests/Unit/AssertCommandExecuted.php similarity index 100% rename from Tests/Unit/AssertCommandExecuted.php rename to tests/Unit/AssertCommandExecuted.php diff --git a/Tests/Unit/Command/DeployCommandTest.php b/tests/Unit/Command/DeployCommandTest.php similarity index 100% rename from Tests/Unit/Command/DeployCommandTest.php rename to tests/Unit/Command/DeployCommandTest.php diff --git a/Tests/Unit/Command/DescribeCommandTest.php b/tests/Unit/Command/DescribeCommandTest.php similarity index 100% rename from Tests/Unit/Command/DescribeCommandTest.php rename to tests/Unit/Command/DescribeCommandTest.php diff --git a/Tests/Unit/DeprecationMessageFactoryTest.php b/tests/Unit/DeprecationMessageFactoryTest.php similarity index 100% rename from Tests/Unit/DeprecationMessageFactoryTest.php rename to tests/Unit/DeprecationMessageFactoryTest.php diff --git a/Tests/Unit/Domain/Model/ApplicationTest.php b/tests/Unit/Domain/Model/ApplicationTest.php similarity index 100% rename from Tests/Unit/Domain/Model/ApplicationTest.php rename to tests/Unit/Domain/Model/ApplicationTest.php diff --git a/Tests/Unit/Domain/Model/Clock/SystemClockTest.php b/tests/Unit/Domain/Model/Clock/SystemClockTest.php similarity index 100% rename from Tests/Unit/Domain/Model/Clock/SystemClockTest.php rename to tests/Unit/Domain/Model/Clock/SystemClockTest.php diff --git a/Tests/Unit/Domain/Model/DeploymentTest.php b/tests/Unit/Domain/Model/DeploymentTest.php similarity index 100% rename from Tests/Unit/Domain/Model/DeploymentTest.php rename to tests/Unit/Domain/Model/DeploymentTest.php diff --git a/Tests/Unit/Domain/Model/NodeTest.php b/tests/Unit/Domain/Model/NodeTest.php similarity index 100% rename from Tests/Unit/Domain/Model/NodeTest.php rename to tests/Unit/Domain/Model/NodeTest.php diff --git a/Tests/Unit/Domain/Model/SimpleWorkflowTest.php b/tests/Unit/Domain/Model/SimpleWorkflowTest.php similarity index 100% rename from Tests/Unit/Domain/Model/SimpleWorkflowTest.php rename to tests/Unit/Domain/Model/SimpleWorkflowTest.php diff --git a/Tests/Unit/Domain/Service/ShellCommandServiceTest.php b/tests/Unit/Domain/Service/ShellCommandServiceTest.php similarity index 100% rename from Tests/Unit/Domain/Service/ShellCommandServiceTest.php rename to tests/Unit/Domain/Service/ShellCommandServiceTest.php diff --git a/Tests/Unit/Domain/Service/TaskManagerTest.php b/tests/Unit/Domain/Service/TaskManagerTest.php similarity index 100% rename from Tests/Unit/Domain/Service/TaskManagerTest.php rename to tests/Unit/Domain/Service/TaskManagerTest.php diff --git a/Tests/Unit/Task/BaseTaskTest.php b/tests/Unit/Task/BaseTaskTest.php similarity index 100% rename from Tests/Unit/Task/BaseTaskTest.php rename to tests/Unit/Task/BaseTaskTest.php diff --git a/Tests/Unit/Task/CleanupReleasesTaskTest.php b/tests/Unit/Task/CleanupReleasesTaskTest.php similarity index 100% rename from Tests/Unit/Task/CleanupReleasesTaskTest.php rename to tests/Unit/Task/CleanupReleasesTaskTest.php diff --git a/Tests/Unit/Task/Composer/CommandTaskTest.php b/tests/Unit/Task/Composer/CommandTaskTest.php similarity index 100% rename from Tests/Unit/Task/Composer/CommandTaskTest.php rename to tests/Unit/Task/Composer/CommandTaskTest.php diff --git a/Tests/Unit/Task/Composer/DownloadTaskTest.php b/tests/Unit/Task/Composer/DownloadTaskTest.php similarity index 100% rename from Tests/Unit/Task/Composer/DownloadTaskTest.php rename to tests/Unit/Task/Composer/DownloadTaskTest.php diff --git a/Tests/Unit/Task/Composer/InstallTaskTest.php b/tests/Unit/Task/Composer/InstallTaskTest.php similarity index 100% rename from Tests/Unit/Task/Composer/InstallTaskTest.php rename to tests/Unit/Task/Composer/InstallTaskTest.php diff --git a/Tests/Unit/Task/DumpDatabaseTaskTest.php b/tests/Unit/Task/DumpDatabaseTaskTest.php similarity index 100% rename from Tests/Unit/Task/DumpDatabaseTaskTest.php rename to tests/Unit/Task/DumpDatabaseTaskTest.php diff --git a/Tests/Unit/Task/Generic/CreateDirectoriesTaskTest.php b/tests/Unit/Task/Generic/CreateDirectoriesTaskTest.php similarity index 100% rename from Tests/Unit/Task/Generic/CreateDirectoriesTaskTest.php rename to tests/Unit/Task/Generic/CreateDirectoriesTaskTest.php diff --git a/Tests/Unit/Task/Generic/CreateSymlinksTaskTest.php b/tests/Unit/Task/Generic/CreateSymlinksTaskTest.php similarity index 100% rename from Tests/Unit/Task/Generic/CreateSymlinksTaskTest.php rename to tests/Unit/Task/Generic/CreateSymlinksTaskTest.php diff --git a/Tests/Unit/Task/Generic/RollbackTaskTest.php b/tests/Unit/Task/Generic/RollbackTaskTest.php similarity index 100% rename from Tests/Unit/Task/Generic/RollbackTaskTest.php rename to tests/Unit/Task/Generic/RollbackTaskTest.php diff --git a/Tests/Unit/Task/Git/TagTaskTest.php b/tests/Unit/Task/Git/TagTaskTest.php similarity index 100% rename from Tests/Unit/Task/Git/TagTaskTest.php rename to tests/Unit/Task/Git/TagTaskTest.php diff --git a/Tests/Unit/Task/GitCheckoutTaskTest.php b/tests/Unit/Task/GitCheckoutTaskTest.php similarity index 100% rename from Tests/Unit/Task/GitCheckoutTaskTest.php rename to tests/Unit/Task/GitCheckoutTaskTest.php diff --git a/Tests/Unit/Task/LockDeploymentTaskTest.php b/tests/Unit/Task/LockDeploymentTaskTest.php similarity index 100% rename from Tests/Unit/Task/LockDeploymentTaskTest.php rename to tests/Unit/Task/LockDeploymentTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/CopyConfigurationTaskTest.php b/tests/Unit/Task/Neos/Flow/CopyConfigurationTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/CopyConfigurationTaskTest.php rename to tests/Unit/Task/Neos/Flow/CopyConfigurationTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/CreateDirectoriesTaskTest.php b/tests/Unit/Task/Neos/Flow/CreateDirectoriesTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/CreateDirectoriesTaskTest.php rename to tests/Unit/Task/Neos/Flow/CreateDirectoriesTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1.php b/tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1.php rename to tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1.php diff --git a/Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.php b/tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.php rename to tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.php diff --git a/Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.yaml b/tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.yaml similarity index 100% rename from Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.yaml rename to tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Production/Settings.yaml diff --git a/Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Settings.yaml b/tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Settings.yaml similarity index 100% rename from Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Settings.yaml rename to tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test1/Configuration/Settings.yaml diff --git a/Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2.php b/tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2.php rename to tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2.php diff --git a/Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2/Configuration/Settings.yaml.encrypted b/tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2/Configuration/Settings.yaml.encrypted similarity index 100% rename from Tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2/Configuration/Settings.yaml.encrypted rename to tests/Unit/Task/Neos/Flow/Fixtures/DeploymentConfigurations/test2/Configuration/Settings.yaml.encrypted diff --git a/Tests/Unit/Task/Neos/Flow/FlushCacheListTaskTest.php b/tests/Unit/Task/Neos/Flow/FlushCacheListTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/FlushCacheListTaskTest.php rename to tests/Unit/Task/Neos/Flow/FlushCacheListTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/FunctionalTestTaskTest.php b/tests/Unit/Task/Neos/Flow/FunctionalTestTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/FunctionalTestTaskTest.php rename to tests/Unit/Task/Neos/Flow/FunctionalTestTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/MigrateTaskTest.php b/tests/Unit/Task/Neos/Flow/MigrateTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/MigrateTaskTest.php rename to tests/Unit/Task/Neos/Flow/MigrateTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/PublishResourcesTaskTest.php b/tests/Unit/Task/Neos/Flow/PublishResourcesTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/PublishResourcesTaskTest.php rename to tests/Unit/Task/Neos/Flow/PublishResourcesTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/RunCommandTaskTest.php b/tests/Unit/Task/Neos/Flow/RunCommandTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/RunCommandTaskTest.php rename to tests/Unit/Task/Neos/Flow/RunCommandTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/SetFilePermissionsTaskTest.php b/tests/Unit/Task/Neos/Flow/SetFilePermissionsTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/SetFilePermissionsTaskTest.php rename to tests/Unit/Task/Neos/Flow/SetFilePermissionsTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/SymlinkConfigurationTaskTest.php b/tests/Unit/Task/Neos/Flow/SymlinkConfigurationTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/SymlinkConfigurationTaskTest.php rename to tests/Unit/Task/Neos/Flow/SymlinkConfigurationTaskTest.php diff --git a/Tests/Unit/Task/Neos/Flow/UnitTestTaskTest.php b/tests/Unit/Task/Neos/Flow/UnitTestTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Flow/UnitTestTaskTest.php rename to tests/Unit/Task/Neos/Flow/UnitTestTaskTest.php diff --git a/Tests/Unit/Task/Neos/Neos/ImportSiteTaskTest.php b/tests/Unit/Task/Neos/Neos/ImportSiteTaskTest.php similarity index 100% rename from Tests/Unit/Task/Neos/Neos/ImportSiteTaskTest.php rename to tests/Unit/Task/Neos/Neos/ImportSiteTaskTest.php diff --git a/Tests/Unit/Task/Php/WebOpcacheResetCreateScriptTaskTest.php b/tests/Unit/Task/Php/WebOpcacheResetCreateScriptTaskTest.php similarity index 100% rename from Tests/Unit/Task/Php/WebOpcacheResetCreateScriptTaskTest.php rename to tests/Unit/Task/Php/WebOpcacheResetCreateScriptTaskTest.php diff --git a/Tests/Unit/Task/Php/WebOpcacheResetExecuteTaskTest.php b/tests/Unit/Task/Php/WebOpcacheResetExecuteTaskTest.php similarity index 100% rename from Tests/Unit/Task/Php/WebOpcacheResetExecuteTaskTest.php rename to tests/Unit/Task/Php/WebOpcacheResetExecuteTaskTest.php diff --git a/Tests/Unit/Task/Release/AddDownloadTaskTest.php b/tests/Unit/Task/Release/AddDownloadTaskTest.php similarity index 100% rename from Tests/Unit/Task/Release/AddDownloadTaskTest.php rename to tests/Unit/Task/Release/AddDownloadTaskTest.php diff --git a/Tests/Unit/Task/Release/PrepareReleaseTaskTest.php b/tests/Unit/Task/Release/PrepareReleaseTaskTest.php similarity index 100% rename from Tests/Unit/Task/Release/PrepareReleaseTaskTest.php rename to tests/Unit/Task/Release/PrepareReleaseTaskTest.php diff --git a/Tests/Unit/Task/RsyncFoldersTaskTest.php b/tests/Unit/Task/RsyncFoldersTaskTest.php similarity index 100% rename from Tests/Unit/Task/RsyncFoldersTaskTest.php rename to tests/Unit/Task/RsyncFoldersTaskTest.php diff --git a/Tests/Unit/Task/ShellTaskTest.php b/tests/Unit/Task/ShellTaskTest.php similarity index 100% rename from Tests/Unit/Task/ShellTaskTest.php rename to tests/Unit/Task/ShellTaskTest.php diff --git a/Tests/Unit/Task/StopTaskTest.php b/tests/Unit/Task/StopTaskTest.php similarity index 100% rename from Tests/Unit/Task/StopTaskTest.php rename to tests/Unit/Task/StopTaskTest.php diff --git a/Tests/Unit/Task/TYPO3/CMS/RunCommandTaskTest.php b/tests/Unit/Task/TYPO3/CMS/RunCommandTaskTest.php similarity index 100% rename from Tests/Unit/Task/TYPO3/CMS/RunCommandTaskTest.php rename to tests/Unit/Task/TYPO3/CMS/RunCommandTaskTest.php diff --git a/Tests/Unit/Task/TYPO3/CMS/SetUpExtensionsTaskTest.php b/tests/Unit/Task/TYPO3/CMS/SetUpExtensionsTaskTest.php similarity index 100% rename from Tests/Unit/Task/TYPO3/CMS/SetUpExtensionsTaskTest.php rename to tests/Unit/Task/TYPO3/CMS/SetUpExtensionsTaskTest.php diff --git a/Tests/Unit/Task/TYPO3/CMS/SymlinkDataTaskTest.php b/tests/Unit/Task/TYPO3/CMS/SymlinkDataTaskTest.php similarity index 100% rename from Tests/Unit/Task/TYPO3/CMS/SymlinkDataTaskTest.php rename to tests/Unit/Task/TYPO3/CMS/SymlinkDataTaskTest.php diff --git a/Tests/Unit/Task/Test/HttpTestTaskTest.php b/tests/Unit/Task/Test/HttpTestTaskTest.php similarity index 100% rename from Tests/Unit/Task/Test/HttpTestTaskTest.php rename to tests/Unit/Task/Test/HttpTestTaskTest.php diff --git a/Tests/Unit/Task/Transfer/RsyncTaskTest.php b/tests/Unit/Task/Transfer/RsyncTaskTest.php similarity index 100% rename from Tests/Unit/Task/Transfer/RsyncTaskTest.php rename to tests/Unit/Task/Transfer/RsyncTaskTest.php diff --git a/Tests/Unit/Task/Transfer/ScpTaskTest.php b/tests/Unit/Task/Transfer/ScpTaskTest.php similarity index 100% rename from Tests/Unit/Task/Transfer/ScpTaskTest.php rename to tests/Unit/Task/Transfer/ScpTaskTest.php diff --git a/Tests/Unit/Task/UnlockDeploymentTaskTest.php b/tests/Unit/Task/UnlockDeploymentTaskTest.php similarity index 100% rename from Tests/Unit/Task/UnlockDeploymentTaskTest.php rename to tests/Unit/Task/UnlockDeploymentTaskTest.php diff --git a/Tests/Unit/Task/VarnishBanTaskTest.php b/tests/Unit/Task/VarnishBanTaskTest.php similarity index 100% rename from Tests/Unit/Task/VarnishBanTaskTest.php rename to tests/Unit/Task/VarnishBanTaskTest.php diff --git a/Tests/Unit/Task/VarnishPurgeTaskTest.php b/tests/Unit/Task/VarnishPurgeTaskTest.php similarity index 100% rename from Tests/Unit/Task/VarnishPurgeTaskTest.php rename to tests/Unit/Task/VarnishPurgeTaskTest.php