Merge pull request #24200 from owncloud/appframework_psr4

Move \OC\AppFramework to PSR-4
remotes/origin/ldap-integration-tests-1up
Thomas Müller 9 years ago
commit e37b95ae53
  1. 6
      lib/base.php
  2. 0
      lib/private/AppFramework/App.php
  3. 0
      lib/private/AppFramework/Core/API.php
  4. 0
      lib/private/AppFramework/Db/Db.php
  5. 0
      lib/private/AppFramework/DependencyInjection/DIContainer.php
  6. 0
      lib/private/AppFramework/Http.php
  7. 0
      lib/private/AppFramework/Http/Dispatcher.php
  8. 0
      lib/private/AppFramework/Http/Output.php
  9. 0
      lib/private/AppFramework/Http/Request.php
  10. 0
      lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
  11. 0
      lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
  12. 4
      lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php
  13. 4
      lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php
  14. 4
      lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php
  15. 4
      lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php
  16. 0
      lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php
  17. 8
      lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
  18. 0
      lib/private/AppFramework/Middleware/SessionMiddleware.php
  19. 2
      lib/private/AppFramework/Routing/RouteActionHandler.php
  20. 2
      lib/private/AppFramework/Routing/RouteConfig.php
  21. 0
      lib/private/AppFramework/Utility/ControllerMethodReflector.php
  22. 0
      lib/private/AppFramework/Utility/SimpleContainer.php
  23. 0
      lib/private/AppFramework/Utility/TimeFactory.php
  24. 2
      lib/public/appframework/app.php
  25. 2
      settings/Middleware/SubadminMiddleware.php
  26. 8
      tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
  27. 2
      tests/lib/appframework/routing/RoutingTest.php
  28. 4
      tests/settings/middleware/subadminmiddlewaretest.php

@ -492,6 +492,9 @@ class OC {
self::$CLI = (php_sapi_name() == 'cli'); self::$CLI = (php_sapi_name() == 'cli');
// Add default composer PSR-4 autoloader
require_once OC::$SERVERROOT . '/lib/composer/autoload.php';
try { try {
self::initPaths(); self::initPaths();
// setup 3rdparty autoloader // setup 3rdparty autoloader
@ -511,9 +514,6 @@ class OC {
exit(); exit();
} }
// Add default composer PSR-4 autoloader
require_once OC::$SERVERROOT . '/lib/composer/autoload.php';
// setup the basic server // setup the basic server
self::$server = new \OC\Server(\OC::$WEBROOT, self::$config); self::$server = new \OC\Server(\OC::$WEBROOT, self::$config);
\OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd); \OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd);

@ -21,7 +21,7 @@
* *
*/ */
namespace OC\Appframework\Middleware\Security\Exceptions; namespace OC\AppFramework\Middleware\Security\Exceptions;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
* Class AppNotEnabledException is thrown when a resource for an application is * Class AppNotEnabledException is thrown when a resource for an application is
* requested that is not enabled. * requested that is not enabled.
* *
* @package OC\Appframework\Middleware\Security\Exceptions * @package OC\AppFramework\Middleware\Security\Exceptions
*/ */
class AppNotEnabledException extends SecurityException { class AppNotEnabledException extends SecurityException {
public function __construct() { public function __construct() {

@ -21,7 +21,7 @@
* *
*/ */
namespace OC\Appframework\Middleware\Security\Exceptions; namespace OC\AppFramework\Middleware\Security\Exceptions;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
* Class CrossSiteRequestForgeryException is thrown when a CSRF exception has * Class CrossSiteRequestForgeryException is thrown when a CSRF exception has
* been encountered. * been encountered.
* *
* @package OC\Appframework\Middleware\Security\Exceptions * @package OC\AppFramework\Middleware\Security\Exceptions
*/ */
class CrossSiteRequestForgeryException extends SecurityException { class CrossSiteRequestForgeryException extends SecurityException {
public function __construct() { public function __construct() {

@ -21,7 +21,7 @@
* *
*/ */
namespace OC\Appframework\Middleware\Security\Exceptions; namespace OC\AppFramework\Middleware\Security\Exceptions;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
* Class NotAdminException is thrown when a resource has been requested by a * Class NotAdminException is thrown when a resource has been requested by a
* non-admin user that is not accessible to non-admin users. * non-admin user that is not accessible to non-admin users.
* *
* @package OC\Appframework\Middleware\Security\Exceptions * @package OC\AppFramework\Middleware\Security\Exceptions
*/ */
class NotAdminException extends SecurityException { class NotAdminException extends SecurityException {
public function __construct() { public function __construct() {

@ -21,7 +21,7 @@
* *
*/ */
namespace OC\Appframework\Middleware\Security\Exceptions; namespace OC\AppFramework\Middleware\Security\Exceptions;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
* Class NotLoggedInException is thrown when a resource has been requested by a * Class NotLoggedInException is thrown when a resource has been requested by a
* guest user that is not accessible to the public. * guest user that is not accessible to the public.
* *
* @package OC\Appframework\Middleware\Security\Exceptions * @package OC\AppFramework\Middleware\Security\Exceptions
*/ */
class NotLoggedInException extends SecurityException { class NotLoggedInException extends SecurityException {
public function __construct() { public function __construct() {

@ -26,10 +26,10 @@
namespace OC\AppFramework\Middleware\Security; namespace OC\AppFramework\Middleware\Security;
use OC\Appframework\Middleware\Security\Exceptions\AppNotEnabledException; use OC\AppFramework\Middleware\Security\Exceptions\AppNotEnabledException;
use OC\Appframework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException; use OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException; use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
use OC\Appframework\Middleware\Security\Exceptions\NotLoggedInException; use OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException;
use OC\AppFramework\Utility\ControllerMethodReflector; use OC\AppFramework\Utility\ControllerMethodReflector;
use OC\Security\CSP\ContentSecurityPolicyManager; use OC\Security\CSP\ContentSecurityPolicyManager;
use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\ContentSecurityPolicy;

@ -21,7 +21,7 @@
* *
*/ */
namespace OC\AppFramework\routing; namespace OC\AppFramework\Routing;
use \OC\AppFramework\App; use \OC\AppFramework\App;
use \OC\AppFramework\DependencyInjection\DIContainer; use \OC\AppFramework\DependencyInjection\DIContainer;

@ -24,7 +24,7 @@
* *
*/ */
namespace OC\AppFramework\routing; namespace OC\AppFramework\Routing;
use OC\AppFramework\DependencyInjection\DIContainer; use OC\AppFramework\DependencyInjection\DIContainer;
use OCP\Route\IRouter; use OCP\Route\IRouter;

@ -29,7 +29,7 @@
*/ */
namespace OCP\AppFramework; namespace OCP\AppFramework;
use OC\AppFramework\routing\RouteConfig; use OC\AppFramework\Routing\RouteConfig;
/** /**

@ -23,7 +23,7 @@
namespace OC\Settings\Middleware; namespace OC\Settings\Middleware;
use OC\AppFramework\Http; use OC\AppFramework\Http;
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException; use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
use OC\AppFramework\Utility\ControllerMethodReflector; use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Middleware; use OCP\AppFramework\Middleware;

@ -26,10 +26,10 @@ namespace OC\AppFramework\Middleware\Security;
use OC\AppFramework\Http; use OC\AppFramework\Http;
use OC\AppFramework\Http\Request; use OC\AppFramework\Http\Request;
use OC\Appframework\Middleware\Security\Exceptions\AppNotEnabledException; use OC\AppFramework\Middleware\Security\Exceptions\AppNotEnabledException;
use OC\Appframework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException; use OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException; use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
use OC\Appframework\Middleware\Security\Exceptions\NotLoggedInException; use OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException;
use OC\AppFramework\Middleware\Security\Exceptions\SecurityException; use OC\AppFramework\Middleware\Security\Exceptions\SecurityException;
use OC\AppFramework\Utility\ControllerMethodReflector; use OC\AppFramework\Utility\ControllerMethodReflector;
use OC\Security\CSP\ContentSecurityPolicy; use OC\Security\CSP\ContentSecurityPolicy;

@ -3,8 +3,6 @@
namespace OC\AppFramework\Routing; namespace OC\AppFramework\Routing;
use OC\AppFramework\DependencyInjection\DIContainer; use OC\AppFramework\DependencyInjection\DIContainer;
use OC\AppFramework\routing\RouteConfig;
class RoutingTest extends \Test\TestCase class RoutingTest extends \Test\TestCase
{ {

@ -10,7 +10,7 @@
namespace OC\Settings\Middleware; namespace OC\Settings\Middleware;
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException; use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
use OC\AppFramework\Utility\ControllerMethodReflector; use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\AppFramework\Controller; use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\TemplateResponse;
@ -42,7 +42,7 @@ class SubadminMiddlewareTest extends \Test\TestCase {
} }
/** /**
* @expectedException \OC\Appframework\Middleware\Security\Exceptions\NotAdminException * @expectedException \OC\AppFramework\Middleware\Security\Exceptions\NotAdminException
*/ */
public function testBeforeControllerAsUserWithExemption() { public function testBeforeControllerAsUserWithExemption() {
$this->reflector $this->reflector

Loading…
Cancel
Save