Releases: PHPOffice/PHPWord
Releases · PHPOffice/PHPWord
1.3.0
Full Changelog: 1.2.0...1.3.0
Enhancements
- IOFactory : Added extractVariables method to extract variables from a document @sibalonat in #2515
- PDF Writer : Documented how to specify a PDF renderer, when working with the PDF writer, as well as the three available choices by @settermjd in #2642
- Word2007 Reader: Support for Paragraph Border Style by @damienfa in #2651
- Word2007 Writer: Support for field REF by @crystoline in #2652
- Word2007 Reader : Support for FormFields by @vincentKool in #2653
- RTF Writer : Support for Table Border Style fixing #345 by @Progi1984 in #2656
- Word2007 Reader: Support the page break () by @stanolacko in #2662
- MsDoc Reader: Support for UTF-8 characters by @Progi1984 fixing #881, #1454, #1817, #1927, #2383, #2565 in #2664
- Word2007 Writer: Added support for multiples comment for the same text by @rodrigoq fixing #2109 in #2665
Bug fixes
- MsDoc Reader : Correct Font Size Calculation by @oleibman fixing #2526 in #2531
- Html Reader : Process Titles as Headings not Paragraphs @0b10011 and @oleibman Issue #1692 PR #2533
- Generate Table Cell if Row Doesn't Have Any @oleibman fixing #2505 in #2516
- TemplateProcessor Persist File After Destruct @oleibman fixing #2539 in #2545
- TemplateProcessor Destructor Problem with Php7 @oleibman fixing #2548 in #2554
- bug: TemplateProcessor fix multiline values @gimler fixing #268, #2323 and #2486 in #2522
- 32-bit Problem in PasswordEncoder @oleibman fixing #2550 in #2551
- Typo : Fix hardcoded macro chars in TemplateProcessor method @glafarge in #2618
- XML Reader : Prevent fatal errors when opening corrupt files or "doc" files @mmcev106 in #2626
- Documentation : Updated Comment element by @laminga in #2650
- HTML Reader : Read width & height attributes in points fixing #2589 by @Progi1984 in #2654
- Template Processor : Fixed bad naming of variables fixing #2586 by @Progi1984 in #2655
- Word2007 Writer : Fix first footnote appearing as separator #2634 by @jacksleight in #2635
- Template Processor : Fixed images with transparent backgrounds displaying a white background by @ElwynVdb in #2638
- HTML Writer : Fixed rowspan for tables by @andomiell in #2659
- Word2007 Writer : Fixed StrikeThrough property by @noec764 fixing #1722 & #1693 in #2661
- HTML Reader : Fixed link without href by @asmundstavdahl fixing #1562 in #2663
Miscellaneous
- Bump dompdf/dompdf from 2.0.3 to 2.0.4 by @dependabot in #2530
- Bump phpunit/phpunit from 9.6.13 to 9.6.14 by @dependabot in #2519
- Bump mpdf/mpdf from 8.2.0 to 8.2.2 by @dependabot in #2518
- Bump phpmd/phpmd from 2.14.1 to 2.15.0 by @dependabot in #2538
- Bump phpunit/phpunit from 9.6.14 to 9.6.15 by @dependabot in #2537
- Bump symfony/process from 5.4.28 to 5.4.34 by @dependabot in #2536
- Allow rgb() when converting Html by @oleibman fixing #2508 in #2512
- Improved Issue Template by @Progi1984 in #2609
- Bump phpoffice/math from 0.1.0 to 0.2.0 by @Progi1984 fixing #2559 in #2645
- Bump tecnickcom/tcpdf from 6.6.5 to 6.7.5 by @dependabot in #2646
- Bump mpdf/mpdf from 8.2.2 to 8.2.4 by @dependabot in #2647
- Bump phenx/php-svg-lib from 0.5.1 to 0.5.4 by @dependabot in #2649
- Bump phpstan/phpstan-phpunit from 1.3.15 to 1.4.0 by @dependabot in #2648
New Contributors
- @sibalonat made their first contribution in #2515
- @settermjd made their first contribution in #2642
- @glafarge made their first contribution in #2618
- @mmcev106 made their first contribution in #2626
- @jacksleight made their first contribution in #2635
- @ElwynVdb made their first contribution in #2638
1.2.0
Enhancements
- Word2007 Reader/Writer : Added noWrap table cell property by @kernusr in #2359
- HTML Reader : Support for
font-variant: small-caps
by @cambraca in #2117 - Improved TextDirection for styling a cell by @terryzwt in #2429
- Word2007 Reader : Added option to disable loading images by @aelliott1485 in #2450
- HTML Writer : Added border-spacing to default styles for table by @kernusr in #2451
- Word2007 Reader : Support for table cell borders and margins by @kernusr in #2454
- PDF Writer : Add config for defining the default font by @MikeMaldini in #2262 & #2468
- Word2007 Reader : Added support for Comments by @shaedrich in #2161 & #2469
- Word2007 Reader/Writer: Permit book-fold printing by @potofcoffee in #2225 & #2470
- Word2007 Writer : Add PageNumber to TOC by @jet-desk in #1652 & #2471
- Word2007 Reader/Writer + ODText Reader/Writer : Add Element Formula in by @Progi1984 in #2477
- Add Support for Various Missing Features in HTML Writer by @oleibman in #2475
- Fixed addHTML (text-align:right in html is not handled correctly) in #2467
- HTML Writer : Added ability to specify generic fallback font
- HTML Writer : Added ability to specify handling of whitespace
- HTML Writer : Added support for Table Border style, color, and size
- HTML Writer : Added support for empty paragraphs (Word writer permits, browsers generally suppress)
- HTML Writer : Paragraph style should support indentation, line-height, page-break-before
- HTML Writer : Removed margin-top/bottom when spacing is null in Paragraph style
- HTML Writer : Added default paragraph style to all paragraphs, as well as class Normal
- HTML Writer : Use css @page and page declarations for sections
- HTML Writer : Wrap sections in div, with page break before each (except first)
- PDF Writer : Added support for PageBreak
- PDF Writer : Added callback for modifying the HTML
- Added Support for Language, both for document overall and individual text elements
- Template : Set a checkbox by @nxtpge in #2509
- ODText / RTF / Word2007 Writer : Add field FILENAME by @milkyway-git in #2510
- ODText Reader : Improve Section Reader by @oleibman in #2507
Bug fixes
- Fixed wrong mimetype for docx files by @gamerlv in #2416
- Word2007 Reader : Read hyperlingks in headings by @hannesdorn in #2433
- PclZip : strtr using empty string by @spl1nes in #2432
- Fixed PHP 8.2 deprecated about Allow access to an undefined property by @DAdq26 in #2440
- Template Processor : Fixed choose dimention for Float Value by @gdevilbat in #2449
- HTML Parser : Fix image parsing from url without extension by @JokubasR in #2459
- Word2007 Reader : Fixed reading of Office365 DocX file by @filippotoso & @lfglopes in #2506
- Word2007 Reader : Check for null on $fontDefaultStyle by @spatialfree in #2513
Miscellaneous
- Added PHPStan by @PowerKiKi in #2405
- Bump symfony/process from 4.4.44 to 5.4.26 by @dependabot in #2431
- Bump phpunit/phpunit from 9.6.8 to 9.6.10 by @dependabot in #2430
- Added Coveralls.io by @Progi1984 in #2452
- Added support for PHP 8.2 & PHP 8.3 by @Progi1984 in #2453
- Moved documention from ReadTheDocs to MkDocs & Github Pages by @Progi1984 in #2465
- Bump phpstan/phpstan-phpunit from 1.3.13 to 1.3.14 by @dependabot in #2457
- Bump symfony/process from 5.4.26 to 5.4.28 by @dependabot in #2456
- Bump phpunit/phpunit from 9.6.10 to 9.6.11 by @dependabot in #2455
- Remove deprecated utf8_encode in PHP 8.2 by @mhcwebdesign in #2447 & #2472
- Bump mpdf/mpdf from 8.1.6 to 8.2.0 by @dependabot in #2480
- Bump phpunit/phpunit from 9.6.11 to 9.6.13 by @dependabot in #2481
- Bump tecnickcom/tcpdf from 6.6.2 to 6.6.5 by @dependabot in #2482
- Bump phpmd/phpmd from 2.13.0 to 2.14.1 by @dependabot in #2483
- Bump phpstan/phpstan-phpunit from 1.3.14 to 1.3.15 by @dependabot in #2494
BC Breaks
- Removed dependency
laminas/laminas-escaper
New Contributors
- @dependabot made their first contribution in #2431
- @terryzwt made their first contribution in #2429
- @gamerlv made their first contribution in #2416
- @hannesdorn made their first contribution in #2433
- @spl1nes made their first contribution in #2432
- @DAdq26 made their first contribution in #2440
- @JokubasR made their first contribution in #2459
Full Changelog: 1.1.0...1.2.0
1.2.0-beta.1
Enhancements
- Word2007 Reader/Writer : Added noWrap table cell property by @kernusr in #2359
- HTML Reader : Support for
font-variant: small-caps
by @cambraca in #2117 - Improved TextDirection for styling a cell by @terryzwt in #2429
- Word2007 Reader : Added option to disable loading images by @aelliott1485 in #2450
- HTML Writer : Added border-spacing to default styles for table by @kernusr in #2451
- Word2007 Reader : Support for table cell borders and margins by @kernusr in #2454
- PDF Writer : Add config for defining the default font by @MikeMaldini in #2262 & #2468
- Word2007 Reader : Added support for Comments by @shaedrich in #2161 & #2469
- Word2007 Reader/Writer: Permit book-fold printing by @potofcoffee in #2225 & #2470
- Word2007 Writer : Add PageNumber to TOC by @jet-desk in #1652 & #2471
- Word2007 Reader/Writer + ODText Reader/Writer : Add Element Formula in by @Progi1984 in #2477
- Add Support for Various Missing Features in HTML Writer by @oleibman in #2475
- Fixed addHTML (text-align:right in html is not handled correctly) in #2467
- HTML Writer : Added ability to specify generic fallback font
- HTML Writer : Added ability to specify handling of whitespace
- HTML Writer : Added support for Table Border style, color, and size
- HTML Writer : Added support for empty paragraphs (Word writer permits, browsers generally suppress)
- HTML Writer : Paragraph style should support indentation, line-height, page-break-before
- HTML Writer : Removed margin-top/bottom when spacing is null in Paragraph style
- HTML Writer : Added default paragraph style to all paragraphs, as well as class Normal
- HTML Writer : Use css @page and page declarations for sections
- HTML Writer : Wrap sections in div, with page break before each (except first)
- PDF Writer : Added support for PageBreak
- PDF Writer : Added callback for modifying the HTML
- Added Support for Language, both for document overall and individual text elements
- Template : Set a checkbox by @nxtpge in #2509
- ODText / RTF / Word2007 Writer : Add field FILENAME by @milkyway-git in #2510
- ODText Reader : Improve Section Reader by @oleibman in #2507
Bug fixes
- Fixed wrong mimetype for docx files by @gamerlv in #2416
- Word2007 Reader : Read hyperlingks in headings by @hannesdorn in #2433
- PclZip : strtr using empty string by @spl1nes in #2432
- Fixed PHP 8.2 deprecated about Allow access to an undefined property by @DAdq26 in #2440
- Template Processor : Fixed choose dimention for Float Value by @gdevilbat in #2449
- HTML Parser : Fix image parsing from url without extension by @JokubasR in #2459
- Word2007 Reader : Fixed reading of Office365 DocX file by @filippotoso & @lfglopes in #2506
- Word2007 Reader : Check for null on $fontDefaultStyle by @spatialfree in #2513
Miscellaneous
- Added PHPStan by @PowerKiKi in #2405
- Bump symfony/process from 4.4.44 to 5.4.26 by @dependabot in #2431
- Bump phpunit/phpunit from 9.6.8 to 9.6.10 by @dependabot in #2430
- Added Coveralls.io by @Progi1984 in #2452
- Added support for PHP 8.2 & PHP 8.3 by @Progi1984 in #2453
- Moved documention from ReadTheDocs to MkDocs & Github Pages by @Progi1984 in #2465
- Bump phpstan/phpstan-phpunit from 1.3.13 to 1.3.14 by @dependabot in #2457
- Bump symfony/process from 5.4.26 to 5.4.28 by @dependabot in #2456
- Bump phpunit/phpunit from 9.6.10 to 9.6.11 by @dependabot in #2455
- Remove deprecated utf8_encode in PHP 8.2 by @mhcwebdesign in #2447 & #2472
- Bump mpdf/mpdf from 8.1.6 to 8.2.0 by @dependabot in #2480
- Bump phpunit/phpunit from 9.6.11 to 9.6.13 by @dependabot in #2481
- Bump tecnickcom/tcpdf from 6.6.2 to 6.6.5 by @dependabot in #2482
- Bump phpmd/phpmd from 2.13.0 to 2.14.1 by @dependabot in #2483
- Bump phpstan/phpstan-phpunit from 1.3.14 to 1.3.15 by @dependabot in #2494
BC Breaks
- Removed dependency
laminas/laminas-escaper
New Contributors
- @dependabot made their first contribution in #2431
- @terryzwt made their first contribution in #2429
- @gamerlv made their first contribution in #2416
- @hannesdorn made their first contribution in #2433
- @spl1nes made their first contribution in #2432
- @DAdq26 made their first contribution in #2440
- @JokubasR made their first contribution in #2459
Full Changelog: 1.1.0...1.2.0-beta.1
1.1.0
Enhancements
- Introduce deleteRow() method for TemplateProcessor
- HTML Reader: Add basic support for CSS Style Tag
- Allow customizing macro syntax in TemplateProcessor
- Add background color support for textboxes
- Add softhyphen support to word reader
- Add support table row height when importing HTML
- Add support for fractional font sizes
- Added image quality support, with the maximum quality as default
- Support for reading nested tables
Bug fixes
- DOCX reader: Read empty vmerge
- Fixed setting width of Cell Style
Miscellaneous
master
is the new default branch
1.0.0
BREAKING CHANGE
Most deprecated things were dropped. See details in
b9f1151.
Dropped classes:
PhpOffice\PhpWord\Template
Dropped constants:
PhpOffice\PhpWord\Style\Font::UNDERLINE_DOTHASH
PhpOffice\PhpWord\Style\Font::UNDERLINE_DOTHASHHEAVY
PhpOffice\PhpWord\Style\Cell::VALIGN_TOP
PhpOffice\PhpWord\Style\Cell::VALIGN_CENTER
PhpOffice\PhpWord\Style\Cell::VALIGN_BOTTOM
PhpOffice\PhpWord\Style\Cell::VALIGN_BOTH
PhpOffice\PhpWord\Style\TOC::TABLEADER_DOT
PhpOffice\PhpWord\Style\TOC::TABLEADER_UNDERSCORE
PhpOffice\PhpWord\Style\TOC::TABLEADER_LINE
PhpOffice\PhpWord\Style\TOC::TABLEADER_NONE
PhpOffice\PhpWord\Style\Table::WIDTH_AUTO
PhpOffice\PhpWord\Style\Table::WIDTH_PERCENT
PhpOffice\PhpWord\Style\Table::WIDTH_TWIP
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_NAME
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_SIZE
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_COLOR
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_CONTENT_TYPE
Dropped methods:
PhpOffice\PhpWord\Ekement\AbstractContainer::createTextRun()
PhpOffice\PhpWord\Ekement\AbstractContainer::createFootnote()
PhpOffice\PhpWord\Ekement\Footnote::getReferenceId()
PhpOffice\PhpWord\Ekement\Footnote::setReferenceId()
PhpOffice\PhpWord\Ekement\Image::getIsWatermark()
PhpOffice\PhpWord\Ekement\Image::getIsMemImage()
PhpOffice\PhpWord\Ekement\Link::getTarget()
PhpOffice\PhpWord\Ekement\Link::getLinkSrc()
PhpOffice\PhpWord\Ekement\Link::getLinkName()
PhpOffice\PhpWord\Ekement\OLEObject::getObjectId()
PhpOffice\PhpWord\Ekement\OLEObject::setObjectId()
PhpOffice\PhpWord\Ekement\Section::getFootnotePropoperties()
PhpOffice\PhpWord\Ekement\Section::setSettings()
PhpOffice\PhpWord\Ekement\Section::getSettings()
PhpOffice\PhpWord\Ekement\Section::createHeader()
PhpOffice\PhpWord\Ekement\Section::createFooter()
PhpOffice\PhpWord\Ekement\Section::getFooter()
PhpOffice\PhpWord\Media::addSectionMediaElement()
PhpOffice\PhpWord\Media::addSectionLinkElement()
PhpOffice\PhpWord\Media::getSectionMediaElements()
PhpOffice\PhpWord\Media::countSectionMediaElements()
PhpOffice\PhpWord\Media::addHeaderMediaElement()
PhpOffice\PhpWord\Media::countHeaderMediaElements()
PhpOffice\PhpWord\Media::getHeaderMediaElements()
PhpOffice\PhpWord\Media::addFooterMediaElement()
PhpOffice\PhpWord\Media::countFooterMediaElements()
PhpOffice\PhpWord\Media::getFooterMediaElements()
PhpOffice\PhpWord\PhpWord::getProtection()
PhpOffice\PhpWord\PhpWord::loadTemplate()
PhpOffice\PhpWord\PhpWord::createSection()
PhpOffice\PhpWord\PhpWord::getDocumentProperties()
PhpOffice\PhpWord\PhpWord::setDocumentProperties()
PhpOffice\PhpWord\Reader\AbstractReader::getReadDataOnly()
PhpOffice\PhpWord\Settings::getCompatibility()
PhpOffice\PhpWord\Style\AbstractStyle::setArrayStyle()
PhpOffice\PhpWord\Style\Cell::getDefaultBorderColor()
PhpOffice\PhpWord\Style\Font::getBold()
PhpOffice\PhpWord\Style\Font::getItalic()
PhpOffice\PhpWord\Style\Font::getSuperScript()
PhpOffice\PhpWord\Style\Font::getSubScript()
PhpOffice\PhpWord\Style\Font::getStrikethrough()
PhpOffice\PhpWord\Style\Font::getParagraphStyle()
PhpOffice\PhpWord\Style\Frame::getAlign()
PhpOffice\PhpWord\Style\Frame::setAlign()
PhpOffice\PhpWord\Style\NumberingLevel::getAlign()
PhpOffice\PhpWord\Style\NumberingLevel::setAlign()
PhpOffice\PhpWord\Style\Paragraph::getAlign()
PhpOffice\PhpWord\Style\Paragraph::setAlign()
PhpOffice\PhpWord\Style\Paragraph::getWidowControl()
PhpOffice\PhpWord\Style\Paragraph::getKeepNext()
PhpOffice\PhpWord\Style\Paragraph::getKeepLines()
PhpOffice\PhpWord\Style\Paragraph::getPageBreakBefore()
PhpOffice\PhpWord\Style\Row::getTblHeader()
PhpOffice\PhpWord\Style\Row::isTblHeader()
PhpOffice\PhpWord\Style\Row::getCantSplit()
PhpOffice\PhpWord\Style\Row::getExactHeight()
PhpOffice\PhpWord\Style\Spacing::getRule()
PhpOffice\PhpWord\Style\Spacing::setRule()
PhpOffice\PhpWord\Style\Table::getAlign()
PhpOffice\PhpWord\Style\Table::setAlign()
PhpOffice\PhpWord\Writer\AbstractWriter::getUseDiskCaching()
PhpOffice\PhpWord\Writer\HTML::writeDocument()
Bug fixes
- Multiple PHP 8.1 fixes
loadConfig
returns config that was actually applied- HTML Reader : Override inline style on HTML attribute for table
- HTML Reader : Use
border
attribute for tables - HTML Reader : Style page-break-after in paragraph
- HTML Reader : Heading in Text Run is not allowed
Miscellaneous
- Drop support for PHP 7.0 and older
0.18.3
0.18.2
Bug fixes
- when adding image to relationship first check that the generated RID is actually unique #2063 (tpv-ebben)
- Update chart, don't write 'c:overlap' if grouping is 'clustered' #2052 (dfsd534)
- Update Html parser to accept line-height:normal #2041 (joelgo)
- Fix image border in Word2007 Writer for LibreOffice 7 #2021 (kamilmmach)
Miscellaneous
0.18.1
0.18.0
Enhancements
- Add support for charts in template processor #2012 (dbarzin)
- add/setting page element border style. #1986 (emnabs)
- allow to use customized pdf library #1983 (SailorMax)
- feat: Update addHtml to handle style inheritance #1965 (Julien1138)
- Add parsing of Shape node values #1924 (sven-ahrens)
- Allow to redefine TCPDF object #1907 (SailorMax)
- Enhancements to addHTML parser #1902 (lubosdz)
- Make Default Paper Configurable #1851 (oleibman)
- Implement various missing features for the ODT writer #1796 (oleibman)
- Added support for "cloudConvert" images #1794 (ErnestStaug)
- Add support for several features for the RTF writer #1775 (oleibman)
- Add font style for Field elements #1774 (oleibman)
- Add support for ListItemRun in HTML writer #1766 (stefan-91)
- Improvements in RTF writer #1755 (oleibman)
- Allow a closure to be passed with image replacement tags #1716 (mbardelmeijer)
- Add Option for Dynamic Chart Legend Position #1699 (Stephan212)
- Add parsing of HTML checkbox input field #1832 (Matze2010)
Bug fixes
- Fix image stroke in libreoffice 7.x #1992 (Adizbek)
- Fix deprecated warning for non-hexadecimal number #1988 (Ciki)
- Fix limit not taken into account when adding image in template #1967 (jsochor)
- Add null check when setComplexValue is not found #1936 (YannikFirre)
- Some document have non-standard locale code #1824 (ErnestStaug)
- Fixes PHPDoc @param and @return types for several Converter methods #1818 (caugner)
- Update the regexp to avoid catastrophic backtracking #1809 (juzser)
- Fix PHPUnit tests on develop branch #1771 (mdupont)
- TemplateProcessor cloneBlock wrongly clones images #1763 (alarai)
Miscellaneous
- Compatibility with PHP 7.4, PHP 8.0 and migrate to Laminas Escaper #1946 (liborm85)
- Remove legacy PHPOffice/Common package, fix PHP 8.0 compatibility #1996 (liborm85)
- Improve Word2007 Test Coverage #1858 (oleibman)
- Fix typo in docs. Update templates-processing.rst #1952 (mnvx)
- Fix documentation and method name for FootnoteProperties #1776 (mdupont)
- fix: documentation about paragraph indentation #1764 (mdupont)
- Update templates-processing.rst #1745 (igronus)
- Unused variables $rows, $cols in sample #1877 (ThanasisMpalatsoukas)
- Add unit test for NumberingStyle #1744 (Manunchik)
- Add unit test for PhpWord Settings #1743 (Manunchik)
- Add unit test for Media elements #1742 (Manunchik)
- Update templates processing docs #1729 (hcdias)
v0.17.0
Added
- Add methods setValuesFromArray and cloneRowFromArray to the TemplateProcessor @geraldb-nicat #670
- Set complex type in template @troosan #1565
- implement support for section vAlign @troosan #1569
- ParseStyle for border-color @Gllrm0 #1551
- Html writer auto invert text color @SailorMax #1387
- Add RightToLeft table presentation. @troosan #1550
- Add support for page vertical alignment. @troosan #672 #1569
- Adding setNumId method for ListItem style @eweso #1329
- Add support for basic fields in RTF writer. @Samuel-BF #1717
Fixed
- Fix HTML border-color parsing. @troosan #1551 #1570
- Language::validateLocale should pass with locale 'zxx'. @efpapado #1558
- can't align center vertically with the text @ter987 #672
- fix parsing of border-color and add test @troosan #1570
- TrackChange doesn't handle all return types of \DateTime::createFromFormat(...) @superhaggis #1584
- To support PreserveText inside sub container @bhattnishant #1637
- No nested w:pPr elements in ListItemRun. @waltertamboer #1628
- Ensure that entity_loader disable variable is re-set back to the original setting @seamuslee001 #1585