Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 1049 upgrade php spreadsheet #3

Merged
merged 385 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
385 commits
Select commit Hold shift + click to select a range
9d17408
xdebug isn't built into the nightly PHP, so we'll get an error if we …
Aug 9, 2020
adc0e98
<>/!=
Aug 9, 2020
23e3a09
Update to versions of complex and matrix libraries
Sep 1, 2020
8d89554
Set formula attribute in the Xlsx reader
ghd-crediwire Sep 7, 2020
43db94e
Calculation/DateTime Failure With PHP8 (#1661)
oleibman Oct 1, 2020
7d05e05
Update to versions of complex and matrix libraries
Oct 1, 2020
b44eb85
Merge branch 'master' into PHP8-Testing
Oct 1, 2020
fe6221f
Reader/Gnumeric Failure with PHP8 (#1662)
oleibman Oct 1, 2020
416e27b
ReverseSort bug, exposed but not caused by PHP8 (#1660)
oleibman Oct 2, 2020
3d9867c
Drop $this->spreadSheet null check from Xlsx Writer (#1646)
simPod Oct 2, 2020
b9ca8a1
Update index.md (#1620)
Arman-Hosseini Oct 2, 2020
ef997a0
Bug setting Superscript/Subscript to false (#1567)
oleibman Oct 5, 2020
9f6da8a
Update CHANGELOG
PowerKiKi Oct 5, 2020
12bdcaa
Sync README
PowerKiKi Oct 5, 2020
71f21fb
Separate compoer.json for PHP8 to enforce phpunit ^9.3
Oct 8, 2020
f399acc
We don't want the composer lock file for PHP8
Oct 8, 2020
fdee43c
Merge branch 'master' into PHP8-Testing
Oct 8, 2020
3db9fb7
Work with existing composer file; but force a fresh install to requir…
Oct 8, 2020
8d0bb37
Allow failures on nightly
Oct 8, 2020
723ca37
Allow failures on nightly fails if we remove it from the grid
Oct 8, 2020
ab4d741
fixed php8 deprecation warning for libxml_disable_entity_loader() (#1…
brainfoolong Oct 8, 2020
57d1854
Merge branch 'master' into PHP8-Testing
Oct 8, 2020
87a909a
Use ZipArchive methods as zip_* functions are deprecated in PHP8
Oct 9, 2020
ee13533
Remove tests that include tcPDF and DomPDF libraries when running aga…
Oct 9, 2020
6e6c68e
Let's try to figure out why we're having an issue with a temp csv file
Oct 9, 2020
e3b9b0d
Need to add `application/csv` to the list of valid CSV mime types
Oct 9, 2020
930fdc1
Locale-specific float to string is changed in PHP as per https://wiki…
Oct 9, 2020
dcc47fb
Codestyle clean-ups
Oct 9, 2020
ebb7569
Switch from using poser badges to shields.io because poser wasn't pic…
Oct 9, 2020
2d93c36
Update composer suggestions
Oct 10, 2020
44080a1
Introduce GitHub Actions
PowerKiKi Oct 10, 2020
794ac80
Annotate problems in code
PowerKiKi Oct 10, 2020
df2fd91
Merge pull request #1676 from PHPOffice/github-actions
PowerKiKi Oct 10, 2020
c3d1ce5
Publish API docs via GitHub Actions
PowerKiKi Oct 11, 2020
591f7cf
Merge pull request #1675 from PHPOffice/PHP8-Testing
PowerKiKi Oct 11, 2020
b53199d
Update composer suggestions
Oct 11, 2020
7545c41
Test PHP 8 on GitHub Actions
PowerKiKi Oct 11, 2020
1741766
Improving Coverage for Excel2003 XML Reader (#1557)
oleibman Oct 11, 2020
da7adcd
Update CHANGELOG
PowerKiKi Oct 11, 2020
a8e8068
1.15.0
PowerKiKi Oct 11, 2020
6da3f30
Remove coverage from Travis
PowerKiKi Oct 11, 2020
1cda811
Prepare for next version
PowerKiKi Oct 11, 2020
92389c7
Ensure that the list of shared formulae is maintained while chunk-rea…
Oct 12, 2020
96e843c
Prevent notice during accessing "cached magnification factor" offset
Sep 21, 2020
cc209d0
Refresh lock files
PowerKiKi Oct 19, 2020
ae0cd46
Add exportArray Method for Styles (#1580)
oleibman Oct 26, 2020
0bf3986
Updating a misspelling of a function name. (#1695)
CoryHrycko Nov 1, 2020
cca43f0
Merge pull request #4 from PHPOffice/master
oleibman Nov 2, 2020
6fe6531
Make DefinedNames Samples Consistent With Other Samples (#1707)
oleibman Nov 11, 2020
0ed5b80
Resolve XSS Vulnerability in the HTML Writer (#1719)
Nov 19, 2020
bd05c59
Drop Travis
PowerKiKi Nov 26, 2020
ba1ce8b
Automatic GitHub releases from git tags
PowerKiKi Nov 26, 2020
1a0aab1
Improve Coverage in src/PhpSpreadsheet
oleibman Nov 27, 2020
6b4feb6
Changes for Scrutinizer
oleibman Nov 27, 2020
40abd18
Merge pull request #1734 from oleibman/morecoverage
PowerKiKi Dec 2, 2020
7247e3b
Spelling: Tou -> You
rhynodesigns Dec 7, 2020
baa9c45
Merge pull request #1745 from rhynodesigns/patch-1
PowerKiKi Dec 9, 2020
ce78635
Fix for 1735 (Incorrect activeSheetIndex after RemoveSheetByIndex) (#…
oleibman Dec 10, 2020
ff04c85
Update change log
Dec 10, 2020
497a934
Fix for 3 Issues Involving ReadXlsx and NamedRange (#1742)
oleibman Dec 10, 2020
0861370
Update change log
Dec 10, 2020
a8462f3
Apply Column and Row Styles to Existing Cells (#1721)
oleibman Dec 10, 2020
4c86175
Update change log
Dec 10, 2020
78774d6
Merge remote-tracking branch 'origin/master'
Dec 10, 2020
957cb62
TextData Coverage and Minor Bug Fixes (#1744)
oleibman Dec 10, 2020
9289ab1
Replace anti-xss with html purifier (#1751)
Dec 10, 2020
1f2f2c7
Fix bug #1626 where values of 0 were "rounded" up/down as if they wer…
Flinsch Dec 10, 2020
d90d050
Update change log
Dec 10, 2020
e0feeca
Fix for #1612 - SLK Long File Name (#1706)
oleibman Dec 10, 2020
1de03c2
Update change log
Dec 10, 2020
916b688
worksheet: fix if cellValue does not exist (#1727)
jasverix Dec 10, 2020
2c927b1
fixes #1655 issue (#1656)
kalyabin Dec 10, 2020
9cd39b8
Add 'ps' suffix to printer settings resources IDs (#1690)
sdespont Dec 10, 2020
2307df5
Update change log
Dec 10, 2020
4133bcf
Fix pixelsToPoints conversion (for HTML col width) (#1733)
guilliamxavier Dec 10, 2020
8833c23
DocBlock Change in Styles/Conditional (#1697)
oleibman Dec 10, 2020
3025824
Merge pull request #1698
oleibman Dec 17, 2020
51cb212
Fix for bug #1592 (UPDATED) (#1623)
ggiovinazzo Dec 17, 2020
e10c01d
Update change log
Dec 17, 2020
8007872
Add nightly PHP 8.1 dev to github actions (#1763)
Dec 21, 2020
607d347
Fix compatibility with ext-gd on php 8 (#1762)
derrabus Dec 25, 2020
e768cb0
CSV - Guess Encoding, Handle Null-string Escape (#1717)
oleibman Dec 25, 2020
a6240b0
Update changelog
Dec 25, 2020
002044c
Update Units of Measure supported by the CONVERT() function (#1768)
Dec 29, 2020
76d4323
Changelog for 1.16.0 release
Dec 31, 2020
d2edab2
Fix date tests withut specified year for current year 2021 (#1774)
martinssipenko Jan 7, 2021
ec51b75
Mrand of zero to any multiple should return 0 (#1773)
martinssipenko Jan 7, 2021
4134ff2
Problems Using Builtin PHP Functions Directly As Excel Functions (#1799)
oleibman Jan 26, 2021
7b1e5d2
Delete Temporary Files In XssVulnerabilityTest (#1800)
oleibman Jan 28, 2021
ff784b5
Update Changelog for switch from built-in PHP functions to Excel clas…
Jan 28, 2021
a66233b
Fix For #1772 Null Exception on ODS Read (#1776)
oleibman Jan 28, 2021
a0ef2b8
Additional method call/return typing
Jan 28, 2021
e7bbc51
Update Changelog
Jan 28, 2021
e1ed52e
PHPCS Resolutions
Jan 28, 2021
87c8e95
Fix Xlsx reader overriding manually set number format with builtin nu…
rvanvelzen Jan 28, 2021
f1b63b7
Update Changelog
Jan 28, 2021
65837da
Named formula fix for empty formula value
Jan 29, 2021
97aa78f
Do not swallow previous exception (#1778)
JaZo Jan 29, 2021
8d2d783
Support DataBar of conditional formatting rule (#1754)
tera911 Jan 29, 2021
24fb8e6
formatAsDate strip language metadata (#1618)
SheetJSDev Jan 29, 2021
cd2f260
Additional method call/return typing
Jan 29, 2021
8ab0288
Composer fixes
Jan 29, 2021
03ab630
PHPCS Fixes
Jan 29, 2021
4092da0
Additional unit tests for statistical functions, with a fix to orderi…
Jan 29, 2021
80155cf
Unhappy path unit tests (#1814)
Jan 29, 2021
41c8a4f
Additional unit tests for previously untested financial functions (#1…
Jan 30, 2021
5d309e9
Extract remaining Excel function unit tests into separate test classe…
Jan 31, 2021
18abae7
Additional statistical unit tests (#1818)
Jan 31, 2021
43d1da6
Inherited Scrutinizer Recommendations - 1 of 3 (#1806)
oleibman Jan 31, 2021
70c3803
Inherited Scrutinizer Recommendations - 2 of 3 (#1807)
oleibman Jan 31, 2021
308bc64
Inherited Scrutinizer Recommendations - 3 of 3 (#1808)
oleibman Jan 31, 2021
fdc8e8d
Fix/1674 (#1688)
alexgunkel Jan 31, 2021
cade11f
Fixed reading XSLS style alignments from XML (#1710)
addiks Jan 31, 2021
304904d
Update change log
Jan 31, 2021
44248cd
Fix/sheets xlsx chart (#1761)
hazybluedot Jan 31, 2021
c82ff25
Fix/chart axis titles (#1760)
hazybluedot Jan 31, 2021
8b94a37
Update change log
Jan 31, 2021
5f761b6
Cell alignment for ods Writer (#1819)
Jan 31, 2021
d28b7de
Refactoring of ODS Writer to break codebase into smaller components (…
Feb 1, 2021
fa51a85
Fix XLSX reader when having a corrupt numeric cell data type (#1664)
brainfoolong Feb 1, 2021
a184b0f
Update changelog
Feb 1, 2021
ce79f17
Update changelog
Feb 1, 2021
30717fd
Remove leftover of Sami
PowerKiKi Feb 2, 2021
2fac9ee
Stacked Alignment - Use Class Constant Rather than Literal (#1716)
oleibman Feb 3, 2021
b068639
Substitute a literal dot inside quotes within number format masks to …
Feb 8, 2021
f60f37c
Fix case where mergeComplexNumberFormatMasks would get stuck in endle…
brainz80 Feb 8, 2021
6f6a058
Update change log
Feb 8, 2021
17f405c
Attempt to provide allow failure for PHP8.1 unit tests (#1847)
Feb 12, 2021
2aa4a28
Move Bessel function calculations from the Engineering class to a ded…
Feb 12, 2021
b975fb7
Update PPMT & IPMT implementation to better reflect excel behaviour. …
ElPopcorn Feb 12, 2021
6946bde
Fix docblocks
Feb 12, 2021
69315f0
Extract all BitWise functions from the Engineering class into a dedic…
Feb 12, 2021
61d2e6d
Extract all Base Conversion functions from the Engineering class into…
Feb 13, 2021
be328c3
Extract all Error functions from the Engineering class into a dedica…
Feb 13, 2021
e824caf
Update Changelog
Feb 13, 2021
42ecc27
Extract Permutation functions from the Statistical class into a dedic…
Feb 13, 2021
15a5d13
Update docs
Feb 13, 2021
c54e3e9
Extract DELTA() and GESTEP() functions from the Engineering class int…
Feb 13, 2021
cabcfaa
ROUND Accepts null, false, and true as First Parameter (#1837)
oleibman Feb 13, 2021
a24ca09
Support 'Forms' for ROMAN Function (#1828)
oleibman Feb 13, 2021
8d06923
Additional Office 365 functions for Excel added in 2020
Feb 13, 2021
c407ff6
Start extracting Logical Excel functions into separate groups in dedi…
Feb 14, 2021
f277817
Update deprecation notices to reflect deprecated from the next releas…
Feb 14, 2021
9909af6
Fix coding standards issue
Feb 14, 2021
e296001
Merge branch 'reader-array-formula-bugfix'
Feb 14, 2021
4e1f89d
Fix coding standards issue
Feb 14, 2021
ef3f8f3
Use DateTime Rather than gmmktime in Sample Template (#1827)
oleibman Feb 14, 2021
10c9c4c
Make Documentation Updates Easier and More Accurate (#1573)
oleibman Feb 15, 2021
7c7b229
Let's see what Scrutinizer makes of these changes (#1859)
Feb 18, 2021
5afda81
Advanced Value Binder Improvements (#1862)
Feb 18, 2021
b269c26
Advanced Value Binder improvements (#1863)
Feb 18, 2021
409c05b
Additional Unit Test Cases for Convert UoM (#1864)
Feb 19, 2021
b0eb272
Bugfix #1858; `getCell()` method should support named cells correctly…
Feb 19, 2021
1318b90
Bugfix #1858; Apply stricter scoping rules to named range/cell access…
Feb 19, 2021
3764f30
Refactor the Excel Database functions; and rewrite the query building…
Feb 22, 2021
40a6dee
Enable support for dates and percentages in Excel Database functions …
Feb 22, 2021
25f7dcb
Enable support for wildcard text searches in Excel Database functions…
Feb 23, 2021
cb23cca
Avoid Duplicate Titles When Reading Multiple HTML Files (#1829)
oleibman Feb 27, 2021
8dcdf58
Update change log
Feb 27, 2021
08673b5
Initial experiments using the new Database query logic with Condition…
Feb 27, 2021
80a20fc
100% Coverage for Calculation/DateTime (#1870)
oleibman Feb 27, 2021
761c84a
Avoid the performance/memory overheads of "clone on modify" of $args …
Feb 27, 2021
ee969fd
Additional conditionals from math trig (#1885)
Feb 28, 2021
1d6f36d
Initial Formula Translation tests (#1886)
Feb 28, 2021
0715b63
Pdf Writer strtoupper() fix (#1629)
adancabanas Feb 28, 2021
8721f79
Update ReferenceHelper.php (#1873)
ivanstan Mar 1, 2021
2eaf9b5
Start splitting some of the basic Statistical functions out into sepa…
Mar 2, 2021
42e8680
Statistics more unit tests (#1889)
Mar 2, 2021
f8c58fb
Changelog
Mar 2, 2021
c55269c
Changelog
Mar 2, 2021
04e7c30
Fix Two 32-bit Timestamp Problems, and Minor getFormattedValue Bug (#…
oleibman Mar 3, 2021
70e3711
Move the trend functions from Statistical and into their own group cl…
Mar 3, 2021
3e67271
Writing defined names without a worksheet reference in Xlsx (#1892)
Mar 3, 2021
60023e4
Refactoring
Mar 3, 2021
1272224
Minor Refactoring
Mar 3, 2021
000e608
Reverted Scrutinzer fix in Xslx Reader listWorksheetInfo (#1895)
patrickbrouwers Mar 3, 2021
d2a83b4
Statistical trends additional functions and unit tests (#1896)
Mar 3, 2021
a79a4dd
Statistical refactoring - Confidence() and Trend() (#1898)
Mar 4, 2021
2d8c8c8
Trend unit tests (#1899)
Mar 6, 2021
c4ed0ee
Minor scrutinizer improvements (#1906)
Mar 7, 2021
f81ffd9
Additional argument validation for LEFT(), MID() and RIGHT() text fun…
Mar 8, 2021
70f372d
Start refactoring the Lookup and Reference functions (#1912)
Mar 10, 2021
13b62be
Fix for Issue #1887 - Lose Track of Selected Cells After Save (#1908)
oleibman Mar 10, 2021
4717741
Update ChangeLog
Mar 10, 2021
499ce61
Unhappy path tests for FORMULATEXT() Function (#1915)
Mar 10, 2021
2259de5
Lookup ref further tests and examples (#1918)
Mar 11, 2021
baacc83
Replace manual wildcard logic in MATCH() function with the new Wildca…
Mar 12, 2021
0d1957a
Fix SpreadsheetML (xml) detection (#1917)
christof-b Mar 13, 2021
0ce8509
Continue MathTrig Breakup - Trig Functions (#1905)
oleibman Mar 13, 2021
af9253d
Add null typehint to Worksheet::getColumnDimension() since it returns…
simPod Mar 13, 2021
0edfc32
Update the fopen mode for writer
ccrims0n Mar 14, 2021
5686453
Add test case for excel with media
ccrims0n Mar 14, 2021
51abdf0
Refactor xlsx writer
ccrims0n Mar 14, 2021
c9b9cf9
Update PHPCS changes
ccrims0n Mar 14, 2021
ed62526
First step extracting INDIRECT() and OFFSET() to their own classes (#…
Mar 14, 2021
7e071e8
Coverage for Helper/Samples (#1920)
oleibman Mar 14, 2021
d99a4a3
Improve Coverage of BIN2DEC etc. (#1902)
oleibman Mar 14, 2021
30c880b
Bitwise Functions and 32-bit (#1900)
oleibman Mar 14, 2021
c920a77
Some minor refactoring (#1923)
Mar 14, 2021
ae24684
jpgraph seems to be finally dying with PHP. (#1926)
Mar 15, 2021
0902225
Resolve Deprecated setMethods() call when Mocking for tests (#1925)
Mar 15, 2021
9b67e3f
Fix error with a single byte being removed after the _ spacing charac…
Mar 15, 2021
6490c3f
First step in some refactoring of the NumberFormat class (#1928)
Mar 17, 2021
3ab066b
Update change log
Mar 17, 2021
4cd6c78
Initial unit tests for Document Properties (#1932)
Mar 17, 2021
e59c751
Fix reference to deprecated transpose in lookup (#1935)
Mar 17, 2021
4e8a926
Final part of breaking down the Engineering class for Excel Engineeri…
Mar 19, 2021
d346318
Start work on breaking down some of the Financial Excel functions (#1…
Mar 20, 2021
b87d78b
First pass at extracting Financial Price functions for Securities (#1…
Mar 20, 2021
9beacd2
Complete Breakup Of Calculation/DateTime Functions (#1937)
oleibman Mar 21, 2021
5ad5f78
Financial functions next stage of refactoring (#1943)
Mar 21, 2021
1a7b9a4
First phase of refactoring the Excel Text functions (#1945)
Mar 23, 2021
07ad800
New Bessel Algorithm, providing a higher degree of accuracy and preci…
Mar 24, 2021
b7f9375
Csv reader refactor infer delimiter (#1948)
Mar 24, 2021
f51c19c
First steps toward refactoring Excel's Statistical Distributions (#1949)
Mar 25, 2021
c380b25
Extract Poisson distribution into its own class (#1953)
Mar 26, 2021
9239b3d
Continue MathTrig Breakup - Problem Children (#1954)
oleibman Mar 26, 2021
d36f9d5
Switch calls to deprecated function methods to the equivalent new met…
Mar 26, 2021
c699d14
Extract ACCRINT() and ACCRINTM() Financial functions into their own c…
Mar 26, 2021
ec25314
Start implementing Newton-Raphson for the inverse of Statistical Dist…
Mar 27, 2021
a34dd71
Difference in variance calculations between Excel/Gnumeric and Open/L…
Mar 27, 2021
67fec4e
Implementation of the CHITEST() statistical function (#1960)
Mar 27, 2021
924347c
Update PHP deps
PowerKiKi Mar 28, 2021
aff1d35
Merge pull request #1894 from PHPOffice/Writer-Cleanup-Parsing-Define…
PowerKiKi Mar 28, 2021
e2ff14f
Implemented the CHISQ.DIST() Statistical function. (#1961)
Mar 28, 2021
e68978f
Chi squared inverse left tailed (#1964)
Mar 28, 2021
b87f93f
Update remaining references in the Financial Functions code to avoid …
Mar 28, 2021
1c92b76
Extract Percentile-type functions from Statistics (#1966)
Mar 29, 2021
df93577
Document release process
PowerKiKi Mar 30, 2021
029f345
Extract Binomial Distribution functions from Statistical (#1974)
Mar 30, 2021
17af132
Extract a few more Distribution functions from Statistical (#1975)
Mar 31, 2021
0c403ef
Resolution for [#Issue 1972](https://github.com/PHPOffice/PhpSpreadsh…
Apr 1, 2021
a4982fd
Continue MathTrig Breakup - Penultimate? (#1973)
oleibman Apr 2, 2021
a2bb825
Extract Normal and Standard Normal Distributions from the Statistical…
Apr 2, 2021
a189d93
Introduce PHPStan
PowerKiKi Mar 28, 2021
dd74dd7
Let's start with some appeasements to phpstan, just to reduce the bas…
Apr 3, 2021
6446039
PHPStan stuff (#1984)
Apr 3, 2021
42761f9
Financial start refactoring cash flow functions (#1986)
Apr 4, 2021
d023528
PHPStan Level 2
PowerKiKi Apr 3, 2021
36c3b5f
Drop obsolete code
PowerKiKi Apr 5, 2021
59de56b
Move original file to temporary file
ccrims0n Apr 5, 2021
5e96f42
Merge remote-tracking branch 'master' into fix_excel_overwrite
ccrims0n Apr 5, 2021
95b8c4d
Continue MathTrig Breakup - Completion! (#1985)
oleibman Apr 5, 2021
dd9cb25
Unlink temporary file
ccrims0n Apr 5, 2021
93d858a
Merge branch 'master' into fix_excel_overwrite
ccrims0n Apr 6, 2021
063496d
Merge pull request #1922 from ccrims0n/fix_excel_overwrite
oleibman Apr 6, 2021
bf07b14
Merge branch 'master' of github.com:PHPOffice/PhpSpreadsheet into dev…
jmourell Apr 6, 2021
4fcf8a7
Change pName to regexp sheet name match
jmourell Apr 6, 2021
b246aa3
Fix potential nullable error
jmourell Apr 6, 2021
c5dd914
Remove code coverage upload from test file
jmourell Apr 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
/.github export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.sami.php export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/CHANGELOG.PHPExcel.md export-ignore
/bin export-ignore
/composer.lock export-ignore
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: GithHub Pages
on:
push:
tags:
- '*'

jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none # remove xdebug

- name: Build API documentation
run: |
curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0-rc/phpDocumentor.phar
php phpDocumentor.phar --directory src/ --target docs/api

- name: Deploy to GithHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/api
180 changes: 180 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
name: main
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
experimental:
- false
php-version:
- '7.2'
- '7.3'
- '7.4'
- '8.0'

include:
- php-version: '8.1'
experimental: true

name: PHP ${{ matrix.php-version }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Delete composer lock file
id: composer-lock
if: ${{ matrix.php-version == '8.1' }}
run: |
rm composer.lock
echo "::set-output name=flags::--ignore-platform-reqs"

- name: Install dependencies
run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ steps.composer-lock.outputs.flags }}

- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: "Run PHPUnit tests (Experimental: ${{ matrix.experimental }})"
env:
FAILURE_ACTION: "${{ matrix.experimental == true }}"
run: vendor/bin/phpunit --verbose || $FAILURE_ACTION

php-cs-fixer:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
coverage: none
tools: cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Code style with PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer fix --format=checkstyle | cs2pr

phpcs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
coverage: none
tools: cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Code style with PHP_CodeSniffer
run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr

phpstan:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
coverage: none
tools: cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Static analysis with PHPStan
run: ./vendor/bin/phpstan analyse



release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }} # Otherwise our annotated tag is not fetched and we cannot get correct version

# Create release
- name: Get release info
id: release-info
run: |
echo "::set-output name=subject::$(git tag --format '%(contents:subject)' --points-at)"
git tag --format '%(contents:body)' --points-at > release-body.txt
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.release-info.outputs.subject }}
body_path: release-body.txt
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
*.project
/.settings
/.idea

## mkdocs output
/site
2 changes: 1 addition & 1 deletion .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ return PhpCsFixer\Config::create()
'php_unit_test_annotation' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'php_unit_test_class_requires_covers' => false, // We don't care as much as we should about coverage
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_add_missing_param_annotation' => false, // Don't add things that bring no value
'phpdoc_align' => false, // Waste of time
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
Expand Down
22 changes: 22 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">

<file>samples</file>
<file>src</file>
<file>tests</file>

<exclude-pattern>samples/Header.php</exclude-pattern>
<exclude-pattern>*/tests/Core/*/*Test\.(inc|css|js)$</exclude-pattern>

<arg name="report-width" value="200"/>
<arg name="parallel" value="80"/>
<arg name="cache" value="/tmp/.phpspreadsheet.phpcs-cache"/>
<arg name="colors"/>
<arg value="np"/>

<!-- Include the whole PSR12 standard -->
<rule ref="PSR12">
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build:

tools:
external_code_coverage:
timeout: 3600
timeout: 600

build_failure_conditions:
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed
Expand Down
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

Loading