Releases: PHPOffice/PHPWord
Releases · PHPOffice/PHPWord
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
Miscellaneous
v0.16.0
Added
- Add getVariableCount method in TemplateProcessor. @nicoder #1272
- Add setting Chart Title and Legend visibility @Tom-Magill #1433
- Add ability to pass a Style object in Section constructor @ndench #1416
- Add support for hidden text @Alexmg86 #1527
- Add support for setting images in TemplateProcessor @SailorMax #1170
- Add "Plain Text" type to SDT (Structured Document Tags) @morrisdj #1541
- Added possibility to index variables inside cloned block in TemplateProcessor @JPBetley #817
- Added possibility to replace variables inside cloned block with values in TemplateProcessor @DIDoS #1392
Fixed
- Fix regex in
cloneBlock
function @nicoder #1269 - HTML Title Writer loses text when Title contains a TextRun instead a string. @begnini #1436
- Fix regex in fixBrokenMacros, make it less greedy @MuriloSo @brainwood @yurii-sio2 #1502 #1345
- 240 twips are being added to line spacing, should not happen when using lineRule fixed @troosan #1509 #1505
- Adding table layout to the generated HTML @aarangara #1441
- Fix loading of Sharepoint document @Garrcomm #1498
- RTF writer: Round getPageSizeW and getPageSizeH to avoid decimals @Patrick64 #1493
- Fix parsing of Office 365 documents @Timanx #1485
- For RTF writers, sizes should should never have decimals @Samuel-BF #1536
- Style Name Parsing fails if document generated by a non-english word version @begnini #1434
Miscelaneous
- Get rid of duplicated code in TemplateProcessor @abcdmitry #1161