silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
722 stars 821 forks source link

Framework 3.7 - Invalid table name in php 7.4 #9961

Closed emteknetnz closed 3 years ago

emteknetnz commented 3 years ago

framework 3.7.x-dev PHP 7.4

The when initializing unit test DataObjectLazyLoadingTest will call SapphireTest::resetDBSchema() - there's a misnamed unit test only table name from another test DataObjectTest\NamespacedClass that attempts to get created

This failed "gracefully" in php 7.3 and below because array style access on non-arrays was allowed and simply resulted in null. This behaviour was removed in php 7.4 https://www.php.net/manual/en/migration74.incompatible.php and results in Trying to access array offset on value of type bool

This can be seen in travis here https://travis-ci.com/github/silverstripe/cwp-recipe-basic/jobs/510267889 Update: job was re-run after fix was merged and error is no longer visible

Related https://github.com/silverstripeltd/product-issues/issues/437

PRs

brynwhyman commented 3 years ago

Do you think this warrants another patch release of 3.7 @emteknetnz? I feel like it does and I can't think of what else we would wait for before doing this.

emteknetnz commented 3 years ago

If you want. Could possibly wait for something around resolving deprecated warnings, though it's only a patch release so really is no reason not to - you want me to do this now?

brynwhyman commented 3 years ago

you want me to do this now?

Yes please. If there's further changes that warrant another release, we can look at that then

emteknetnz commented 3 years ago

Cool, I tagged 3.7.7