diff --git a/CHANGELOG.md b/CHANGELOG.md
index 374ebe98..7c3c948f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
### Changed
+- Moved source code to `src/` and tests to `tests/`
- Removed `twig/twig` dependency
- Removed hard dependency on `php-http/cache-plugin`. If you want to use the
cache plugin, you need to require it in your project.
diff --git a/composer.json b/composer.json
index 3691afee..ffac6324 100644
--- a/composer.json
+++ b/composer.json
@@ -62,15 +62,18 @@
},
"autoload": {
"psr-4": {
- "Http\\HttplugBundle\\": ""
+ "Http\\HttplugBundle\\": "src/"
},
"exclude-from-classmap": [
"/Tests/Resources/MyPsr18TestClient.php"
]
},
"autoload-dev": {
+ "psr-4": {
+ "Http\\HttplugBundle\\Tests\\": "tests/"
+ },
"classmap": [
- "Tests/Resources/app/AppKernel.php"
+ "tests/Resources/app/AppKernel.php"
]
},
"scripts": {
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 4efc5aea..9c2f2cb7 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -12,10 +12,10 @@
- ./Tests/Unit
+ ./tests/Unit
- ./Tests/Functional
+ ./tests/Functional
@@ -24,14 +24,14 @@
./
./Resources
- ./Tests
+ ./tests
./vendor
-
+
diff --git a/ClientFactory/AutoDiscoveryFactory.php b/src/ClientFactory/AutoDiscoveryFactory.php
similarity index 100%
rename from ClientFactory/AutoDiscoveryFactory.php
rename to src/ClientFactory/AutoDiscoveryFactory.php
diff --git a/ClientFactory/BuzzFactory.php b/src/ClientFactory/BuzzFactory.php
similarity index 100%
rename from ClientFactory/BuzzFactory.php
rename to src/ClientFactory/BuzzFactory.php
diff --git a/ClientFactory/ClientFactory.php b/src/ClientFactory/ClientFactory.php
similarity index 100%
rename from ClientFactory/ClientFactory.php
rename to src/ClientFactory/ClientFactory.php
diff --git a/ClientFactory/CurlFactory.php b/src/ClientFactory/CurlFactory.php
similarity index 100%
rename from ClientFactory/CurlFactory.php
rename to src/ClientFactory/CurlFactory.php
diff --git a/ClientFactory/DummyClient.php b/src/ClientFactory/DummyClient.php
similarity index 100%
rename from ClientFactory/DummyClient.php
rename to src/ClientFactory/DummyClient.php
diff --git a/ClientFactory/Guzzle5Factory.php b/src/ClientFactory/Guzzle5Factory.php
similarity index 100%
rename from ClientFactory/Guzzle5Factory.php
rename to src/ClientFactory/Guzzle5Factory.php
diff --git a/ClientFactory/Guzzle6Factory.php b/src/ClientFactory/Guzzle6Factory.php
similarity index 100%
rename from ClientFactory/Guzzle6Factory.php
rename to src/ClientFactory/Guzzle6Factory.php
diff --git a/ClientFactory/MockFactory.php b/src/ClientFactory/MockFactory.php
similarity index 100%
rename from ClientFactory/MockFactory.php
rename to src/ClientFactory/MockFactory.php
diff --git a/ClientFactory/PluginClientFactory.php b/src/ClientFactory/PluginClientFactory.php
similarity index 100%
rename from ClientFactory/PluginClientFactory.php
rename to src/ClientFactory/PluginClientFactory.php
diff --git a/ClientFactory/ReactFactory.php b/src/ClientFactory/ReactFactory.php
similarity index 100%
rename from ClientFactory/ReactFactory.php
rename to src/ClientFactory/ReactFactory.php
diff --git a/ClientFactory/SocketFactory.php b/src/ClientFactory/SocketFactory.php
similarity index 100%
rename from ClientFactory/SocketFactory.php
rename to src/ClientFactory/SocketFactory.php
diff --git a/Collector/Collector.php b/src/Collector/Collector.php
similarity index 100%
rename from Collector/Collector.php
rename to src/Collector/Collector.php
diff --git a/Collector/Formatter.php b/src/Collector/Formatter.php
similarity index 100%
rename from Collector/Formatter.php
rename to src/Collector/Formatter.php
diff --git a/Collector/PluginClientFactory.php b/src/Collector/PluginClientFactory.php
similarity index 100%
rename from Collector/PluginClientFactory.php
rename to src/Collector/PluginClientFactory.php
diff --git a/Collector/PluginClientFactoryListener.php b/src/Collector/PluginClientFactoryListener.php
similarity index 100%
rename from Collector/PluginClientFactoryListener.php
rename to src/Collector/PluginClientFactoryListener.php
diff --git a/Collector/Profile.php b/src/Collector/Profile.php
similarity index 100%
rename from Collector/Profile.php
rename to src/Collector/Profile.php
diff --git a/Collector/ProfileClient.php b/src/Collector/ProfileClient.php
similarity index 100%
rename from Collector/ProfileClient.php
rename to src/Collector/ProfileClient.php
diff --git a/Collector/ProfileClientFactory.php b/src/Collector/ProfileClientFactory.php
similarity index 100%
rename from Collector/ProfileClientFactory.php
rename to src/Collector/ProfileClientFactory.php
diff --git a/Collector/ProfilePlugin.php b/src/Collector/ProfilePlugin.php
similarity index 100%
rename from Collector/ProfilePlugin.php
rename to src/Collector/ProfilePlugin.php
diff --git a/Collector/Stack.php b/src/Collector/Stack.php
similarity index 100%
rename from Collector/Stack.php
rename to src/Collector/Stack.php
diff --git a/Collector/StackPlugin.php b/src/Collector/StackPlugin.php
similarity index 100%
rename from Collector/StackPlugin.php
rename to src/Collector/StackPlugin.php
diff --git a/Collector/Twig/HttpMessageMarkupExtension.php b/src/Collector/Twig/HttpMessageMarkupExtension.php
similarity index 100%
rename from Collector/Twig/HttpMessageMarkupExtension.php
rename to src/Collector/Twig/HttpMessageMarkupExtension.php
diff --git a/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php
similarity index 100%
rename from DependencyInjection/Configuration.php
rename to src/DependencyInjection/Configuration.php
diff --git a/DependencyInjection/HttplugExtension.php b/src/DependencyInjection/HttplugExtension.php
similarity index 100%
rename from DependencyInjection/HttplugExtension.php
rename to src/DependencyInjection/HttplugExtension.php
diff --git a/Discovery/ConfiguredClientsStrategy.php b/src/Discovery/ConfiguredClientsStrategy.php
similarity index 100%
rename from Discovery/ConfiguredClientsStrategy.php
rename to src/Discovery/ConfiguredClientsStrategy.php
diff --git a/HttplugBundle.php b/src/HttplugBundle.php
similarity index 100%
rename from HttplugBundle.php
rename to src/HttplugBundle.php
diff --git a/Resources/config/data-collector.xml b/src/Resources/config/data-collector.xml
similarity index 100%
rename from Resources/config/data-collector.xml
rename to src/Resources/config/data-collector.xml
diff --git a/Resources/config/mock-client.xml b/src/Resources/config/mock-client.xml
similarity index 100%
rename from Resources/config/mock-client.xml
rename to src/Resources/config/mock-client.xml
diff --git a/Resources/config/plugins.xml b/src/Resources/config/plugins.xml
similarity index 100%
rename from Resources/config/plugins.xml
rename to src/Resources/config/plugins.xml
diff --git a/Resources/config/services.xml b/src/Resources/config/services.xml
similarity index 100%
rename from Resources/config/services.xml
rename to src/Resources/config/services.xml
diff --git a/Resources/views/Icon/httplug.svg b/src/Resources/views/Icon/httplug.svg
similarity index 100%
rename from Resources/views/Icon/httplug.svg
rename to src/Resources/views/Icon/httplug.svg
diff --git a/Resources/views/script/httplug.js.twig b/src/Resources/views/script/httplug.js.twig
similarity index 100%
rename from Resources/views/script/httplug.js.twig
rename to src/Resources/views/script/httplug.js.twig
diff --git a/Resources/views/stack.html.twig b/src/Resources/views/stack.html.twig
similarity index 100%
rename from Resources/views/stack.html.twig
rename to src/Resources/views/stack.html.twig
diff --git a/Resources/views/style/httplug.css.twig b/src/Resources/views/style/httplug.css.twig
similarity index 100%
rename from Resources/views/style/httplug.css.twig
rename to src/Resources/views/style/httplug.css.twig
diff --git a/Resources/views/webprofiler.html.twig b/src/Resources/views/webprofiler.html.twig
similarity index 100%
rename from Resources/views/webprofiler.html.twig
rename to src/Resources/views/webprofiler.html.twig
diff --git a/Tests/Functional/DiscoveredClientsTest.php b/tests/Functional/DiscoveredClientsTest.php
similarity index 100%
rename from Tests/Functional/DiscoveredClientsTest.php
rename to tests/Functional/DiscoveredClientsTest.php
diff --git a/Tests/Functional/DiscoveryTest.php b/tests/Functional/DiscoveryTest.php
similarity index 100%
rename from Tests/Functional/DiscoveryTest.php
rename to tests/Functional/DiscoveryTest.php
diff --git a/Tests/Functional/Issue206.php b/tests/Functional/Issue206.php
similarity index 100%
rename from Tests/Functional/Issue206.php
rename to tests/Functional/Issue206.php
diff --git a/Tests/Functional/ProfilerTest.php b/tests/Functional/ProfilerTest.php
similarity index 100%
rename from Tests/Functional/ProfilerTest.php
rename to tests/Functional/ProfilerTest.php
diff --git a/Tests/Functional/ProfilingTest.php b/tests/Functional/ProfilingTest.php
similarity index 100%
rename from Tests/Functional/ProfilingTest.php
rename to tests/Functional/ProfilingTest.php
diff --git a/Tests/Functional/ServiceInstantiationTest.php b/tests/Functional/ServiceInstantiationTest.php
similarity index 100%
rename from Tests/Functional/ServiceInstantiationTest.php
rename to tests/Functional/ServiceInstantiationTest.php
diff --git a/Tests/Resources/Fixtures/config/bc/cache_config.yml b/tests/Resources/Fixtures/config/bc/cache_config.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/bc/cache_config.yml
rename to tests/Resources/Fixtures/config/bc/cache_config.yml
diff --git a/Tests/Resources/Fixtures/config/bc/issue-166.yml b/tests/Resources/Fixtures/config/bc/issue-166.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/bc/issue-166.yml
rename to tests/Resources/Fixtures/config/bc/issue-166.yml
diff --git a/Tests/Resources/Fixtures/config/bc/profiling_toolbar.yml b/tests/Resources/Fixtures/config/bc/profiling_toolbar.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/bc/profiling_toolbar.yml
rename to tests/Resources/Fixtures/config/bc/profiling_toolbar.yml
diff --git a/Tests/Resources/Fixtures/config/bc/toolbar.yml b/tests/Resources/Fixtures/config/bc/toolbar.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/bc/toolbar.yml
rename to tests/Resources/Fixtures/config/bc/toolbar.yml
diff --git a/Tests/Resources/Fixtures/config/bc/toolbar_auto.yml b/tests/Resources/Fixtures/config/bc/toolbar_auto.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/bc/toolbar_auto.yml
rename to tests/Resources/Fixtures/config/bc/toolbar_auto.yml
diff --git a/Tests/Resources/Fixtures/config/cache_config_with_no_pool.yml b/tests/Resources/Fixtures/config/cache_config_with_no_pool.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/cache_config_with_no_pool.yml
rename to tests/Resources/Fixtures/config/cache_config_with_no_pool.yml
diff --git a/Tests/Resources/Fixtures/config/client_cache_config_with_no_pool.yml b/tests/Resources/Fixtures/config/client_cache_config_with_no_pool.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/client_cache_config_with_no_pool.yml
rename to tests/Resources/Fixtures/config/client_cache_config_with_no_pool.yml
diff --git a/Tests/Resources/Fixtures/config/empty.php b/tests/Resources/Fixtures/config/empty.php
similarity index 100%
rename from Tests/Resources/Fixtures/config/empty.php
rename to tests/Resources/Fixtures/config/empty.php
diff --git a/Tests/Resources/Fixtures/config/empty.xml b/tests/Resources/Fixtures/config/empty.xml
similarity index 100%
rename from Tests/Resources/Fixtures/config/empty.xml
rename to tests/Resources/Fixtures/config/empty.xml
diff --git a/Tests/Resources/Fixtures/config/empty.yml b/tests/Resources/Fixtures/config/empty.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/empty.yml
rename to tests/Resources/Fixtures/config/empty.yml
diff --git a/Tests/Resources/Fixtures/config/full.php b/tests/Resources/Fixtures/config/full.php
similarity index 100%
rename from Tests/Resources/Fixtures/config/full.php
rename to tests/Resources/Fixtures/config/full.php
diff --git a/Tests/Resources/Fixtures/config/full.xml b/tests/Resources/Fixtures/config/full.xml
similarity index 100%
rename from Tests/Resources/Fixtures/config/full.xml
rename to tests/Resources/Fixtures/config/full.xml
diff --git a/Tests/Resources/Fixtures/config/full.yml b/tests/Resources/Fixtures/config/full.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/full.yml
rename to tests/Resources/Fixtures/config/full.yml
diff --git a/Tests/Resources/Fixtures/config/invalid_auth.yml b/tests/Resources/Fixtures/config/invalid_auth.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/invalid_auth.yml
rename to tests/Resources/Fixtures/config/invalid_auth.yml
diff --git a/Tests/Resources/Fixtures/config/invalid_cache_config.yml b/tests/Resources/Fixtures/config/invalid_cache_config.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/invalid_cache_config.yml
rename to tests/Resources/Fixtures/config/invalid_cache_config.yml
diff --git a/Tests/Resources/Fixtures/config/invalid_class.yml b/tests/Resources/Fixtures/config/invalid_class.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/invalid_class.yml
rename to tests/Resources/Fixtures/config/invalid_class.yml
diff --git a/Tests/Resources/Fixtures/config/invalid_plugin.yml b/tests/Resources/Fixtures/config/invalid_plugin.yml
similarity index 100%
rename from Tests/Resources/Fixtures/config/invalid_plugin.yml
rename to tests/Resources/Fixtures/config/invalid_plugin.yml
diff --git a/Tests/Resources/MyPsr18TestClient.php b/tests/Resources/MyPsr18TestClient.php
similarity index 100%
rename from Tests/Resources/MyPsr18TestClient.php
rename to tests/Resources/MyPsr18TestClient.php
diff --git a/Tests/Resources/app/AppKernel.php b/tests/Resources/app/AppKernel.php
similarity index 100%
rename from Tests/Resources/app/AppKernel.php
rename to tests/Resources/app/AppKernel.php
diff --git a/Tests/Resources/app/config/config_debug.yml b/tests/Resources/app/config/config_debug.yml
similarity index 100%
rename from Tests/Resources/app/config/config_debug.yml
rename to tests/Resources/app/config/config_debug.yml
diff --git a/Tests/Resources/app/config/config_discovery_disabled.yml b/tests/Resources/app/config/config_discovery_disabled.yml
similarity index 100%
rename from Tests/Resources/app/config/config_discovery_disabled.yml
rename to tests/Resources/app/config/config_discovery_disabled.yml
diff --git a/Tests/Resources/app/config/config_discovery_forced.yml b/tests/Resources/app/config/config_discovery_forced.yml
similarity index 100%
rename from Tests/Resources/app/config/config_discovery_forced.yml
rename to tests/Resources/app/config/config_discovery_forced.yml
diff --git a/Tests/Resources/app/config/config_psr18.yml b/tests/Resources/app/config/config_psr18.yml
similarity index 100%
rename from Tests/Resources/app/config/config_psr18.yml
rename to tests/Resources/app/config/config_psr18.yml
diff --git a/Tests/Resources/app/config/config_test.yml b/tests/Resources/app/config/config_test.yml
similarity index 100%
rename from Tests/Resources/app/config/config_test.yml
rename to tests/Resources/app/config/config_test.yml
diff --git a/Tests/Unit/ClientFactory/BuzzFactoryTest.php b/tests/Unit/ClientFactory/BuzzFactoryTest.php
similarity index 100%
rename from Tests/Unit/ClientFactory/BuzzFactoryTest.php
rename to tests/Unit/ClientFactory/BuzzFactoryTest.php
diff --git a/Tests/Unit/ClientFactory/CurlFactoryTest.php b/tests/Unit/ClientFactory/CurlFactoryTest.php
similarity index 100%
rename from Tests/Unit/ClientFactory/CurlFactoryTest.php
rename to tests/Unit/ClientFactory/CurlFactoryTest.php
diff --git a/Tests/Unit/ClientFactory/Guzzle6FactoryTest.php b/tests/Unit/ClientFactory/Guzzle6FactoryTest.php
similarity index 100%
rename from Tests/Unit/ClientFactory/Guzzle6FactoryTest.php
rename to tests/Unit/ClientFactory/Guzzle6FactoryTest.php
diff --git a/Tests/Unit/ClientFactory/MockFactoryTest.php b/tests/Unit/ClientFactory/MockFactoryTest.php
similarity index 100%
rename from Tests/Unit/ClientFactory/MockFactoryTest.php
rename to tests/Unit/ClientFactory/MockFactoryTest.php
diff --git a/Tests/Unit/ClientFactory/ReactFactoryTest.php b/tests/Unit/ClientFactory/ReactFactoryTest.php
similarity index 100%
rename from Tests/Unit/ClientFactory/ReactFactoryTest.php
rename to tests/Unit/ClientFactory/ReactFactoryTest.php
diff --git a/Tests/Unit/ClientFactory/SocketFactoryTest.php b/tests/Unit/ClientFactory/SocketFactoryTest.php
similarity index 100%
rename from Tests/Unit/ClientFactory/SocketFactoryTest.php
rename to tests/Unit/ClientFactory/SocketFactoryTest.php
diff --git a/Tests/Unit/Collector/CollectorTest.php b/tests/Unit/Collector/CollectorTest.php
similarity index 100%
rename from Tests/Unit/Collector/CollectorTest.php
rename to tests/Unit/Collector/CollectorTest.php
diff --git a/Tests/Unit/Collector/FormatterTest.php b/tests/Unit/Collector/FormatterTest.php
similarity index 100%
rename from Tests/Unit/Collector/FormatterTest.php
rename to tests/Unit/Collector/FormatterTest.php
diff --git a/Tests/Unit/Collector/PluginClientFactoryListenerTest.php b/tests/Unit/Collector/PluginClientFactoryListenerTest.php
similarity index 100%
rename from Tests/Unit/Collector/PluginClientFactoryListenerTest.php
rename to tests/Unit/Collector/PluginClientFactoryListenerTest.php
diff --git a/Tests/Unit/Collector/ProfileClientFactoryTest.php b/tests/Unit/Collector/ProfileClientFactoryTest.php
similarity index 100%
rename from Tests/Unit/Collector/ProfileClientFactoryTest.php
rename to tests/Unit/Collector/ProfileClientFactoryTest.php
diff --git a/Tests/Unit/Collector/ProfileClientTest.php b/tests/Unit/Collector/ProfileClientTest.php
similarity index 100%
rename from Tests/Unit/Collector/ProfileClientTest.php
rename to tests/Unit/Collector/ProfileClientTest.php
diff --git a/Tests/Unit/Collector/ProfilePluginTest.php b/tests/Unit/Collector/ProfilePluginTest.php
similarity index 100%
rename from Tests/Unit/Collector/ProfilePluginTest.php
rename to tests/Unit/Collector/ProfilePluginTest.php
diff --git a/Tests/Unit/Collector/StackPluginTest.php b/tests/Unit/Collector/StackPluginTest.php
similarity index 100%
rename from Tests/Unit/Collector/StackPluginTest.php
rename to tests/Unit/Collector/StackPluginTest.php
diff --git a/Tests/Unit/DependencyInjection/ConfigurationTest.php b/tests/Unit/DependencyInjection/ConfigurationTest.php
similarity index 100%
rename from Tests/Unit/DependencyInjection/ConfigurationTest.php
rename to tests/Unit/DependencyInjection/ConfigurationTest.php
diff --git a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php b/tests/Unit/DependencyInjection/HttplugExtensionTest.php
similarity index 100%
rename from Tests/Unit/DependencyInjection/HttplugExtensionTest.php
rename to tests/Unit/DependencyInjection/HttplugExtensionTest.php
diff --git a/Tests/Unit/Discovery/ConfiguredClientsStrategyTest.php b/tests/Unit/Discovery/ConfiguredClientsStrategyTest.php
similarity index 100%
rename from Tests/Unit/Discovery/ConfiguredClientsStrategyTest.php
rename to tests/Unit/Discovery/ConfiguredClientsStrategyTest.php