Skip to content

Commit 65a406c

Browse files
authored
Merge pull request #3903 from meyerbaptiste/fix_ci
Try to fix CI errors
2 parents 31069f7 + 48447ce commit 65a406c

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/build/
66
/composer.lock
77
/composer.phar
8+
/phpstan.neon
89
/phpunit.xml
910
/swagger.json
1011
/swagger.yaml

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ return PhpCsFixer\Config::create()
9696
'phpdoc_add_missing_param_annotation' => [
9797
'only_untyped' => true,
9898
],
99+
'phpdoc_no_alias_tag' => false, // Set the rule to true when https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5357 is fixed
99100
'phpdoc_order' => true,
100101
'phpdoc_trim_consecutive_blank_line_separation' => true,
101102
'phpdoc_var_annotation_correct_order' => true,

src/Util/Inflector.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
final class Inflector
2828
{
2929
/**
30-
* @var InflectorObject
30+
* @var InflectorObject|null
3131
*/
3232
private static $instance;
3333

@@ -38,18 +38,18 @@ private static function getInstance(): InflectorObject
3838
}
3939

4040
/**
41-
* @see LegacyInflector::tableize()
41+
* @see InflectorObject::tableize()
4242
*/
4343
public static function tableize(string $word): string
4444
{
45-
return class_exists(InflectorFactory::class) ? self::getInstance()->tableize($word) : LegacyInflector::tableize($word);
45+
return class_exists(LegacyInflector::class) ? LegacyInflector::tableize($word) : self::getInstance()->tableize($word);
4646
}
4747

4848
/**
49-
* @see LegacyInflector::pluralize()
49+
* @see InflectorObject::pluralize()
5050
*/
5151
public static function pluralize(string $word): string
5252
{
53-
return class_exists(InflectorFactory::class) ? self::getInstance()->pluralize($word) : LegacyInflector::pluralize($word);
53+
return class_exists(LegacyInflector::class) ? LegacyInflector::pluralize($word) : self::getInstance()->pluralize($word);
5454
}
5555
}

tests/Fixtures/app/AppKernel.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
1919
use Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle;
2020
use Doctrine\Common\Inflector\Inflector;
21-
use Doctrine\Inflector\InflectorFactory;
2221
use FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle;
2322
use Nelmio\ApiDocBundle\NelmioApiDocBundle;
2423
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
@@ -54,7 +53,7 @@ public function __construct(string $environment, bool $debug)
5453

5554
// patch for old versions of Doctrine Inflector, to delete when we'll drop support for v1
5655
// see https://github.com/doctrine/inflector/issues/147#issuecomment-628807276
57-
if (!class_exists(InflectorFactory::class)) {
56+
if (class_exists(Inflector::class)) {
5857
Inflector::rules('plural', ['/taxon/i' => 'taxa']);
5958
}
6059
}

0 commit comments

Comments
 (0)