composer update (many packages including symfony 4.1 => 4.2). Symfony 4.2 compatibility fix.
This commit is contained in:
parent
542535e181
commit
451a5d9020
1346
composer.lock
generated
1346
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -43,4 +43,4 @@ services:
|
|||
# Torrent searcher
|
||||
App\Search\TorrentSearcher:
|
||||
arguments:
|
||||
$metadataFactory: '@doctrine.orm.magneticod_entity_manager.metadata_factory'
|
||||
$em: '@doctrine.orm.magneticod_entity_manager'
|
||||
|
|
|
@ -4,8 +4,7 @@ namespace App\Search;
|
|||
|
||||
use App\Magnetico\Entity\Torrent;
|
||||
use App\Magnetico\Repository\TorrentRepository;
|
||||
use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Doctrine\ORM\{EntityManagerInterface, QueryBuilder};
|
||||
|
||||
class TorrentSearcher
|
||||
{
|
||||
|
@ -14,13 +13,13 @@ class TorrentSearcher
|
|||
/** @var TorrentRepository */
|
||||
private $torrentRepo;
|
||||
|
||||
/** @var ClassMetadataFactory */
|
||||
private $metadataFactory;
|
||||
/** @var EntityManagerInterface */
|
||||
private $em;
|
||||
|
||||
public function __construct(TorrentRepository $torrentRepo, ClassMetadataFactory $metadataFactory)
|
||||
public function __construct(TorrentRepository $torrentRepo, EntityManagerInterface $em)
|
||||
{
|
||||
$this->torrentRepo = $torrentRepo;
|
||||
$this->metadataFactory = $metadataFactory;
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function createSearchQueryBuilder(string $query, string $orderBy = null, string $order = 'asc'): QueryBuilder
|
||||
|
@ -65,7 +64,7 @@ class TorrentSearcher
|
|||
{
|
||||
return (
|
||||
!\in_array($orderBy, self::ORDER_DISABLED_FIELDS, true)
|
||||
&& $this->metadataFactory->getMetadataFor(Torrent::class)->hasField($orderBy)
|
||||
&& $this->em->getClassMetadata(Torrent::class)->hasField($orderBy)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
24
symfony.lock
24
symfony.lock
|
@ -125,6 +125,9 @@
|
|||
"ref": "e3868d2f4a5104f19f844fe551099a00c6562527"
|
||||
}
|
||||
},
|
||||
"symfony/contracts": {
|
||||
"version": "v1.0.2"
|
||||
},
|
||||
"symfony/debug": {
|
||||
"version": "v4.1.0"
|
||||
},
|
||||
|
@ -227,9 +230,6 @@
|
|||
"ref": "cda8b550123383d25827705d05a42acf6819fe4e"
|
||||
}
|
||||
},
|
||||
"symfony/security": {
|
||||
"version": "v4.1.0"
|
||||
},
|
||||
"symfony/security-bundle": {
|
||||
"version": "3.3",
|
||||
"recipe": {
|
||||
|
@ -239,12 +239,27 @@
|
|||
"ref": "f8a63faa0d9521526499c0a8f403c9964ecb0527"
|
||||
}
|
||||
},
|
||||
"symfony/security-core": {
|
||||
"version": "v4.2.2"
|
||||
},
|
||||
"symfony/security-csrf": {
|
||||
"version": "v4.2.2"
|
||||
},
|
||||
"symfony/security-guard": {
|
||||
"version": "v4.2.2"
|
||||
},
|
||||
"symfony/security-http": {
|
||||
"version": "v4.2.2"
|
||||
},
|
||||
"symfony/serializer": {
|
||||
"version": "v4.1.0"
|
||||
},
|
||||
"symfony/serializer-pack": {
|
||||
"version": "v1.0.1"
|
||||
},
|
||||
"symfony/stopwatch": {
|
||||
"version": "v4.2.2"
|
||||
},
|
||||
"symfony/translation": {
|
||||
"version": "3.3",
|
||||
"recipe": {
|
||||
|
@ -272,6 +287,9 @@
|
|||
"symfony/var-dumper": {
|
||||
"version": "v4.1.0"
|
||||
},
|
||||
"symfony/var-exporter": {
|
||||
"version": "v4.2.2"
|
||||
},
|
||||
"symfony/web-profiler-bundle": {
|
||||
"version": "3.3",
|
||||
"recipe": {
|
||||
|
|
Loading…
Reference in a new issue