deprecations removal.

This commit is contained in:
Alexey Skobkin 2017-11-05 05:39:52 +03:00
parent c4f9adbac5
commit 46502c4a80
8 changed files with 20 additions and 18 deletions

View file

@ -27,7 +27,6 @@ framework:
engines: ['twig'] engines: ['twig']
default_locale: "%locale%" default_locale: "%locale%"
trusted_hosts: ~ trusted_hosts: ~
trusted_proxies: ~
session: session:
# handler_id set to null will use default session handler from php.ini # handler_id set to null will use default session handler from php.ini
handler_id: ~ handler_id: ~

View file

@ -18,12 +18,12 @@ monolog:
path: "%kernel.logs_dir%/%kernel.environment%.log" path: "%kernel.logs_dir%/%kernel.environment%.log"
max_files: 2 max_files: 2
level: debug level: debug
channels: [!event] channels: ['!event']
console: console:
type: console type: console
verbosity_levels: verbosity_levels:
VERBOSITY_NORMAL: WARNING VERBOSITY_NORMAL: WARNING
channels: [!event, !doctrine] channels: ['!event', '!doctrine']
# uncomment to get logging in your browser # uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration # you may have to allow bigger header sizes in your Web server configuration
#firephp: #firephp:

View file

@ -2,7 +2,7 @@
namespace Skobkin\Bundle\PointToolsBundle\Command; namespace Skobkin\Bundle\PointToolsBundle\Command;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\{EntityManager, EntityManagerInterface};
use Skobkin\Bundle\PointToolsBundle\Entity\User; use Skobkin\Bundle\PointToolsBundle\Entity\User;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\{InputInterface, InputArgument, InputOption}; use Symfony\Component\Console\Input\{InputInterface, InputArgument, InputOption};
@ -23,7 +23,7 @@ class ImportUsersCommand extends Command
/** @var EntityManager */ /** @var EntityManager */
private $em; private $em;
public function __construct(EntityManager $em) public function __construct(EntityManagerInterface $em)
{ {
$this->em = $em; $this->em = $em;

View file

@ -2,7 +2,6 @@
namespace Skobkin\Bundle\PointToolsBundle\Command; namespace Skobkin\Bundle\PointToolsBundle\Command;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\{InputArgument, InputInterface}; use Symfony\Component\Console\Input\{InputArgument, InputInterface};
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
@ -22,7 +21,7 @@ class TelegramWebHookCommand extends Command
/** @var TgLog */ /** @var TgLog */
private $client; private $client;
/** @var Router */ /** @var UrlGeneratorInterface */
private $router; private $router;
/** @var string */ /** @var string */
@ -31,7 +30,7 @@ class TelegramWebHookCommand extends Command
/** @var int */ /** @var int */
private $maxConnections; private $maxConnections;
public function __construct(TgLog $client, Router $router, string $telegramToken, int $telegramWebhookMaxConnections) public function __construct(TgLog $client, UrlGeneratorInterface $router, string $telegramToken, int $telegramWebhookMaxConnections)
{ {
parent::__construct(); parent::__construct();

View file

@ -2,8 +2,8 @@
namespace Skobkin\Bundle\PointToolsBundle\Controller\Api; namespace Skobkin\Bundle\PointToolsBundle\Controller\Api;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface;
use JMS\Serializer\Serializer; use JMS\Serializer\SerializerInterface;
use Skobkin\Bundle\PointToolsBundle\DTO\Api\PostsPage; use Skobkin\Bundle\PointToolsBundle\DTO\Api\PostsPage;
use Skobkin\Bundle\PointToolsBundle\Service\Factory\Blogs\PostFactory; use Skobkin\Bundle\PointToolsBundle\Service\Factory\Blogs\PostFactory;
use Symfony\Component\HttpFoundation\{Request, Response}; use Symfony\Component\HttpFoundation\{Request, Response};
@ -18,7 +18,7 @@ class CrawlerController extends AbstractApiController
$this->crawlerToken = $crawlerToken; $this->crawlerToken = $crawlerToken;
} }
public function receiveAllPageAction(Request $request, Serializer $serializer, PostFactory $postFactory, EntityManager $em): Response public function receiveAllPageAction(Request $request, SerializerInterface $serializer, PostFactory $postFactory, EntityManagerInterface $em): Response
{ {
$remoteToken = $request->request->get('token'); $remoteToken = $request->request->get('token');

View file

@ -4,7 +4,9 @@ namespace Skobkin\Bundle\PointToolsBundle\Service\Api;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\TransferException; use GuzzleHttp\Exception\TransferException;
use JMS\Serializer\{DeserializationContext, Serializer}; use JMS\Serializer\{
DeserializationContext, SerializerInterface
};
use Psr\Http\Message\{ResponseInterface, StreamInterface}; use Psr\Http\Message\{ResponseInterface, StreamInterface};
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Skobkin\Bundle\PointToolsBundle\Exception\Api\{ForbiddenException, NetworkException, NotFoundException, ServerProblemException, UnauthorizedException}; use Skobkin\Bundle\PointToolsBundle\Exception\Api\{ForbiddenException, NetworkException, NotFoundException, ServerProblemException, UnauthorizedException};
@ -18,7 +20,7 @@ class AbstractApi
protected $client; protected $client;
/** /**
* @var Serializer * @var SerializerInterface
*/ */
protected $serializer; protected $serializer;
@ -38,7 +40,7 @@ class AbstractApi
protected $csRfToken; protected $csRfToken;
public function __construct(ClientInterface $httpClient, Serializer $serializer, LoggerInterface $logger) public function __construct(ClientInterface $httpClient, SerializerInterface $serializer, LoggerInterface $logger)
{ {
$this->client = $httpClient; $this->client = $httpClient;
$this->serializer = $serializer; $this->serializer = $serializer;

View file

@ -3,7 +3,7 @@
namespace Skobkin\Bundle\PointToolsBundle\Service\Api; namespace Skobkin\Bundle\PointToolsBundle\Service\Api;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
use JMS\Serializer\Serializer; use JMS\Serializer\SerializerInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Skobkin\Bundle\PointToolsBundle\Service\Factory\Blogs\PostFactory; use Skobkin\Bundle\PointToolsBundle\Service\Factory\Blogs\PostFactory;
@ -18,7 +18,7 @@ class PostApi extends AbstractApi
private $postFactory; private $postFactory;
public function __construct(ClientInterface $httpClient, Serializer $serializer, LoggerInterface $logger, PostFactory $postFactory) public function __construct(ClientInterface $httpClient, SerializerInterface $serializer, LoggerInterface $logger, PostFactory $postFactory)
{ {
parent::__construct($httpClient, $serializer, $logger); parent::__construct($httpClient, $serializer, $logger);

View file

@ -3,7 +3,9 @@
namespace Skobkin\Bundle\PointToolsBundle\Service\Api; namespace Skobkin\Bundle\PointToolsBundle\Service\Api;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
use JMS\Serializer\{DeserializationContext, Serializer}; use JMS\Serializer\{
DeserializationContext, SerializerInterface
};
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Skobkin\Bundle\PointToolsBundle\DTO\Api\{Auth, User as UserDTO}; use Skobkin\Bundle\PointToolsBundle\DTO\Api\{Auth, User as UserDTO};
use Skobkin\Bundle\PointToolsBundle\Entity\User; use Skobkin\Bundle\PointToolsBundle\Entity\User;
@ -22,7 +24,7 @@ class UserApi extends AbstractApi
*/ */
private $userFactory; private $userFactory;
public function __construct(ClientInterface $httpClient, Serializer $serializer, LoggerInterface $logger, UserFactory $userFactory) public function __construct(ClientInterface $httpClient, SerializerInterface $serializer, LoggerInterface $logger, UserFactory $userFactory)
{ {
parent::__construct($httpClient, $serializer, $logger); parent::__construct($httpClient, $serializer, $logger);