Skip to content

Commit

Permalink
Upgrade to doctrine/inflector ^1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ksom committed Sep 3, 2020
1 parent c24f135 commit 29fa98c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ORM/NamingStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
{
"name": "Mathieu Lemoine",
"email": "[email protected]"
},
{
"name":"Virgile Vivier"
}

],
"description": "WeMakeCustom Doctrine Naming Strategy",
"autoload": {
Expand All @@ -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"
Expand Down

0 comments on commit 29fa98c

Please sign in to comment.