@@ -12,7 +12,7 @@ class Migrator
1212 public function getMapping ()
1313 {
1414 // Order matters here, we should have the deepest namespaces first (the most "unique" strings)
15- $ mapping = [
15+ $ classes = [
1616 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip ' => \PhpOffice \PhpSpreadsheet \Shared \Escher \DggContainer \BstoreContainer \BSE \Blip::class,
1717 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer ' => \PhpOffice \PhpSpreadsheet \Shared \Escher \DgContainer \SpgrContainer \SpContainer::class,
1818 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE ' => \PhpOffice \PhpSpreadsheet \Shared \Escher \DggContainer \BstoreContainer \BSE ::class,
@@ -205,16 +205,38 @@ public function getMapping()
205205 'PHPExcel_Style ' => \PhpOffice \PhpSpreadsheet \Style \Style::class,
206206 'PHPExcel_Worksheet ' => \PhpOffice \PhpSpreadsheet \Worksheet \Worksheet::class,
207207 'PHPExcel ' => \PhpOffice \PhpSpreadsheet \Spreadsheet::class,
208- // methods
208+ ];
209+
210+ $ methods = [
209211 'MINUTEOFHOUR ' => 'MINUTE ' ,
210212 'SECONDOFMINUTE ' => 'SECOND ' ,
211213 'DAYOFWEEK ' => 'WEEKDAY ' ,
212214 'WEEKOFYEAR ' => 'WEEKNUM ' ,
213215 'ExcelToPHPObject ' => 'excelToDateTimeObject ' ,
214216 'ExcelToPHP ' => 'excelToTimestamp ' ,
215217 'FormattedPHPToExcel ' => 'formattedPHPToExcel ' ,
218+ 'Cell::absoluteCoordinate ' => 'Coordinate::absoluteCoordinate ' ,
219+ 'Cell::absoluteReference ' => 'Coordinate::absoluteReference ' ,
220+ 'Cell::buildRange ' => 'Coordinate::buildRange ' ,
221+ 'Cell::columnIndexFromString ' => 'Coordinate::columnIndexFromString ' ,
222+ 'Cell::coordinateFromString ' => 'Coordinate::coordinateFromString ' ,
223+ 'Cell::extractAllCellReferencesInRange ' => 'Coordinate::extractAllCellReferencesInRange ' ,
224+ 'Cell::getRangeBoundaries ' => 'Coordinate::getRangeBoundaries ' ,
225+ 'Cell::mergeRangesInCollection ' => 'Coordinate::mergeRangesInCollection ' ,
226+ 'Cell::rangeBoundaries ' => 'Coordinate::rangeBoundaries ' ,
227+ 'Cell::rangeDimension ' => 'Coordinate::rangeDimension ' ,
228+ 'Cell::splitRange ' => 'Coordinate::splitRange ' ,
229+ 'Cell::stringFromColumnIndex ' => 'Coordinate::stringFromColumnIndex ' ,
216230 ];
217231
232+ // Keep '\' prefix for class names
233+ $ prefixedClasses = [];
234+ foreach ($ classes as $ key => &$ value ) {
235+ $ value = str_replace ('PhpOffice \\' , '\\PhpOffice \\' , $ value );
236+ $ prefixedClasses ['\\' . $ key ] = $ value ;
237+ }
238+ $ mapping = $ prefixedClasses + $ classes + $ methods ;
239+
218240 return $ mapping ;
219241 }
220242
@@ -228,6 +250,7 @@ private function recursiveReplace($path)
228250 $ patterns = [
229251 '/*.md ' ,
230252 '/*.php ' ,
253+ '/*.phtml ' ,
231254 '/*.txt ' ,
232255 '/*.TXT ' ,
233256 ];
0 commit comments