From 45c29904ed2641d644119d2cac46642be539a793 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 8 Feb 2014 15:25:17 +0000 Subject: [PATCH] PSR-4 autoloading --- .../graham-campbell/credentials/config.php | 18 +++++------ .../graham-campbell/htmlmin/config.php | 4 +-- .../graham-campbell/navigation/config.php | 2 +- .../graham-campbell/throttle/config.php | 32 +++++++++++++++++++ app/views/partials/navigation.blade.php | 2 +- app/views/posts/show.blade.php | 2 +- composer.json | 6 ++-- .../BootstrapCMSServiceProvider.php | 2 +- .../Commands/AbstractCommand.php | 0 .../BootstrapCMS => }/Commands/AppInstall.php | 0 .../BootstrapCMS => }/Commands/AppReset.php | 0 .../BootstrapCMS => }/Commands/AppUpdate.php | 0 .../Controllers/CachingController.php | 0 .../Controllers/CommentController.php | 0 .../Controllers/EventController.php | 0 .../Controllers/HomeController.php | 0 .../Controllers/PageController.php | 0 .../Controllers/PostController.php | 0 .../Controllers/QueuingController.php | 0 .../Handlers/TestHandler.php | 0 .../Observers/PageObserver.php | 0 .../Subscribers/CoreSubscriber.php | 0 .../Subscribers/NavigationSubscriber.php | 0 .../Subscribers/UserSubscriber.php | 0 .../BootstrapCMS => }/AbstractTestCase.php | 2 +- .../Tests/BootstrapCMS => }/BasicTest.php | 0 .../BootstrapCMS => }/ServiceProviderTest.php | 0 27 files changed, 51 insertions(+), 19 deletions(-) create mode 100644 app/config/packages/graham-campbell/throttle/config.php rename src/{GrahamCampbell/BootstrapCMS => }/BootstrapCMSServiceProvider.php (97%) rename src/{GrahamCampbell/BootstrapCMS => }/Commands/AbstractCommand.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Commands/AppInstall.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Commands/AppReset.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Commands/AppUpdate.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Controllers/CachingController.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Controllers/CommentController.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Controllers/EventController.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Controllers/HomeController.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Controllers/PageController.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Controllers/PostController.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Controllers/QueuingController.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Handlers/TestHandler.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Observers/PageObserver.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Subscribers/CoreSubscriber.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Subscribers/NavigationSubscriber.php (100%) rename src/{GrahamCampbell/BootstrapCMS => }/Subscribers/UserSubscriber.php (100%) rename tests/{GrahamCampbell/Tests/BootstrapCMS => }/AbstractTestCase.php (95%) rename tests/{GrahamCampbell/Tests/BootstrapCMS => }/BasicTest.php (100%) rename tests/{GrahamCampbell/Tests/BootstrapCMS => }/ServiceProviderTest.php (100%) diff --git a/app/config/packages/graham-campbell/credentials/config.php b/app/config/packages/graham-campbell/credentials/config.php index 8acb07c5f..2095bf2c5 100644 --- a/app/config/packages/graham-campbell/credentials/config.php +++ b/app/config/packages/graham-campbell/credentials/config.php @@ -44,7 +44,7 @@ /* |-------------------------------------------------------------------------- - | Require Email Verification On Registration + | Email Verification On Registration |-------------------------------------------------------------------------- | | This defines if public registration requires email activation. @@ -60,43 +60,43 @@ | Login Page |-------------------------------------------------------------------------- | - | This specifies the view that is used for the login page. + | This defines the view that is used for the login page. | */ - 'login' => 'credentials::account.login', + 'login' => 'graham-campbell/credentials::account.login', /* |-------------------------------------------------------------------------- | Registration Page |-------------------------------------------------------------------------- | - | This specifies the view that is used for the registration page. + | This defines the view that is used for the registration page. | */ - 'registration' => 'credentials::account.register', + 'registration' => 'graham-campbell/credentials::account.register', /* |-------------------------------------------------------------------------- | Forgot Password Page |-------------------------------------------------------------------------- | - | This specifies the view that is used for the forgot password page. + | This defines the view that is used for the forgot password page. | */ - 'reset' => 'credentials::account.reset', + 'reset' => 'graham-campbell/credentials::account.reset', /* |-------------------------------------------------------------------------- | Profile Password Page |-------------------------------------------------------------------------- | - | This specifies the view that is used for the profile page. + | This defines the view that is used for the profile page. | */ - 'profile' => 'credentials::account.profile' + 'profile' => 'graham-campbell/credentials::account.profile' ); diff --git a/app/config/packages/graham-campbell/htmlmin/config.php b/app/config/packages/graham-campbell/htmlmin/config.php index 2ecf61838..46bbb450f 100644 --- a/app/config/packages/graham-campbell/htmlmin/config.php +++ b/app/config/packages/graham-campbell/htmlmin/config.php @@ -25,7 +25,7 @@ | compiled. These optimizations have little impact on php processing time | as the optimizations are only applied once and are cached. This package | will do nothing by default to allow it to be used without minifying - | pages automatically + | pages automatically. | | Default: false | @@ -42,7 +42,7 @@ | are served. These optimizations have greater impact on php processing | time as the optimizations are applied on every request. This package | will do nothing by default to allow it to be used without minifying - | pages automatically + | pages automatically. | | Default: false | diff --git a/app/config/packages/graham-campbell/navigation/config.php b/app/config/packages/graham-campbell/navigation/config.php index af4a6c194..dc36abb58 100644 --- a/app/config/packages/graham-campbell/navigation/config.php +++ b/app/config/packages/graham-campbell/navigation/config.php @@ -23,7 +23,7 @@ | | This option specifies the view to use. | - | Default: 'navigation::bootstrap' + | Default: 'graham-campbell/navigation::bootstrap' | */ diff --git a/app/config/packages/graham-campbell/throttle/config.php b/app/config/packages/graham-campbell/throttle/config.php new file mode 100644 index 000000000..ed1430219 --- /dev/null +++ b/app/config/packages/graham-campbell/throttle/config.php @@ -0,0 +1,32 @@ + 'GrahamCampbell\Throttle\Throttlers\CacheThrottler' + +); diff --git a/app/views/partials/navigation.blade.php b/app/views/partials/navigation.blade.php index fde831207..6649c3e75 100644 --- a/app/views/partials/navigation.blade.php +++ b/app/views/partials/navigation.blade.php @@ -49,7 +49,7 @@ Login - @if (Config::get('credentials::regallowed')) + @if (Config::get('graham-campbell/credentials::regallowed'))
  • Register diff --git a/app/views/posts/show.blade.php b/app/views/posts/show.blade.php index 7c7273df9..401ca7edd 100644 --- a/app/views/posts/show.blade.php +++ b/app/views/posts/show.blade.php @@ -92,7 +92,7 @@
    @else

    - @if (Config::get('credentials::regallowed')) + @if (Config::get('graham-campbell/credentials::regallowed')) Please login or register to post a comment. @else Please login to post a comment. diff --git a/composer.json b/composer.json index 2050658a9..74dd55efe 100644 --- a/composer.json +++ b/composer.json @@ -52,9 +52,9 @@ "app/database/migrations", "app/database/seeds" ], - "psr-0": { - "GrahamCampbell\\BootstrapCMS": "src/", - "GrahamCampbell\\Tests\\BootstrapCMS": "tests/" + "psr-4": { + "GrahamCampbell\\BootstrapCMS\\": "src/", + "GrahamCampbell\\Tests\\BootstrapCMS\\": "tests/" } }, "scripts": { diff --git a/src/GrahamCampbell/BootstrapCMS/BootstrapCMSServiceProvider.php b/src/BootstrapCMSServiceProvider.php similarity index 97% rename from src/GrahamCampbell/BootstrapCMS/BootstrapCMSServiceProvider.php rename to src/BootstrapCMSServiceProvider.php index 4c887cbd3..00a21d84b 100644 --- a/src/GrahamCampbell/BootstrapCMS/BootstrapCMSServiceProvider.php +++ b/src/BootstrapCMSServiceProvider.php @@ -43,7 +43,7 @@ class BootstrapCMSServiceProvider extends ServiceProvider */ public function boot() { - $this->package('graham-campbell/bootstrap-cms'); + $this->package('graham-campbell/bootstrap-cms', 'graham-campbell/bootstrap-cms', __DIR__); } /** diff --git a/src/GrahamCampbell/BootstrapCMS/Commands/AbstractCommand.php b/src/Commands/AbstractCommand.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Commands/AbstractCommand.php rename to src/Commands/AbstractCommand.php diff --git a/src/GrahamCampbell/BootstrapCMS/Commands/AppInstall.php b/src/Commands/AppInstall.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Commands/AppInstall.php rename to src/Commands/AppInstall.php diff --git a/src/GrahamCampbell/BootstrapCMS/Commands/AppReset.php b/src/Commands/AppReset.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Commands/AppReset.php rename to src/Commands/AppReset.php diff --git a/src/GrahamCampbell/BootstrapCMS/Commands/AppUpdate.php b/src/Commands/AppUpdate.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Commands/AppUpdate.php rename to src/Commands/AppUpdate.php diff --git a/src/GrahamCampbell/BootstrapCMS/Controllers/CachingController.php b/src/Controllers/CachingController.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Controllers/CachingController.php rename to src/Controllers/CachingController.php diff --git a/src/GrahamCampbell/BootstrapCMS/Controllers/CommentController.php b/src/Controllers/CommentController.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Controllers/CommentController.php rename to src/Controllers/CommentController.php diff --git a/src/GrahamCampbell/BootstrapCMS/Controllers/EventController.php b/src/Controllers/EventController.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Controllers/EventController.php rename to src/Controllers/EventController.php diff --git a/src/GrahamCampbell/BootstrapCMS/Controllers/HomeController.php b/src/Controllers/HomeController.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Controllers/HomeController.php rename to src/Controllers/HomeController.php diff --git a/src/GrahamCampbell/BootstrapCMS/Controllers/PageController.php b/src/Controllers/PageController.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Controllers/PageController.php rename to src/Controllers/PageController.php diff --git a/src/GrahamCampbell/BootstrapCMS/Controllers/PostController.php b/src/Controllers/PostController.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Controllers/PostController.php rename to src/Controllers/PostController.php diff --git a/src/GrahamCampbell/BootstrapCMS/Controllers/QueuingController.php b/src/Controllers/QueuingController.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Controllers/QueuingController.php rename to src/Controllers/QueuingController.php diff --git a/src/GrahamCampbell/BootstrapCMS/Handlers/TestHandler.php b/src/Handlers/TestHandler.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Handlers/TestHandler.php rename to src/Handlers/TestHandler.php diff --git a/src/GrahamCampbell/BootstrapCMS/Observers/PageObserver.php b/src/Observers/PageObserver.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Observers/PageObserver.php rename to src/Observers/PageObserver.php diff --git a/src/GrahamCampbell/BootstrapCMS/Subscribers/CoreSubscriber.php b/src/Subscribers/CoreSubscriber.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Subscribers/CoreSubscriber.php rename to src/Subscribers/CoreSubscriber.php diff --git a/src/GrahamCampbell/BootstrapCMS/Subscribers/NavigationSubscriber.php b/src/Subscribers/NavigationSubscriber.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Subscribers/NavigationSubscriber.php rename to src/Subscribers/NavigationSubscriber.php diff --git a/src/GrahamCampbell/BootstrapCMS/Subscribers/UserSubscriber.php b/src/Subscribers/UserSubscriber.php similarity index 100% rename from src/GrahamCampbell/BootstrapCMS/Subscribers/UserSubscriber.php rename to src/Subscribers/UserSubscriber.php diff --git a/tests/GrahamCampbell/Tests/BootstrapCMS/AbstractTestCase.php b/tests/AbstractTestCase.php similarity index 95% rename from tests/GrahamCampbell/Tests/BootstrapCMS/AbstractTestCase.php rename to tests/AbstractTestCase.php index 62436f7b9..fd69de934 100644 --- a/tests/GrahamCampbell/Tests/BootstrapCMS/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -38,7 +38,7 @@ public function createApplication() { $unitTesting = true; $testEnvironment = 'testing'; - return require __DIR__.'/../../../../bootstrap/start.php'; + return require __DIR__.'/../bootstrap/start.php'; } /** diff --git a/tests/GrahamCampbell/Tests/BootstrapCMS/BasicTest.php b/tests/BasicTest.php similarity index 100% rename from tests/GrahamCampbell/Tests/BootstrapCMS/BasicTest.php rename to tests/BasicTest.php diff --git a/tests/GrahamCampbell/Tests/BootstrapCMS/ServiceProviderTest.php b/tests/ServiceProviderTest.php similarity index 100% rename from tests/GrahamCampbell/Tests/BootstrapCMS/ServiceProviderTest.php rename to tests/ServiceProviderTest.php