mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Modernize to PHP 5.5
This commit is contained in:
parent
99a49bfc96
commit
745fef44f4
3 changed files with 4 additions and 2 deletions
|
@ -14,4 +14,5 @@ return RectorConfig::configure()
|
||||||
])
|
])
|
||||||
->withImportNames(importShortClasses: false)
|
->withImportNames(importShortClasses: false)
|
||||||
->withAttributesSets(doctrine: true)
|
->withAttributesSets(doctrine: true)
|
||||||
|
->withPhpSets(php55: true)
|
||||||
->withTypeCoverageLevel(0);
|
->withTypeCoverageLevel(0);
|
||||||
|
|
|
@ -50,7 +50,7 @@ class UsernameFeedTokenConverter implements ParamConverterInterface
|
||||||
$em = $this->registry->getManagerForClass($configuration->getClass());
|
$em = $this->registry->getManagerForClass($configuration->getClass());
|
||||||
|
|
||||||
// Check, if class name is what we need
|
// Check, if class name is what we need
|
||||||
if (null !== $em && 'Wallabag\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) {
|
if (null !== $em && User::class !== $em->getClassMetadata($configuration->getClass())->getName()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
||||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||||
use Doctrine\ORM\Mapping\DefaultQuoteStrategy;
|
use Doctrine\ORM\Mapping\DefaultQuoteStrategy;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use Wallabag\Entity\Entry;
|
||||||
use Wallabag\Entity\User;
|
use Wallabag\Entity\User;
|
||||||
use Wallabag\Event\Subscriber\TablePrefixSubscriber;
|
use Wallabag\Event\Subscriber\TablePrefixSubscriber;
|
||||||
|
|
||||||
|
@ -94,7 +95,7 @@ class TablePrefixSubscriberTest extends TestCase
|
||||||
|
|
||||||
$subscriber = new TablePrefixSubscriber('yo_');
|
$subscriber = new TablePrefixSubscriber('yo_');
|
||||||
|
|
||||||
$metaClass = new ClassMetadata('Wallabag\Entity\Entry');
|
$metaClass = new ClassMetadata(Entry::class);
|
||||||
$metaClass->setPrimaryTable(['name' => 'entry']);
|
$metaClass->setPrimaryTable(['name' => 'entry']);
|
||||||
$metaClass->mapManyToMany([
|
$metaClass->mapManyToMany([
|
||||||
'fieldName' => 'tags',
|
'fieldName' => 'tags',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue