Using Magento Cloud, the DI compile step keeps failing after upgrading from 2.3.3 to 2.3.5 via composer and pushing the changes up.
The error is the same every time I've tried, which is:
PHP Fatal error: Declaration of Magento\PageBuilder\Model\Dom\NodeList::item($index) : ?Magento\PageBuilder\Model\Dom\Adapter\ElementInterface must be compatible with Magento\PageBuilder\Model\Dom\Adapter\NodeListInterface::item(int $index): ?Magento\PageBuilder\Model\Dom\Adapter\ElementInterface in /app/vendor/magento/module-page-builder/Model/Dom/NodeList.php on line 19
The only difference in declaration seems to be the "int" type declared for the $index parameter in the adapter interface. But both of the referenced files seem to exist in the same composer package (magento/module-page-builder) so I am a bit confused about how to solve it.
The version of module-page-builder that composer installed is 1.3.1.