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
Since #2870194: Ensure that process-isolated tests can use Symfony's PHPunit bridge to catch usages of deprecated code, the following tests fail:
FileDownloadUrlTest
JsonApiDocumentTopLevelNormalizerTest
EntityToJsonApiTest
For example, for the latter:
Remaining deprecation notices (6)
BaseFieldDefinition::setQueryable() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\Field\BaseFieldDefinition::setCustomStorage(). See https://www.drupal.org/node/2856563: 5x
5x in EntityToJsonApiTest::testSerialize from Drupal\Tests\jsonapi\Kernel
That change was introduced by #2855886: Deprecate \Drupal\Core\Field\FieldStorageDefinitionInterface::isQueryable() because it's not used anywhere.
Proposed resolution
Change setQueryable(FALSE)
to setCustomStorage(TRUE)
.
Note that setCustomStorage()
is not newly introduced in 8.4.x, so ceasing to use the deprecated code will still allow JSON API to work with Drupal 8.3.
Test against 8.3 + 8.4 + 8.5.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2926409-3.patch | 592 bytes | Wim Leers |
Comments
Comment #2
Wim LeersComment #3
Wim LeersComment #4
Wim LeersThe failures in 8.5 no longer contain the
setQueryable()
failing deprecation.Comment #6
Wim Leers