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
\Drupal\Core\Entity\Query\Sql\Tables::addField()
needlessly repeats some code in an if/else branch.
Proposed resolution
Move the repeated code out of the condition.
Remaining tasks
Review.
User interface changes
Nope.
API changes
Nope.
Data model changes
Nope.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2956411.patch | 3.05 KB | amateescu |
Comments
Comment #2
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedAnd a patch.
Comment #3
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedComment #4
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedI stared at this a while and tried to find functional differences.
The only thing I came across was:
$column
having a truthy value is now no longer guarded by$table_mapping->requiresDedicatedTableStorage($field_storage)
. It also has a value ofNULL
for the rest of the method instead of not being set at all.$column
is only used within blocks of code that is guarded by a truthy value of$field_storage
, so this slight shuffle around produces no functional change whatsoever.RTBC based on the before and after being equivalent, if anyone thinks this needs a review from someone familiar with the subsystem please set back to NR.
Comment #5
alexpottCommitted 44b9b25 and pushed to 8.6.x. Thanks!