mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Merge pull request #8117 from wallabag/fix-some-depreciation-notices
Fix some depreciation notices
This commit is contained in:
commit
0d93add058
25 changed files with 75 additions and 168 deletions
|
@ -29,6 +29,7 @@ framework:
|
|||
handler_id: session.handler.native_file
|
||||
save_path: "%kernel.project_dir%/var/sessions/%kernel.environment%"
|
||||
cookie_secure: auto
|
||||
storage_factory_id: session.storage.factory.native
|
||||
fragments: ~
|
||||
http_method_override: true
|
||||
assets:
|
||||
|
@ -197,7 +198,7 @@ fos_user:
|
|||
address: "%from_email%"
|
||||
sender_name: wallabag
|
||||
service:
|
||||
mailer: Wallabag\Mailer\UserMailer
|
||||
mailer: fos_user.mailer.twig_symfony
|
||||
|
||||
fos_oauth_server:
|
||||
db_driver: orm
|
||||
|
|
|
@ -10,7 +10,7 @@ parameters:
|
|||
framework:
|
||||
test: ~
|
||||
session:
|
||||
storage_id: session.storage.mock_file
|
||||
storage_factory_id: session.storage.factory.mock_file
|
||||
profiler:
|
||||
collect: false
|
||||
translator:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
security:
|
||||
encoders:
|
||||
password_hashers:
|
||||
FOS\UserBundle\Model\UserInterface: sha512
|
||||
|
||||
role_hierarchy:
|
||||
|
|
|
@ -260,16 +260,6 @@ services:
|
|||
$defaultSettings: '%wallabag.default_internal_settings%'
|
||||
$defaultIgnoreOriginInstanceRules: '%wallabag.default_ignore_origin_instance_rules%'
|
||||
|
||||
Wallabag\Mailer\UserMailer:
|
||||
arguments:
|
||||
$parameters:
|
||||
template:
|
||||
confirmation: '%fos_user.registration.confirmation.template%'
|
||||
resetting: '%fos_user.resetting.email.template%'
|
||||
from_email:
|
||||
confirmation: '%fos_user.registration.confirmation.from_email%'
|
||||
resetting: '%fos_user.resetting.email.from_email%'
|
||||
|
||||
Wallabag\Event\Listener\CreateConfigListener:
|
||||
arguments:
|
||||
$itemsOnPage: "%wallabag.items_on_page%"
|
||||
|
|
|
@ -27,7 +27,7 @@ class Version20161001072726 extends WallabagMigration
|
|||
// remove all FK from entry_tag
|
||||
switch (true) {
|
||||
case $platform instanceof MySQLPlatform:
|
||||
$query = $this->connection->query("
|
||||
$query = $this->connection->executeQuery("
|
||||
SELECT CONSTRAINT_NAME
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%'
|
||||
|
@ -40,7 +40,7 @@ class Version20161001072726 extends WallabagMigration
|
|||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
// http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
|
||||
$query = $this->connection->query("
|
||||
$query = $this->connection->executeQuery("
|
||||
SELECT conrelid::regclass AS table_from
|
||||
,conname
|
||||
,pg_get_constraintdef(c.oid)
|
||||
|
@ -64,7 +64,7 @@ class Version20161001072726 extends WallabagMigration
|
|||
|
||||
switch (true) {
|
||||
case $platform instanceof MySQLPlatform:
|
||||
$query = $this->connection->query("
|
||||
$query = $this->connection->executeQuery("
|
||||
SELECT CONSTRAINT_NAME
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE TABLE_NAME = '" . $this->getTable('annotation', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||
|
@ -79,7 +79,7 @@ class Version20161001072726 extends WallabagMigration
|
|||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
// http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
|
||||
$query = $this->connection->query("
|
||||
$query = $this->connection->executeQuery("
|
||||
SELECT conrelid::regclass AS table_from
|
||||
,conname
|
||||
,pg_get_constraintdef(c.oid)
|
||||
|
|
|
@ -20,7 +20,7 @@ class Version20170719231144 extends WallabagMigration
|
|||
}
|
||||
|
||||
// Find tags which need to be merged
|
||||
$dupTags = $this->connection->query('
|
||||
$dupTags = $this->connection->executeQuery('
|
||||
SELECT LOWER(label) AS lower_label
|
||||
FROM ' . $this->getTable('tag') . '
|
||||
GROUP BY LOWER(label)
|
||||
|
@ -31,7 +31,7 @@ class Version20170719231144 extends WallabagMigration
|
|||
$label = $duplicates['lower_label'];
|
||||
|
||||
// Retrieve all duplicate tags for a given tag
|
||||
$tags = $this->connection->query('
|
||||
$tags = $this->connection->executeQuery('
|
||||
SELECT id
|
||||
FROM ' . $this->getTable('tag') . '
|
||||
WHERE LOWER(label) = :label
|
||||
|
|
|
@ -60,11 +60,6 @@ parameters:
|
|||
count: 2
|
||||
path: src/Mailer/AuthCodeMailer.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type Symfony\\\\Component\\\\Mailer\\\\MailerInterface of property Wallabag\\\\Mailer\\\\UserMailer\\:\\:\\$mailer is not covariant with PHPDoc type Swift_Mailer of overridden property FOS\\\\UserBundle\\\\Mailer\\\\TwigSwiftMailer\\:\\:\\$mailer\\.$#"
|
||||
count: 1
|
||||
path: src/Mailer/UserMailer.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#"
|
||||
count: 1
|
||||
|
|
|
@ -138,7 +138,7 @@ class InstallCommand extends Command
|
|||
|
||||
// now check if MySQL isn't too old to handle utf8mb4
|
||||
if ($conn->isConnected() && $conn->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$version = $conn->query('select version()')->fetchOne();
|
||||
$version = $conn->executeQuery('select version()')->fetchOne();
|
||||
$minimalVersion = '5.5.4';
|
||||
|
||||
if (false === version_compare($version, $minimalVersion, '>')) {
|
||||
|
@ -151,7 +151,7 @@ class InstallCommand extends Command
|
|||
// testing if PostgreSQL > 9.1
|
||||
if ($conn->isConnected() && $conn->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
// return version should be like "PostgreSQL 9.5.4 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 8.0.0 (clang-800.0.38), 64-bit"
|
||||
$version = $conn->query('SELECT version();')->fetchOne();
|
||||
$version = $conn->executeQuery('SELECT version();')->fetchOne();
|
||||
|
||||
preg_match('/PostgreSQL ([0-9\.]+)/i', $version, $matches);
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ use PhpAmqpLib\Message\AMQPMessage;
|
|||
|
||||
class AMQPEntryConsumer extends AbstractConsumer implements ConsumerInterface
|
||||
{
|
||||
public function execute(AMQPMessage $msg)
|
||||
public function execute(AMQPMessage $msg): int|bool
|
||||
{
|
||||
return $this->handleMessage($msg->body);
|
||||
return $this->handleMessage($msg->getBody());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,6 +115,6 @@ class RabbitMQConsumerTotalProxy
|
|||
return 0;
|
||||
}
|
||||
|
||||
return $message->delivery_info['message_count'] + 1;
|
||||
return $message->getMessageCount() + 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -625,7 +625,7 @@ class EntryController extends AbstractController
|
|||
*/
|
||||
private function showEntries($type, Request $request, $page)
|
||||
{
|
||||
$searchTerm = (isset($request->query->get('search_entry')['term']) ? trim($request->query->get('search_entry')['term']) : '');
|
||||
$searchTerm = (isset($request->query->all('search_entry')['term']) ? trim($request->query->all('search_entry')['term']) : '');
|
||||
$currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : '');
|
||||
$currentEntryId = $request->attributes->getInt('id');
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class ExportController extends AbstractController
|
|||
|
||||
$title = 'Tag ' . $tag->getLabel();
|
||||
} elseif ('search' === $category) {
|
||||
$searchTerm = (isset($request->query->get('search_entry')['term']) ? $request->query->get('search_entry')['term'] : '');
|
||||
$searchTerm = (isset($request->query->all('search_entry')['term']) ? $request->query->all('search_entry')['term'] : '');
|
||||
$currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : '');
|
||||
|
||||
$entries = $entryRepository->getBuilderForSearchByUser(
|
||||
|
|
|
@ -14,10 +14,12 @@ use Wallabag\Import\ImportChain;
|
|||
class ImportController extends AbstractController
|
||||
{
|
||||
private RabbitMQConsumerTotalProxy $rabbitMQConsumerTotalProxy;
|
||||
private Client $redisClient;
|
||||
|
||||
public function __construct(RabbitMQConsumerTotalProxy $rabbitMQConsumerTotalProxy)
|
||||
public function __construct(RabbitMQConsumerTotalProxy $rabbitMQConsumerTotalProxy, Client $redisClient)
|
||||
{
|
||||
$this->rabbitMQConsumerTotalProxy = $rabbitMQConsumerTotalProxy;
|
||||
$this->redisClient = $redisClient;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,22 +69,20 @@ class ImportController extends AbstractController
|
|||
$rabbitNotInstalled = true;
|
||||
}
|
||||
} elseif ($craueConfig->get('import_with_redis')) {
|
||||
$redis = $this->get(Client::class);
|
||||
|
||||
try {
|
||||
$nbRedisMessages = $redis->llen('wallabag.import.pocket')
|
||||
+ $redis->llen('wallabag.import.readability')
|
||||
+ $redis->llen('wallabag.import.wallabag_v1')
|
||||
+ $redis->llen('wallabag.import.wallabag_v2')
|
||||
+ $redis->llen('wallabag.import.firefox')
|
||||
+ $redis->llen('wallabag.import.chrome')
|
||||
+ $redis->llen('wallabag.import.instapaper')
|
||||
+ $redis->llen('wallabag.import.pinboard')
|
||||
+ $redis->llen('wallabag.import.delicious')
|
||||
+ $redis->llen('wallabag.import.elcurator')
|
||||
+ $redis->llen('wallabag.import.shaarli')
|
||||
+ $redis->llen('wallabag.import.pocket_html')
|
||||
+ $redis->llen('wallabag.import.omnivore')
|
||||
$nbRedisMessages = $this->redisClient->llen('wallabag.import.pocket')
|
||||
+ $this->redisClient->llen('wallabag.import.readability')
|
||||
+ $this->redisClient->llen('wallabag.import.wallabag_v1')
|
||||
+ $this->redisClient->llen('wallabag.import.wallabag_v2')
|
||||
+ $this->redisClient->llen('wallabag.import.firefox')
|
||||
+ $this->redisClient->llen('wallabag.import.chrome')
|
||||
+ $this->redisClient->llen('wallabag.import.instapaper')
|
||||
+ $this->redisClient->llen('wallabag.import.pinboard')
|
||||
+ $this->redisClient->llen('wallabag.import.delicious')
|
||||
+ $this->redisClient->llen('wallabag.import.elcurator')
|
||||
+ $this->redisClient->llen('wallabag.import.shaarli')
|
||||
+ $this->redisClient->llen('wallabag.import.pocket_html')
|
||||
+ $this->redisClient->llen('wallabag.import.omnivore')
|
||||
;
|
||||
} catch (\Exception $e) {
|
||||
$redisNotInstalled = true;
|
||||
|
|
|
@ -161,7 +161,7 @@ class UserController extends AbstractController
|
|||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$searchTerm = (isset($request->query->get('search_user')['term']) ? $request->query->get('search_user')['term'] : '');
|
||||
$searchTerm = (isset($request->query->all('search_user')['term']) ? $request->query->all('search_user')['term'] : '');
|
||||
|
||||
$qb = $userRepository->getQueryBuilderForSearch($searchTerm);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ use Doctrine\DBAL\Types\JsonType;
|
|||
*/
|
||||
class JsonArrayType extends JsonType
|
||||
{
|
||||
public function convertToPHPValue($value, AbstractPlatform $platform)
|
||||
public function convertToPHPValue($value, AbstractPlatform $platform): mixed
|
||||
{
|
||||
if (null === $value || '' === $value) {
|
||||
return [];
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Wallabag\Event\Listener;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\Security\Core\AuthenticationEvents;
|
||||
use Symfony\Component\Security\Http\Event\LoginFailureEvent;
|
||||
|
||||
class AuthenticationFailureListener implements EventSubscriberInterface
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ class AuthenticationFailureListener implements EventSubscriberInterface
|
|||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
AuthenticationEvents::AUTHENTICATION_FAILURE => 'onAuthenticationFailure',
|
||||
LoginFailureEvent::class => 'onAuthenticationFailure',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Wallabag\Event\Subscriber;
|
|||
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\ORM\Event\LifecycleEventArgs;
|
||||
use Doctrine\ORM\Event\PreRemoveEventArgs;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\Entity\Entry;
|
||||
|
||||
|
@ -38,7 +38,7 @@ class SQLiteCascadeDeleteSubscriber implements EventSubscriber
|
|||
* We removed everything related to the upcoming removed entry because SQLite can't handle it on it own.
|
||||
* We do it in the preRemove, because we can't retrieve tags in the postRemove (because the entry id is gone).
|
||||
*/
|
||||
public function preRemove(LifecycleEventArgs $args)
|
||||
public function preRemove(PreRemoveEventArgs $args)
|
||||
{
|
||||
$entity = $args->getObject();
|
||||
if (!$this->doctrine->getConnection()->getDatabasePlatform() instanceof SqlitePlatform
|
||||
|
|
|
@ -67,6 +67,11 @@ class WallabagClient implements HttpClientInterface
|
|||
return $this->httpClient->stream($responses, $timeout);
|
||||
}
|
||||
|
||||
public function withOptions(array $options): HttpClientInterface
|
||||
{
|
||||
return new self($this->restrictedAccess, $this->browser, $this->authenticator, $this->logger);
|
||||
}
|
||||
|
||||
private function getCookieHeader(string $url): ?string
|
||||
{
|
||||
$cookies = [];
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\Mailer;
|
||||
|
||||
use FOS\UserBundle\Mailer\TwigSwiftMailer;
|
||||
use Symfony\Component\Mailer\MailerInterface;
|
||||
use Symfony\Component\Mime\Address;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Twig\Environment;
|
||||
|
||||
/**
|
||||
* This replace the default mailer from TwigSwiftMailer by symfony/mailer instead of swiftmailer.
|
||||
*/
|
||||
class UserMailer extends TwigSwiftMailer
|
||||
{
|
||||
/**
|
||||
* @var MailerInterface
|
||||
*/
|
||||
protected $mailer;
|
||||
|
||||
/**
|
||||
* @var UrlGeneratorInterface
|
||||
*/
|
||||
protected $router;
|
||||
|
||||
/**
|
||||
* @var Environment
|
||||
*/
|
||||
protected $twig;
|
||||
|
||||
/**
|
||||
* @var array{template: array{confirmation: string, resetting: string}, from_email: array{confirmation: array<string, string>|string, resetting: array<string, string>|string}}
|
||||
*/
|
||||
protected $parameters;
|
||||
|
||||
public function __construct(MailerInterface $mailer, UrlGeneratorInterface $router, Environment $twig, array $parameters)
|
||||
{
|
||||
$this->mailer = $mailer;
|
||||
$this->router = $router;
|
||||
$this->twig = $twig;
|
||||
$this->parameters = $parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $templateName
|
||||
* @param array $context
|
||||
* @param array $fromEmail
|
||||
* @param string $toEmail
|
||||
*/
|
||||
protected function sendMessage($templateName, $context, $fromEmail, $toEmail)
|
||||
{
|
||||
$template = $this->twig->load($templateName);
|
||||
$subject = $template->renderBlock('subject', $context);
|
||||
$textBody = $template->renderBlock('body_text', $context);
|
||||
|
||||
$htmlBody = '';
|
||||
|
||||
if ($template->hasBlock('body_html', $context)) {
|
||||
$htmlBody = $template->renderBlock('body_html', $context);
|
||||
}
|
||||
|
||||
$email = (new Email())
|
||||
->from(new Address(key($fromEmail), current($fromEmail)))
|
||||
->to($toEmail)
|
||||
->subject($subject);
|
||||
|
||||
if (!empty($htmlBody)) {
|
||||
$email
|
||||
->text($textBody)
|
||||
->html($htmlBody);
|
||||
} else {
|
||||
$email->text($textBody);
|
||||
}
|
||||
|
||||
$this->mailer->send($email);
|
||||
}
|
||||
}
|
|
@ -691,7 +691,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
|||
$container = $this->client->getContainer();
|
||||
$contentProxy = $this->getMockBuilder(ContentProxy::class)
|
||||
->disableOriginalConstructor()
|
||||
->setMethods(['updateEntry'])
|
||||
->onlyMethods(['updateEntry'])
|
||||
->getMock();
|
||||
$contentProxy->expects($this->any())
|
||||
->method('updateEntry')
|
||||
|
|
|
@ -1721,7 +1721,7 @@ class EntryControllerTest extends WallabagTestCase
|
|||
$container = $client->getContainer();
|
||||
$contentProxy = $this->getMockBuilder(ContentProxy::class)
|
||||
->disableOriginalConstructor()
|
||||
->setMethods(['updateEntry'])
|
||||
->onlyMethods(['updateEntry'])
|
||||
->getMock();
|
||||
$contentProxy->expects($this->any())
|
||||
->method('updateEntry')
|
||||
|
|
|
@ -8,10 +8,9 @@ use PHPUnit\Framework\TestCase;
|
|||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\AuthenticationEvents;
|
||||
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
|
||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
|
||||
use Symfony\Component\Security\Http\Event\LoginFailureEvent;
|
||||
use Wallabag\Event\Listener\AuthenticationFailureListener;
|
||||
|
||||
class AuthenticationFailureListenerTest extends TestCase
|
||||
|
@ -43,7 +42,7 @@ class AuthenticationFailureListenerTest extends TestCase
|
|||
|
||||
public function testOnAuthenticationFailure()
|
||||
{
|
||||
$token = $this->getMockBuilder(TokenInterface::class)
|
||||
$authenticator = $this->getMockBuilder(AuthenticatorInterface::class)
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -51,15 +50,9 @@ class AuthenticationFailureListenerTest extends TestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$event = new AuthenticationFailureEvent(
|
||||
$token,
|
||||
$exception
|
||||
);
|
||||
$event = new LoginFailureEvent($exception, $authenticator, $this->requestStack->getMainRequest(), null, 'main', null);
|
||||
|
||||
$this->dispatcher->dispatch(
|
||||
$event,
|
||||
AuthenticationEvents::AUTHENTICATION_FAILURE
|
||||
);
|
||||
$this->dispatcher->dispatch($event);
|
||||
|
||||
$records = $this->logHandler->getRecords();
|
||||
|
||||
|
|
|
@ -82,6 +82,6 @@ class LocaleListenerTest extends TestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
return new RequestEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
|
||||
return new RequestEvent($kernel, $request, HttpKernelInterface::MAIN_REQUEST);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ use Doctrine\DBAL\Platforms\SqlitePlatform;
|
|||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use Doctrine\ORM\Mapping\DefaultQuoteStrategy;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Wallabag\Entity\User;
|
||||
use Wallabag\Event\Subscriber\TablePrefixSubscriber;
|
||||
|
@ -57,7 +58,7 @@ class TablePrefixSubscriberTest extends TestCase
|
|||
$subscriber->loadClassMetadata($metaDataEvent);
|
||||
|
||||
$this->assertSame($finalTableName, $metaDataEvent->getClassMetadata()->getTableName());
|
||||
$this->assertSame($finalTableNameQuoted, $metaDataEvent->getClassMetadata()->getQuotedTableName($platform));
|
||||
$this->assertSame($finalTableNameQuoted, (new DefaultQuoteStrategy())->getTableName($metaClass, $platform));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,7 +83,7 @@ class TablePrefixSubscriberTest extends TestCase
|
|||
$evm->dispatchEvent('loadClassMetadata', $metaDataEvent);
|
||||
|
||||
$this->assertSame($finalTableName, $metaDataEvent->getClassMetadata()->getTableName());
|
||||
$this->assertSame($finalTableNameQuoted, $metaDataEvent->getClassMetadata()->getQuotedTableName($platform));
|
||||
$this->assertSame($finalTableNameQuoted, (new DefaultQuoteStrategy())->getTableName($metaClass, $platform));
|
||||
}
|
||||
|
||||
public function testPrefixManyToMany()
|
||||
|
@ -115,6 +116,6 @@ class TablePrefixSubscriberTest extends TestCase
|
|||
|
||||
$this->assertSame('yo_entry', $metaDataEvent->getClassMetadata()->getTableName());
|
||||
$this->assertSame('yo_entry_tag', $metaDataEvent->getClassMetadata()->associationMappings['tags']['joinTable']['name']);
|
||||
$this->assertSame('yo_entry', $metaDataEvent->getClassMetadata()->getQuotedTableName(new MySQLPlatform()));
|
||||
$this->assertSame('yo_entry', (new DefaultQuoteStrategy())->getTableName($metaClass, new MySQLPlatform()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -69,7 +69,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -109,7 +109,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -154,7 +154,7 @@ class ContentProxyTest extends TestCase
|
|||
->method('process');
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -200,7 +200,7 @@ class ContentProxyTest extends TestCase
|
|||
->method('process');
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -246,7 +246,7 @@ class ContentProxyTest extends TestCase
|
|||
->method('process');
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -291,7 +291,7 @@ class ContentProxyTest extends TestCase
|
|||
->method('process');
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -341,7 +341,7 @@ class ContentProxyTest extends TestCase
|
|||
->willReturn(new ConstraintViolationList([new ConstraintViolation('oops', 'oops', [], 'oops', 'language', 'dontexist')]));
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -392,7 +392,7 @@ class ContentProxyTest extends TestCase
|
|||
));
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -649,7 +649,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -693,7 +693,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -732,7 +732,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -770,7 +770,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -808,7 +808,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -846,7 +846,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -895,7 +895,7 @@ class ContentProxyTest extends TestCase
|
|||
$ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();
|
||||
|
||||
$graby = $this->getMockBuilder(Graby::class)
|
||||
->setMethods(['fetchContent'])
|
||||
->onlyMethods(['fetchContent'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ class ContentProxyTest extends TestCase
|
|||
private function getTaggerMock()
|
||||
{
|
||||
return $this->getMockBuilder(RuleBasedTagger::class)
|
||||
->setMethods(['tag'])
|
||||
->onlyMethods(['tag'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
|
@ -1111,7 +1111,7 @@ class ContentProxyTest extends TestCase
|
|||
private function getRuleBasedIgnoreOriginProcessorMock()
|
||||
{
|
||||
return $this->getMockBuilder(RuleBasedIgnoreOriginProcessor::class)
|
||||
->setMethods(['process'])
|
||||
->onlyMethods(['process'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
|
@ -1124,7 +1124,7 @@ class ContentProxyTest extends TestCase
|
|||
private function getValidator($withDefaultMock = true)
|
||||
{
|
||||
$mock = $this->getMockBuilder(RecursiveValidator::class)
|
||||
->setMethods(['validate'])
|
||||
->onlyMethods(['validate'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue