Skip to content

Commit

Permalink
#634 : Removed deprecated methods/classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Jul 4, 2021
1 parent 516b126 commit 8e4ed9f
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 4,007 deletions.
32 changes: 31 additions & 1 deletion docs/changes/1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
## Changes
- Dropped support for HHVM - @sunspikes GH-556
- PHP 7.1 is now supported - @Progi1984 GH-355
- Added support PHP 7.4 to 8.0 & Removed support PHP < 7.1 - @Progi1984 GH-636
- Removed deprecated methods/classes - @Progi1984 GH-650
- PhpOffice\PhpPresentation\Style\Color : Define only the transparency - @Progi1984 GH-370
- PowerPoint2007 Reader : Background Color based on SchemeColor - @Progi1984 GH-397
- PowerPoint2007 Reader : Support for hyperlinks under pictures - @ulziibuyan
Expand All @@ -19,4 +21,32 @@
- ODPresentation Reader : Support for fill for image - @Progi1984 GH-370
- PowerPoint2007 Reader : Support for fill for image - @Progi1984 GH-370
- ODPresentation Writer : Support for fill for transparent image - @Progi1984 GH-370
- PowerPoint2007 Writer : Support for fill for transparent image - @JewrassicPark GH-370
- PowerPoint2007 Writer : Support for fill for transparent image - @JewrassicPark GH-370

## Project Management
- Migrated from Travis CI to Github Actions - @Progi1984 GH-635
- Enabled PHPStan - @Progi1984 GH-639
- Enabled PHPCSFixer - @Progi1984 GH-637 / GH-640
- Added link to Coveralls - @Progi1984 GH-648
- Migrated from ReadTheDocs to MkDocs & Github Actions - @Progi1984 GH-647
- Added Changelog to MkDocs - @Progi1984 GH-649

## BC Breaks
* Classes have been strict typed
* `PhpOffice\PhpPresentation\PhpPresentation`
* Removed method `getProperties()` (replaced by `getDocumentProperties()`)
* Removed method `getZoom()` (replaced by `getPresentationProperties()->getZoom()`)
* Removed method `isMarkedAsFinal()` (replaced by `getPresentationProperties()->isMarkedAsFinal()`)
* Removed method `markAsFinal($state)` (replaced by `getPresentationProperties()->markAsFinal($state)`)
* Removed method `setProperties($value)` (replaced by `setDocumentProperties()`)
* Removed method `setZoom($zoom)` (replaced by `getPresentationProperties()->setZoom($zoom)`)
* `PhpOffice\PhpPresentation\Shape\Chart\Type\AbstractType`
* Removed method `getData()` (replaced by `getSeries()`)
* Removed method `setData($value)` (replaced by `setSeries($value)`)
* `PhpOffice\PhpPresentation\Writer\PowerPoint2007`
* Removed method `getLayoutPack()`
* Removed method `setLayoutPack($pValue)`
* Removed classes :
* `PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\AbstractLayoutPack`
* `PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\PackDefault`
* `PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\TemplateBased`
60 changes: 0 additions & 60 deletions src/PhpPresentation/PhpPresentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,6 @@ public function __construct()
$this->setLayout(new DocumentLayout());
}

/**
* Get properties.
*
* @deprecated for getDocumentProperties
*/
public function getProperties(): DocumentProperties
{
return $this->getDocumentProperties();
}

/**
* Set properties.
*
* @deprecated for setDocumentProperties
*/
public function setProperties(DocumentProperties $value): self
{
return $this->setDocumentProperties($value);
}

/**
* Get properties.
*/
Expand Down Expand Up @@ -360,46 +340,6 @@ public function copy(): PhpPresentation
return $copied;
}

/**
* Mark a document as final.
*
* @deprecated for getPresentationProperties()->markAsFinal()
*/
public function markAsFinal(bool $state = true): PresentationProperties
{
return $this->getPresentationProperties()->markAsFinal($state);
}

/**
* Return if this document is marked as final.
*
* @deprecated for getPresentationProperties()->isMarkedAsFinal()
*/
public function isMarkedAsFinal(): bool
{
return $this->getPresentationProperties()->isMarkedAsFinal();
}

/**
* Set the zoom of the document (in percentage).
*
* @deprecated for getPresentationProperties()->setZoom()
*/
public function setZoom(float $zoom = 1.0): PresentationProperties
{
return $this->getPresentationProperties()->setZoom($zoom);
}

/**
* Return the zoom (in percentage).
*
* @deprecated for getPresentationProperties()->getZoom()
*/
public function getZoom(): float
{
return $this->getPresentationProperties()->getZoom();
}

/**
* @return array<int, Slide\SlideMaster>|ArrayObject<int, Slide\SlideMaster>
*/
Expand Down
26 changes: 0 additions & 26 deletions src/PhpPresentation/Shape/Chart/Type/AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,32 +134,6 @@ public function setSeries(array $series = [])
return $this;
}

/**
* Get Data.
*
* @deprecated getSeries
*
* @return array<int, Series>
*/
public function getData(): array
{
return $this->getSeries();
}

/**
* Set Data.
*
* @deprecated setSeries
*
* @param array<int, Series> $value
*
* @return AbstractType
*/
public function setData(array $value = [])
{
return $this->setSeries($value);
}

/**
* @see http://php.net/manual/en/language.oop5.cloning.php
*/
Expand Down
42 changes: 0 additions & 42 deletions src/PhpPresentation/Writer/PowerPoint2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
use PhpOffice\Common\Adapter\Zip\ZipArchiveAdapter;
use PhpOffice\PhpPresentation\HashTable;
use PhpOffice\PhpPresentation\PhpPresentation;
use PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\AbstractLayoutPack;
use PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\PackDefault;

/**
* \PhpOffice\PhpPresentation\Writer\PowerPoint2007.
Expand All @@ -44,15 +42,6 @@ class PowerPoint2007 extends AbstractWriter implements WriterInterface
*/
protected $diskCachingDir;

/**
* Layout pack to use.
*
* @deprecated 0.7
*
* @var \PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\AbstractLayoutPack
*/
protected $layoutPack;

/**
* Create a new PowerPoint2007 file.
*
Expand All @@ -68,9 +57,6 @@ public function __construct(PhpPresentation $pPhpPresentation = null)
// Set up disk caching location
$this->diskCachingDir = './';

// Set layout pack
$this->layoutPack = new PackDefault();

// Set HashTable variables
$this->oDrawingHashTable = new HashTable();

Expand Down Expand Up @@ -188,32 +174,4 @@ public function getDiskCachingDirectory()
{
return $this->diskCachingDir;
}

/**
* Get layout pack to use.
*
* @deprecated 0.7
*
* @return \PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\AbstractLayoutPack
*/
public function getLayoutPack()
{
return $this->layoutPack;
}

/**
* Set layout pack to use.
*
* @deprecated 0.7
*
* @param \PhpOffice\PhpPresentation\Writer\PowerPoint2007\LayoutPack\AbstractLayoutPack $pValue
*
* @return \PhpOffice\PhpPresentation\Writer\PowerPoint2007
*/
public function setLayoutPack(AbstractLayoutPack $pValue = null)
{
$this->layoutPack = $pValue;

return $this;
}
}
Loading

0 comments on commit 8e4ed9f

Please sign in to comment.