PHPWord v0.13.0 Release Notes

Release Date: 2016-07-31 // over 7 years ago
  • ๐Ÿš€ This release brings several improvements in TemplateProcessor, automatic output escaping feature for OOXML, ODF, HTML, and RTF (turned off, by default). It also introduces constants for horizontal alignment options, and resolves some issues with PHP 7. Manual installation feature has been dropped since the release. Please, use Composer to install PHPWord.

    โž• Added

    • Introduced the \PhpOffice\PhpWord\SimpleType\Jc simple type. - @RomanSyroeshko
    • Introduced the \PhpOffice\PhpWord\SimpleType\JcTable simple type. - @RomanSyroeshko
    • ๐Ÿ‘€ Introduced writer for the "Paragraph Alignment" element (see \PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment). - @RomanSyroeshko
    • ๐Ÿ‘€ Introduced writer for the "Table Alignment" element (see \PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment). - @RomanSyroeshko
    • ๐Ÿ‘Œ Supported indexed arrays in arguments of TemplateProcessor::setValue(). - @RomanSyroeshko #618
    • Introduced automatic output escaping for OOXML, ODF, HTML, and RTF. To turn the feature on use phpword.ini or \PhpOffice\PhpWord\Settings. - @RomanSyroeshko #483
    • ๐Ÿ‘Œ Supported processing of headers and footers in TemplateProcessor::applyXslStyleSheet(). - @RomanSyroeshko #335

    ๐Ÿ”„ Changed

    • ๐Ÿ‘Œ Improved error message for the case when autoload.php is not found. - @RomanSyroeshko #371
    • ๐Ÿ’… Renamed the align option of NumberingLevel, Frame, Table, and Paragraph styles into alignment. - @RomanSyroeshko
    • ๐Ÿ‘Œ Improved performance of TemplateProcessor::setValue(). - @kazitanvirahsan #614, #617

    ๐Ÿ—„ Deprecated

    • ๐Ÿ’… getAlign and setAlign methods of NumberingLevel, Frame, Table, and Paragraph styles.
      ๐Ÿ‘‰ Use the correspondent getAlignment and setAlignment methods instead. - @RomanSyroeshko
    • left, right, and justify alignment options for paragraphs (now are mapped to Jc::START, Jc::END, and Jc::BOTH). - @RomanSyroeshko
    • left, right, and justify alignment options for tables (now are mapped to Jc::START, Jc::END, and Jc::CENTER). - @RomanSyroeshko
    • ๐Ÿ‘ TCPDF due to its limited HTML support. Use DomPDF or MPDF writer instead. - @RomanSyroeshko #399

    โœ‚ Removed

    • ๐Ÿ’… \PhpOffice\PhpWord\Style\Alignment. Style properties, which previously stored instances of this class, now deal with strings.
      In each case set of available string values is defined by the correspondent simple type. - @RomanSyroeshko
    • ๐Ÿš€ Manual installation support. Since the release we have dependencies on third party libraries,
      so installation via ZIP-archive download is not an option anymore. To install PHPWord use Composer.
      ๐Ÿšš We also removed \PhpOffice\PhpWord\Autoloader, because the latter change made it completely useless.
      ๐Ÿ‘€ Autoloaders provided by Composer are in use now (see bootstrap.php). - @RomanSyroeshko
    • \PhpOffice\PhpWord\Shared\Drawing replaced by \PhpOffice\Common\Drawing. - @Progi1984 #658
    • \PhpOffice\PhpWord\Shared\Font. - @Progi1984 #658
    • \PhpOffice\PhpWord\Shared\String replaced by \PhpOffice\Common\Text. - @Progi1984 @RomanSyroeshko #658
    • \PhpOffice\PhpWord\Shared\XMLReader replaced by \PhpOffice\Common\XMLReader. - @Progi1984 #658
    • \PhpOffice\PhpWord\Shared\XMLWriter replaced by \PhpOffice\Common\XMLWriter. - @Progi1984 @RomanSyroeshko #658
    • AbstractContainer::addMemoryImage(). Use AbstractContainer::addImage() instead.

    ๐Ÿ›  Fixed

    • Undefined property error while reading MS-DOC documents. - @jaberu #610
    • Corrupted OOXML template issue in case when its names is broken immediately after $ sign.
      That case wasn't taken into account in implementation of TemplateProcessor::fixBrokenMacros(). - @RomanSyroeshko @d-damien #548