From 29fa98cab3e92e7ff2968e7437648e7a60406443 Mon Sep 17 00:00:00 2001 From: Virgile Date: Thu, 3 Sep 2020 19:20:26 +0200 Subject: [PATCH] Upgrade to doctrine/inflector ^1.4 --- ORM/NamingStrategy.php | 4 ++-- composer.json | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ORM/NamingStrategy.php b/ORM/NamingStrategy.php index 72320d4..3301968 100644 --- a/ORM/NamingStrategy.php +++ b/ORM/NamingStrategy.php @@ -3,7 +3,7 @@ namespace WMC\DoctrineNamingStrategyBundle\ORM; use Doctrine\ORM\Mapping\UnderscoreNamingStrategy; -use Doctrine\Common\Inflector\Inflector; +use Doctrine\Inflector\InflectorFactory; class NamingStrategy extends UnderscoreNamingStrategy { @@ -17,7 +17,7 @@ public function classToTableName($className, $includePrefix = true) $parts = explode('_', $table_name); $last = array_pop($parts); - $last = Inflector::pluralize($last); + $last = InflectorFactory::create()->build()->pluralize($last); $parts[] = $last; return implode('_', $parts); diff --git a/composer.json b/composer.json index 9d950c4..16fa77a 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,11 @@ { "name": "Mathieu Lemoine", "email": "mathieu@wemakecustom.com" + }, + { + "name":"Virgile Vivier" } + ], "description": "WeMakeCustom Doctrine Naming Strategy", "autoload": { @@ -20,7 +24,7 @@ "require": { "php": ">=5.3.3", "doctrine/orm": "^2.3", - "doctrine/inflector": "^1.0" + "doctrine/inflector": "^1.4" }, "suggests": { "symfony/framework-bundle": "To integrate with full stack Symfony"