The most obvious one that I've found so far is that uploading files using the @ trick is now deprecated in favor of CurlFile(), easy to fix. That is an E_DEPRECATED, which is missing in Simpletests error map, so it blows up because the group is empty.
See also #1867192: Testbots need to run on 5.4, 5.5, 5.6 and 7
For reference, this notice is thrown:
Deprecated: curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | php55-curl-file-upload-2054205-20.patch | 1.4 KB | pfrenssen |
| #20 | interdiff.txt | 873 bytes | pfrenssen |
| #18 | php55-curl-file-upload-2054205-18.patch | 1.39 KB | pfrenssen |
| #18 | interdiff.txt | 1.38 KB | pfrenssen |
| #9 | php55-curl-file-upload-2054205-9.patch | 1.05 KB | berdir |
Comments
Comment #1
berdirHere's a patch for that. Haven't found anything else yet that's broken except those that are broken on 5.4 too.
Comment #2
berdirOk, found something weird. NodeEntityFieldQueryAlterTest is a test without any test methods, that throws a fatal in the CLI runner and shows now results page in the UI.
Doesn't seem to be 5.5 specific?
Comment #3
Crell commentedI can't help but wonder why we're still using manual curl in Simpletest instead of Guzzle...
Comment #4
catch@Crell I don't think anyone is spending time trying to refactor SimpleTest at the moment.
Comment #5
chx commentedI have verified that the new constants are available since 5.3.0 so that's good. And http://php.net/curl_file_create looks good too.
Comment #6
berdirOpened #2056293: Remove empty test Drupal\node\Tests\NodeEntityFieldQueryAlterTest for the empty test class.
Comment #7
alexpottI've run the two File upload tests without and without this patch on 5.4 and 5.5 and can confirm we currently have fail on 5.5 in HEAD and that the patch resolves the issue.
The changes look good. Committed 7f02544 and pushed to 8.x. Thanks!
Comment #8
David_Rothstein commentedI think this affects Drupal 7 too, but not sure this qualifies as critical for Drupal 7... at least not yet.
Comment #9
berdirYes, makes sense.
Comment #10
pfrenssenExcellent, thanks, RTBC!
Comment #11
Crell commented#9: php55-curl-file-upload-2054205-9.patch queued for re-testing.
Comment #12
alexpottNo longer applies
Comment #13
berdir@alexpott, uh you confused me for a second ;) *You* don't apply to this issue :)
This is a 7.x backported, you already committed the 8.x patch a while ago :p
And, the patch still applies fine :)
Comment #14
klausiE_DEPRECATED and E_USER_DEPRECATED only exist since PHP 5.3, Drupal 7 should run on 5.2 as well. You could argue that we only make this change in the web test file, but I think a lot of users will still run their automated build tests on 5.2, too.
Or is there a policy that we abandoned 5.2 for D7 now?
Comment #15
pfrenssenIndeed Drupal 7 still officially supports PHP 5.2.5 and higher, even though PHP 5.3 is recommended. I suppose we can simply define those constants ourselves if they do not exist. They will never be thrown on PHP 5.2, but they will generate undefined constant notices.
I have looked into potential problems with bitwise operations with these constants and E_ALL which has different values on different PHP versions. Most of the times when this is used it is to subtract a value from E_ALL (eg
E_ALL & ~E_USER_DEPRECATED) and this will give correct results, even on PHP 5.2.Comment #16
berdirI think we can simply add those two to the array conditionally if they exist. We don't care if they exist or not, we only care that when they are thrown, the test doesn't explode.
Comment #17
pfrenssenMarked #2101235: DrupalTestCase::errorHandler() does not accept E_DEPRECATED or E_USER_DEPRECATED (introduced in PHP 5.3) as a duplicate of this issue.
Comment #18
pfrenssenAdded the constants conditionally. Also restored the comment from the D8 patch that was lost in the backport to D7.
Comment #19
klausiwhy 5.5.0? Also applies to any version higher than 5.5.0? Just use "5.5" as in the original patch or "5.5 or higher".
Otherwise looks ready.
Comment #20
pfrenssenFully agree!
Comment #21
chx commentedI bet you'd meant
!definedComment #22
klausiNo, the patch is correct. If the constant is defined we add them to our error map of known error codes, otherwise we are on PHP 5.2 and they don't exist anyway.
Comment #22.0
klausiIncluded the notice that is thrown to help people find this issue.
Comment #23
heine commentedActual notice on PHP 5.5 is "Notice: Undefined offset: 8192 in /var/www/webroot/modules/simpletest/drupal_web_test_case.php on line 545"
Adding for search.
Comment #24
Crell commented20: php55-curl-file-upload-2054205-20.patch queued for re-testing.
Comment #25
alexpott20: php55-curl-file-upload-2054205-20.patch queued for re-testing.
Comment #26
David_Rothstein commentedCommitted to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/001532a
Comment #27
David_Rothstein commented