Merge pull request #24200 from owncloud/appframework_psr4
Move \OC\AppFramework to PSR-4
This commit is contained in:
commit
e37b95ae53
|
@ -492,6 +492,9 @@ class OC {
|
|||
|
||||
self::$CLI = (php_sapi_name() == 'cli');
|
||||
|
||||
// Add default composer PSR-4 autoloader
|
||||
require_once OC::$SERVERROOT . '/lib/composer/autoload.php';
|
||||
|
||||
try {
|
||||
self::initPaths();
|
||||
// setup 3rdparty autoloader
|
||||
|
@ -511,9 +514,6 @@ class OC {
|
|||
exit();
|
||||
}
|
||||
|
||||
// Add default composer PSR-4 autoloader
|
||||
require_once OC::$SERVERROOT . '/lib/composer/autoload.php';
|
||||
|
||||
// setup the basic server
|
||||
self::$server = new \OC\Server(\OC::$WEBROOT, self::$config);
|
||||
\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;
|
||||
|
||||
|
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
|
|||
* Class AppNotEnabledException is thrown when a resource for an application is
|
||||
* requested that is not enabled.
|
||||
*
|
||||
* @package OC\Appframework\Middleware\Security\Exceptions
|
||||
* @package OC\AppFramework\Middleware\Security\Exceptions
|
||||
*/
|
||||
class AppNotEnabledException extends SecurityException {
|
||||
public function __construct() {
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OC\Appframework\Middleware\Security\Exceptions;
|
||||
namespace OC\AppFramework\Middleware\Security\Exceptions;
|
||||
|
||||
use OCP\AppFramework\Http;
|
||||
|
||||
|
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
|
|||
* Class CrossSiteRequestForgeryException is thrown when a CSRF exception has
|
||||
* been encountered.
|
||||
*
|
||||
* @package OC\Appframework\Middleware\Security\Exceptions
|
||||
* @package OC\AppFramework\Middleware\Security\Exceptions
|
||||
*/
|
||||
class CrossSiteRequestForgeryException extends SecurityException {
|
||||
public function __construct() {
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OC\Appframework\Middleware\Security\Exceptions;
|
||||
namespace OC\AppFramework\Middleware\Security\Exceptions;
|
||||
|
||||
use OCP\AppFramework\Http;
|
||||
|
||||
|
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
|
|||
* Class NotAdminException is thrown when a resource has been requested by a
|
||||
* 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 {
|
||||
public function __construct() {
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OC\Appframework\Middleware\Security\Exceptions;
|
||||
namespace OC\AppFramework\Middleware\Security\Exceptions;
|
||||
|
||||
use OCP\AppFramework\Http;
|
||||
|
||||
|
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
|
|||
* Class NotLoggedInException is thrown when a resource has been requested by a
|
||||
* 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 {
|
||||
public function __construct() {
|
|
@ -26,10 +26,10 @@
|
|||
|
||||
namespace OC\AppFramework\Middleware\Security;
|
||||
|
||||
use OC\Appframework\Middleware\Security\Exceptions\AppNotEnabledException;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\NotLoggedInException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\AppNotEnabledException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException;
|
||||
use OC\AppFramework\Utility\ControllerMethodReflector;
|
||||
use OC\Security\CSP\ContentSecurityPolicyManager;
|
||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OC\AppFramework\routing;
|
||||
namespace OC\AppFramework\Routing;
|
||||
|
||||
use \OC\AppFramework\App;
|
||||
use \OC\AppFramework\DependencyInjection\DIContainer;
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OC\AppFramework\routing;
|
||||
namespace OC\AppFramework\Routing;
|
||||
|
||||
use OC\AppFramework\DependencyInjection\DIContainer;
|
||||
use OCP\Route\IRouter;
|
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
namespace OCP\AppFramework;
|
||||
use OC\AppFramework\routing\RouteConfig;
|
||||
use OC\AppFramework\Routing\RouteConfig;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
namespace OC\Settings\Middleware;
|
||||
|
||||
use OC\AppFramework\Http;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\AppFramework\Utility\ControllerMethodReflector;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Middleware;
|
||||
|
|
|
@ -26,10 +26,10 @@ namespace OC\AppFramework\Middleware\Security;
|
|||
|
||||
use OC\AppFramework\Http;
|
||||
use OC\AppFramework\Http\Request;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\AppNotEnabledException;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\Appframework\Middleware\Security\Exceptions\NotLoggedInException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\AppNotEnabledException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\SecurityException;
|
||||
use OC\AppFramework\Utility\ControllerMethodReflector;
|
||||
use OC\Security\CSP\ContentSecurityPolicy;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
namespace OC\AppFramework\Routing;
|
||||
|
||||
use OC\AppFramework\DependencyInjection\DIContainer;
|
||||
use OC\AppFramework\routing\RouteConfig;
|
||||
|
||||
|
||||
class RoutingTest extends \Test\TestCase
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace OC\Settings\Middleware;
|
||||
|
||||
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
|
||||
use OC\AppFramework\Utility\ControllerMethodReflector;
|
||||
use OCP\AppFramework\Controller;
|
||||
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() {
|
||||
$this->reflector
|
||||
|
|
Loading…
Reference in New Issue