diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ed772171e7..0a6219f6d1 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -163,3 +163,13 @@ jobs: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar chmod +x php-coveralls.phar php php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv + + roave-backwards-compatibility-check: + name: Roave Backwards Compatibility Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: "Check for BC breaks" + run: docker run -u $(id -u) -v $(pwd):/app nyholm/roave-bc-check-ga \ No newline at end of file diff --git a/docs/changes/1.x/1.2.0.md b/docs/changes/1.x/1.2.0.md index 30d3b35202..c21d23692f 100644 --- a/docs/changes/1.x/1.2.0.md +++ b/docs/changes/1.x/1.2.0.md @@ -33,7 +33,7 @@ - ODText / RTF / Word2007 Writer : Add field FILENAME by [@milkyway-git](https://github.com/milkyway-git) in [#2510](https://github.com/PHPOffice/PHPWord/pull/2510) - ODText Reader : Improve Section Reader by [@oleibman](https://github.com/oleibman) in [#2507](https://github.com/PHPOffice/PHPWord/pull/2507) -### Bug fixes +## Bug fixes - Fixed wrong mimetype for docx files by [@gamerlv](https://github.com/gamerlv) in GH-2416 - Word2007 Reader : Read hyperlingks in headings by [@hannesdorn](https://github.com/hannesdorn) in GH-2433 @@ -44,7 +44,7 @@ - Word2007 Reader : Fixed reading of Office365 DocX file by [@filippotoso](https://github.com/filippotoso) & [@lfglopes](https://github.com/lfglopes) in [#2506](https://github.com/PHPOffice/PHPWord/pull/2506) - Word2007 Reader : Check for null on $fontDefaultStyle by [@spatialfree](https://github.com/spatialfree) in [#2513](https://github.com/PHPOffice/PHPWord/pull/2513) -### Miscellaneous +## Miscellaneous - Added PHPStan by [@PowerKiKi](https://github.com/PowerKiKi) in GH-2405 - Bump symfony/process from 4.4.44 to 5.4.26 by [@dependabot](https://github.com/dependabot) in GH-2431 @@ -61,7 +61,7 @@ - Bump tecnickcom/tcpdf from 6.6.2 to 6.6.5 by [@dependabot](https://github.com/dependabot) in [#2482](https://github.com/PHPOffice/PHPWord/pull/2482) - Bump phpmd/phpmd from 2.13.0 to 2.14.1 by [@dependabot](https://github.com/dependabot) in [#2483](https://github.com/PHPOffice/PHPWord/pull/2483) - Bump phpstan/phpstan-phpunit from 1.3.14 to 1.3.15 by [@dependabot](https://github.com/dependabot) in [#2494](https://github.com/PHPOffice/PHPWord/pull/2494) +- Github Action : Roave BC Check by [@Progi1984](https://github/Progi1984) in [#](https://github.com/PHPOffice/PHPWord/pull/) - -### BC Breaks +## BC Breaks - Removed dependency `laminas/laminas-escaper` \ No newline at end of file diff --git a/docs/changes/2.x/2.0.0.md b/docs/changes/2.x/2.0.0.md new file mode 100644 index 0000000000..23454b3ea8 --- /dev/null +++ b/docs/changes/2.x/2.0.0.md @@ -0,0 +1,13 @@ +# [2.0.0](https://github.com/PHPOffice/PHPWord/tree/2.0.0) (WIP) + +### BC Breaks +- Removed dependency `laminas/laminas-escaper` +- Changed: The return type of PhpOffice\PhpWord\Metadata\Settings#getThemeFontLang() changed from no type to PhpOffice\PhpWord\Style\Language|null +- Changed: The return type of PhpOffice\PhpWord\Metadata\Settings#setThemeFontLang() changed from void to the non-covariant self +- Changed: The return type of PhpOffice\PhpWord\Metadata\Settings#setThemeFontLang() changed from void to self +- Changed: The parameter $themeFontLang of PhpOffice\PhpWord\Metadata\Settings#setThemeFontLang() changed from no type to a non-contravariant PhpOffice\PhpWord\Style\Language +- Changed: The parameter $themeFontLang of PhpOffice\PhpWord\Metadata\Settings#setThemeFontLang() changed from no type to PhpOffice\PhpWord\Style\Language +- Changed: The number of required arguments for PhpOffice\PhpWord\Style\Indentation#setLeft() increased from 0 to 1 +- Changed: The number of required arguments for PhpOffice\PhpWord\Style\Indentation#setRight() increased from 0 to 1 +- Changed: The number of required arguments for PhpOffice\PhpWord\Style\Indentation#setFirstLine() increased from 0 to 1 +- Changed: The number of required arguments for PhpOffice\PhpWord\Shared\Html::mapAlign() increased from 1 to 2 \ No newline at end of file diff --git a/roave-bc-check.yaml b/roave-bc-check.yaml new file mode 100644 index 0000000000..4f32bfad7f --- /dev/null +++ b/roave-bc-check.yaml @@ -0,0 +1,12 @@ +parameters: + ignoreErrors: + # 1.2.0 + - '#\[BC\] CHANGED\: The return type of PhpOffice\\PhpWord\\Metadata\\Settings\#getThemeFontLang\(\) changed from no type to PhpOffice\\PhpWord\\Style\\Language|null#' + - '#\[BC\] CHANGED\: The return type of PhpOffice\\PhpWord\\Metadata\\Settings\#setThemeFontLang\(\) changed from void to self#' + - '#\[BC\] CHANGED\: The return type of PhpOffice\\PhpWord\\Metadata\\Settings\#setThemeFontLang\(\) changed from void to the non-covariant self#' + - '#\[BC\] CHANGED\: The parameter \$themeFontLang of PhpOffice\\PhpWord\\Metadata\\Settings\#setThemeFontLang\(\) changed from no type to a non-contravariant PhpOffice\\PhpWord\\Style\\Language#' + - '#\[BC\] CHANGED\: The parameter \$themeFontLang of PhpOffice\\PhpWord\\Metadata\\Settings\#setThemeFontLang\(\) changed from no type to PhpOffice\\PhpWord\\Style\\Language#' + - '#\[BC\] CHANGED\: The number of required arguments for PhpOffice\\PhpWord\\Style\\Indentation\#setLeft\(\) increased from 0 to 1#' + - '#\[BC\] CHANGED\: The number of required arguments for PhpOffice\\PhpWord\\Style\\Indentation\#setRight\(\) increased from 0 to 1#' + - '#\[BC\] CHANGED\: The number of required arguments for PhpOffice\\PhpWord\\Style\\Indentation\#setFirstLine\(\) increased from 0 to 1#' + - '#\[BC\] CHANGED\: The number of required arguments for PhpOffice\\PhpWord\\Shared\\Html\:\:mapAlign\(\) increased from 1 to 2#' \ No newline at end of file