Skip to content

Commit 54e9058

Browse files
authored
Merge pull request #780 from Progi1984/removeDeprecated
CI : Removed deprecations
2 parents e6e6a0a + 6914740 commit 54e9058

File tree

7 files changed

+18
-10
lines changed

7 files changed

+18
-10
lines changed

docs/changes/1.1.0.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
## Bugfixes
2424

25-
- Fixed CI - [@Progi1984](https://github.com/Progi1984) in [#766](https://github.com/PHPOffice/PHPPresentation/pull/766)
2625
- PowerPoint2077 Writer : Fixed broken PPT Presentations due to MS Office update 2309 - [@WFarmerEthisphere](https://github.com/WFarmerEthisphere) in [#770](https://github.com/PHPOffice/PHPPresentation/pull/770)
2726
- PowerPoint2077 Writer : Fixed error when defining min/max bounds to 0 - [@LilyEssence](https://github.com/LilyEssence) in [#771](https://github.com/PHPOffice/PHPPresentation/pull/771)
2827
- PowerPoint2007 Writer : Outline : Fixed the base unit - [@Pakku](https://github.com/Pakku) in [#772](https://github.com/PHPOffice/PHPPresentation/pull/772)
@@ -31,5 +30,10 @@
3130
- PowerPoint2007 Writer : Fixed broken video file relationship - [@potofcoffee](https://github.com/potofcoffee) in [#776](https://github.com/PHPOffice/PHPPresentation/pull/776)
3231
- PowerPoint2007 Writer : Fixed issue when first element in series is null - [@ksmeeks0001](https://github.com/ksmeeks0001) in [#778](https://github.com/PHPOffice/PHPPresentation/pull/778)
3332

33+
## Miscellaneous
34+
35+
- Fixed CI - [@Progi1984](https://github.com/Progi1984) in [#766](https://github.com/PHPOffice/PHPPresentation/pull/766)
36+
- CI : Removed deprecations - [@Progi1984](https://github.com/Progi1984) in [#780](https://github.com/PHPOffice/PHPPresentation/pull/780)
37+
3438
## BC Breaks
3539
- `PhpOffice\PhpPresentation\Style\Outline` : the width is now based on pixels (before in points)

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
convertErrorsToExceptions="true"
99
convertNoticesToExceptions="true"
1010
convertWarningsToExceptions="true"
11-
convertDeprecationsToExceptions="false"
11+
convertDeprecationsToExceptions="true"
1212
processIsolation="false"
1313
stopOnFailure="false"
1414
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">

samples/Sample_02_Serialized.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
$shape = $currentSlide->createDrawingShape();
3131
$shape->setName('PHPPresentation logo')
3232
->setDescription('PHPPresentation logo')
33-
->setPath('./resources/phppowerpoint_logo.gif')
33+
->setPath(__DIR__ . '/resources/phppowerpoint_logo.gif')
3434
->setHeight(36)
3535
->setOffsetX(10)
3636
->setOffsetY(10);
@@ -55,11 +55,11 @@
5555
$basename = basename(__FILE__, '.php');
5656
echo date('H:i:s') . ' Write to serialized format' . EOL;
5757
$objWriter = IOFactory::createWriter($objPHPPresentation, 'Serialized');
58-
$objWriter->save('results/' . basename(__FILE__, '.php') . '.phppt');
58+
$objWriter->save(__DIR__ . '/results/' . basename(__FILE__, '.php') . '.phppt');
5959

6060
// Read from serialized file
6161
echo date('H:i:s') . ' Read from serialized format' . EOL;
62-
$objPHPPresentationLoaded = IOFactory::load('results/' . basename(__FILE__, '.php') . '.phppt');
62+
$objPHPPresentationLoaded = IOFactory::load(__DIR__ . '/results/' . basename(__FILE__, '.php') . '.phppt');
6363

6464
// Save file
6565
echo write($objPHPPresentationLoaded, basename(__FILE__, '.php'), $writers);

tests/PhpPresentation/Tests/Reader/SerializedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testLoadSerializedFileNotExists(): void
8585
));
8686

8787
$oArchive = new ZipArchive();
88-
$oArchive->open($file, ZipArchive::CREATE);
88+
$oArchive->open($file, ZipArchive::OVERWRITE);
8989
$oArchive->addFromString('PhpPresentation.xml', '');
9090
$oArchive->close();
9191

tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptChartsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ public static function dataProviderMarkerSymbol(): iterable
17961796
/**
17971797
* @return array<array<int, string>>
17981798
*/
1799-
public function dataProviderFont(): iterable
1799+
public static function dataProviderFont(): iterable
18001800
{
18011801
foreach ([
18021802
[Bar::class, 'c:barChart'],
@@ -1815,7 +1815,7 @@ public function dataProviderFont(): iterable
18151815
/**
18161816
* @return array<array<int, string>>
18171817
*/
1818-
public function dataProviderIncludedSpreadsheet(): iterable
1818+
public static function dataProviderIncludedSpreadsheet(): iterable
18191819
{
18201820
foreach ([
18211821
[Area::class, 'c:areaChart'],

tests/PhpPresentation/Tests/_includes/PhpPresentationTestCase.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ class PhpPresentationTestCase extends TestCase
107107
*/
108108
protected function setUp(): void
109109
{
110-
$this->xmlDisableEntityLoader = libxml_disable_entity_loader(false);
110+
if (\PHP_VERSION_ID < 80000) {
111+
$this->xmlDisableEntityLoader = libxml_disable_entity_loader(false);
112+
}
111113
$this->workDirectory = sys_get_temp_dir() . '/PhpPresentation_Unit_Test/';
112114
$this->oPresentation = new PhpPresentation();
113115
$this->filePath = tempnam(sys_get_temp_dir(), 'PhpPresentation');
@@ -125,7 +127,9 @@ protected function setUp(): void
125127
*/
126128
protected function tearDown(): void
127129
{
128-
libxml_disable_entity_loader($this->xmlDisableEntityLoader);
130+
if (\PHP_VERSION_ID < 80000) {
131+
libxml_disable_entity_loader($this->xmlDisableEntityLoader);
132+
}
129133
libxml_use_internal_errors($this->xmlInternalErrors);
130134
$this->oPresentation = null;
131135
$this->resetPresentationFile();
-420 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)