Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
String as a class name is not allowed in PHP7.
Proposed resolution
Rename to something else, StringFieldHandler?
Possibly rename others as well. Very short meaningless class names like String, Text are considered bad practice and against coding standards.
Also, looks like we have no test for this code at the moment, our php7 tests are passing. Collect tests do cover this and currently fail in PHP 7.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#3 | fatal_error_cannot_use-2703003-2.patch | 14.33 KB | mbovan |
#2 | fatal_error_cannot_use-2703003-2.patch | 14.33 KB | mbovan |
Comments
Comment #2
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedI'm also getting some errors about String class - with (php5.6 and) php7 installed.
A starting patch.
Comment #3
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedReuploading.
Comment #4
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedCreated a followup #2704707: Test coverage for field handlers
Comment #5
CTaPByK CreditAttribution: CTaPByK at MD Systems GmbH commentedLooks ok.
Comment #7
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedCommitted.
Comment #8
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedAnother follow-up: #2704987: [META] Finish incomplete match field handlers