Make builds reproducible

By committing composer.lock, we make sure that dependencies are locked to a given version.
This ensures that builds are reproducible and deterministic.

Also, fixes some phpstan issues, that appeared with the latest version of PHPStan.
This commit is contained in:
Adrien Loison 2022-05-26 15:36:37 +02:00
parent 0739e044da
commit ec8d53b13c
4 changed files with 4200 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,6 +4,5 @@
/tests/resources/generated
/tests/coverage
/vendor
/composer.lock
/.php-cs-fixer.cache
/.phpunit.result.cache

4196
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -117,6 +117,7 @@ class SheetIterator implements IteratorInterface
foreach ($tableStyleNodes as $tableStyleNode) {
$isSheetVisible = ($tableStyleNode->getAttribute(self::XML_ATTRIBUTE_TABLE_DISPLAY) !== 'false');
/** @var \DOMElement $parentStyleNode */
$parentStyleNode = $tableStyleNode->parentNode;
$styleName = $parentStyleNode->getAttribute(self::XML_ATTRIBUTE_STYLE_NAME);

View File

@ -362,7 +362,9 @@ class WriterWithStyleTest extends TestCase
$styleXfsElements = $this->getXmlSectionFromStylesXmlFile($fileName, 'cellXfs');
$this->assertEquals(2, $styleXfsElements->getAttribute('count'), '2 cell xfs present - a default one and a custom one');
$customFillId = $styleXfsElements->lastChild->getAttribute('fillId');
/** @var \DOMElement $lastChildElement */
$lastChildElement = $styleXfsElements->lastChild;
$customFillId = $lastChildElement->getAttribute('fillId');
$this->assertEquals(2, (int) $customFillId, 'The custom fill id should have the index 2');
}