Skip to content

Commit

Permalink
Merge 6914740 into e6e6a0a
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Dec 11, 2023
2 parents e6e6a0a + 6914740 commit ce4e2fc
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
6 changes: 5 additions & 1 deletion docs/changes/1.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

## Bugfixes

- Fixed CI - [@Progi1984](https://github.com/Progi1984) in [#766](https://github.com/PHPOffice/PHPPresentation/pull/766)
- 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)
- 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)
- PowerPoint2007 Writer : Outline : Fixed the base unit - [@Pakku](https://github.com/Pakku) in [#772](https://github.com/PHPOffice/PHPPresentation/pull/772)
Expand All @@ -31,5 +30,10 @@
- PowerPoint2007 Writer : Fixed broken video file relationship - [@potofcoffee](https://github.com/potofcoffee) in [#776](https://github.com/PHPOffice/PHPPresentation/pull/776)
- 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)

## Miscellaneous

- Fixed CI - [@Progi1984](https://github.com/Progi1984) in [#766](https://github.com/PHPOffice/PHPPresentation/pull/766)
- CI : Removed deprecations - [@Progi1984](https://github.com/Progi1984) in [#780](https://github.com/PHPOffice/PHPPresentation/pull/780)

## BC Breaks
- `PhpOffice\PhpPresentation\Style\Outline` : the width is now based on pixels (before in points)
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="false"
convertDeprecationsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
Expand Down
6 changes: 3 additions & 3 deletions samples/Sample_02_Serialized.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$shape = $currentSlide->createDrawingShape();
$shape->setName('PHPPresentation logo')
->setDescription('PHPPresentation logo')
->setPath('./resources/phppowerpoint_logo.gif')
->setPath(__DIR__ . '/resources/phppowerpoint_logo.gif')
->setHeight(36)
->setOffsetX(10)
->setOffsetY(10);
Expand All @@ -55,11 +55,11 @@
$basename = basename(__FILE__, '.php');
echo date('H:i:s') . ' Write to serialized format' . EOL;
$objWriter = IOFactory::createWriter($objPHPPresentation, 'Serialized');
$objWriter->save('results/' . basename(__FILE__, '.php') . '.phppt');
$objWriter->save(__DIR__ . '/results/' . basename(__FILE__, '.php') . '.phppt');

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

// Save file
echo write($objPHPPresentationLoaded, basename(__FILE__, '.php'), $writers);
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpPresentation/Tests/Reader/SerializedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function testLoadSerializedFileNotExists(): void
));

$oArchive = new ZipArchive();
$oArchive->open($file, ZipArchive::CREATE);
$oArchive->open($file, ZipArchive::OVERWRITE);
$oArchive->addFromString('PhpPresentation.xml', '');
$oArchive->close();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ public static function dataProviderMarkerSymbol(): iterable
/**
* @return array<array<int, string>>
*/
public function dataProviderFont(): iterable
public static function dataProviderFont(): iterable
{
foreach ([
[Bar::class, 'c:barChart'],
Expand All @@ -1815,7 +1815,7 @@ public function dataProviderFont(): iterable
/**
* @return array<array<int, string>>
*/
public function dataProviderIncludedSpreadsheet(): iterable
public static function dataProviderIncludedSpreadsheet(): iterable
{
foreach ([
[Area::class, 'c:areaChart'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ class PhpPresentationTestCase extends TestCase
*/
protected function setUp(): void
{
$this->xmlDisableEntityLoader = libxml_disable_entity_loader(false);
if (\PHP_VERSION_ID < 80000) {
$this->xmlDisableEntityLoader = libxml_disable_entity_loader(false);
}
$this->workDirectory = sys_get_temp_dir() . '/PhpPresentation_Unit_Test/';
$this->oPresentation = new PhpPresentation();
$this->filePath = tempnam(sys_get_temp_dir(), 'PhpPresentation');
Expand All @@ -125,7 +127,9 @@ protected function setUp(): void
*/
protected function tearDown(): void
{
libxml_disable_entity_loader($this->xmlDisableEntityLoader);
if (\PHP_VERSION_ID < 80000) {
libxml_disable_entity_loader($this->xmlDisableEntityLoader);
}
libxml_use_internal_errors($this->xmlInternalErrors);
$this->oPresentation = null;
$this->resetPresentationFile();
Expand Down
Binary file modified tests/resources/files/serialized.phppt
Binary file not shown.

0 comments on commit ce4e2fc

Please sign in to comment.