Skip to content

Commit 370b754

Browse files
committed
Remove Deprecations from Release 2
In preparation for Release 3.
1 parent f7c183b commit 370b754

File tree

5 files changed

+10
-134
lines changed

5 files changed

+10
-134
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ and this project adheres to [Semantic Versioning](https://semver.org).
2323

2424
- Nothing yet.
2525

26+
### Removed
27+
28+
- The following items were deprecated in release 2 and are now removed.
29+
- Writer\Xls\Style\ColorMap (no longer needed).
30+
- Reader\Xml::trySimpleXMLLoadString (should not have been public, no public replacement).
31+
- Calculation\Calculation::_translateFormulaToLocale (use method name translateFormulaToLocale without leading underscore).
32+
- Calculation\Calculation::_translateFormulaToEnglish (use method name translateFormulaToEnglish without leading underscore).
33+
2634
### Moved
2735

2836
- Nothing yet.

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3318,16 +3318,6 @@ private static function translateFormula(array $from, array $to, string $formula
33183318

33193319
private static ?array $functionReplaceToLocale;
33203320

3321-
/**
3322-
* @deprecated 1.30.0 use translateFormulaToLocale() instead
3323-
*
3324-
* @codeCoverageIgnore
3325-
*/
3326-
public function _translateFormulaToLocale(string $formula): string
3327-
{
3328-
return $this->translateFormulaToLocale($formula);
3329-
}
3330-
33313321
public function translateFormulaToLocale(string $formula): string
33323322
{
33333323
$formula = preg_replace(self::CALCULATION_REGEXP_STRIP_XLFN_XLWS, '', $formula) ?? '';
@@ -3365,16 +3355,6 @@ public function translateFormulaToLocale(string $formula): string
33653355

33663356
private static ?array $functionReplaceToExcel;
33673357

3368-
/**
3369-
* @deprecated 1.30.0 use translateFormulaToEnglish() instead
3370-
*
3371-
* @codeCoverageIgnore
3372-
*/
3373-
public function _translateFormulaToEnglish(string $formula): string
3374-
{
3375-
return $this->translateFormulaToEnglish($formula);
3376-
}
3377-
33783358
public function translateFormulaToEnglish(string $formula): string
33793359
{
33803360
if (self::$functionReplaceFromLocale === null) {

src/PhpSpreadsheet/Reader/Xml.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,6 @@ public function canRead(string $filename): bool
107107
return $valid;
108108
}
109109

110-
/**
111-
* Check if the file is a valid SimpleXML.
112-
*
113-
* @return false|SimpleXMLElement
114-
*
115-
* @deprecated 2.0.1 Should never have had public visibility
116-
*
117-
* @codeCoverageIgnore
118-
*/
119-
public function trySimpleXMLLoadString(string $filename, string $fileOrString = 'file'): SimpleXMLElement|bool
120-
{
121-
return $this->trySimpleXMLLoadStringPrivate($filename, $fileOrString);
122-
}
123-
124110
/** @return false|SimpleXMLElement */
125111
private function trySimpleXMLLoadStringPrivate(string $filename, string $fileOrString = 'file'): SimpleXMLElement|bool
126112
{

src/PhpSpreadsheet/Writer/Xls/Style/ColorMap.php

Lines changed: 0 additions & 98 deletions
This file was deleted.

tests/PhpSpreadsheetTests/Calculation/TranslationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public function testTranslation(string $expectedResult, string $locale, string $
4343
self::markTestSkipped("Unable to set locale to {$locale}");
4444
}
4545

46-
$translatedFormula = Calculation::getInstance()->_translateFormulaToLocale($formula);
46+
$translatedFormula = Calculation::getInstance()->translateFormulaToLocale($formula);
4747
self::assertSame($expectedResult, $translatedFormula);
4848

49-
$restoredFormula = Calculation::getInstance()->_translateFormulaToEnglish($translatedFormula);
49+
$restoredFormula = Calculation::getInstance()->translateFormulaToEnglish($translatedFormula);
5050
self::assertSame(preg_replace(Calculation::CALCULATION_REGEXP_STRIP_XLFN_XLWS, '', $formula), $restoredFormula);
5151
}
5252

0 commit comments

Comments
 (0)