File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 "ext-fileinfo" : " *" ,
1414 "ext-soap" : " *" ,
1515 "nesbot/carbon" : " ^1.20 || ^2.0" ,
16- "doctrine/inflector" : " ~1 .0"
16+ "doctrine/inflector" : " ^1.4 || ^2 .0"
1717 },
1818 "require-dev" : {
1919 "phpunit/phpunit" : " ^8.5" ,
Original file line number Diff line number Diff line change 22
33namespace Pace ;
44
5- use Doctrine \Common \ Inflector \Inflector ;
5+ use Doctrine \Inflector \InflectorFactory ;
66
77class Type
88{
@@ -62,6 +62,13 @@ class Type
6262 'FileAttachment ' => 'attachment ' ,
6363 ];
6464
65+ /**
66+ * The Doctrine Inflector instance.
67+ *
68+ * @var \Doctrine\Inflector\Inflector|null
69+ */
70+ protected static $ inflector ;
71+
6572 /**
6673 * Convert a name to camel case.
6774 *
@@ -92,7 +99,11 @@ public static function modelify($name)
9299 */
93100 public static function singularize ($ name )
94101 {
95- return Inflector::singularize ($ name );
102+ if (is_null (static ::$ inflector )) {
103+ static ::$ inflector = InflectorFactory::create ()->build ();
104+ }
105+
106+ return static ::$ inflector ->singularize ($ name );
96107 }
97108
98109 /**
You can’t perform that action at this time.
0 commit comments