mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
Upgraded package php-di/php-di
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"slim/slim": "^4.0",
|
||||
"slim/psr7": "^1.0",
|
||||
"slim/http": "^1.0",
|
||||
"php-di/php-di": "^6.0",
|
||||
"php-di/php-di": "^7.0.3",
|
||||
"berrnd/slim-blade-view": "^1.0.0",
|
||||
"morris/lessql": "dev-php81",
|
||||
"gettext/gettext": "dev-php81",
|
||||
|
@@ -18,10 +18,11 @@ use Grocy\Services\StockService;
|
||||
use Grocy\Services\TasksService;
|
||||
use Grocy\Services\UserfieldsService;
|
||||
use Grocy\Services\UsersService;
|
||||
use DI\Container;
|
||||
|
||||
class BaseController
|
||||
{
|
||||
public function __construct(\DI\Container $container)
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->AppContainer = $container;
|
||||
$this->View = $container->get('view');
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Slim\Exception\HttpException;
|
||||
@@ -11,7 +12,7 @@ use Throwable;
|
||||
|
||||
class ExceptionController extends BaseApiController
|
||||
{
|
||||
public function __construct(\Slim\App $app, \DI\Container $container)
|
||||
public function __construct(\Slim\App $app, Container $container)
|
||||
{
|
||||
parent::__construct($container);
|
||||
$this->app = $app;
|
||||
|
@@ -3,13 +3,14 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\ApiKeyService;
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Slim\Routing\RouteContext;
|
||||
|
||||
class ApiKeyAuthMiddleware extends AuthMiddleware
|
||||
{
|
||||
public function __construct(\DI\Container $container, ResponseFactoryInterface $responseFactory)
|
||||
public function __construct(Container $container, ResponseFactoryInterface $responseFactory)
|
||||
{
|
||||
parent::__construct($container, $responseFactory);
|
||||
$this->ApiKeyHeaderName = $this->AppContainer->get('ApiKeyHeaderName');
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\SessionService;
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
@@ -11,7 +12,7 @@ use Slim\Routing\RouteContext;
|
||||
|
||||
abstract class AuthMiddleware extends BaseMiddleware
|
||||
{
|
||||
public function __construct(\DI\Container $container, ResponseFactoryInterface $responseFactory)
|
||||
public function __construct(Container $container, ResponseFactoryInterface $responseFactory)
|
||||
{
|
||||
parent::__construct($container);
|
||||
$this->ResponseFactory = $responseFactory;
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\ApplicationService;
|
||||
use DI\Container;
|
||||
|
||||
class BaseMiddleware
|
||||
{
|
||||
@@ -10,7 +11,7 @@ class BaseMiddleware
|
||||
|
||||
protected $ApplicationService;
|
||||
|
||||
public function __construct(\DI\Container $container)
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->AppContainer = $container;
|
||||
$this->ApplicationService = ApplicationService::getInstance();
|
||||
|
@@ -3,12 +3,13 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\SessionService;
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class SessionAuthMiddleware extends AuthMiddleware
|
||||
{
|
||||
public function __construct(\DI\Container $container, ResponseFactoryInterface $responseFactory)
|
||||
public function __construct(Container $container, ResponseFactoryInterface $responseFactory)
|
||||
{
|
||||
parent::__construct($container, $responseFactory);
|
||||
}
|
||||
|
Reference in New Issue
Block a user