- 🇬🇧United Kingdom joachim
I'm working on something for this at the moment.
- 🇮🇳India SHIJU JOHN
@joyachim, Is it possible to support D10 in 3.x version? We have more than 200 websites using this hook in D9 and can you please guide me the best way to migrate this to D10?
function computed_field_field_asset_type_compute($entity_type_manager, $entity, $fields, $delta) { $width = $entity->field_dimension->width; $height = $entity->field_dimension->height; $is_transparent = $entity->field_is_transparent->value; if (strtolower($is_transparent) == 'yes') { $asset_type = 'transparent'; } elseif ($width > 1600 && $height > 1200) { $asset_type = 'high_dimension'; } else { $asset_type = 'regular'; } return $asset_type; }
- 🇬🇧United Kingdom joachim
I'm not planning on doing any work on 3.x, however if people want to post patches and they get reviewed, I can commit them. Better yet, someone could volunteer to maintain the 3.x branch.
I really do recommend moving to 4.x though - the same code you have in a hook can go in a plugin.
- 🇮🇳India ashetkar
There was no adequate strategy or rollback plan, the computed_string field was deleted from version 4.0. We used this field in more than 300 websites. I have attached Drupal 10 version 3.x dev patch. I checked with the rector and there are no deprecated functions.
- last update
over 1 year ago Composer require failure - 🇬🇧United Kingdom joachim
Thanks. Though could you make a separate issue for the D10 patch please, so we keep this as a roadmap discussion?
- 🇮🇳India SHIJU JOHN
@joachim, @ashetkar Thank you so much for the patch and 3.0.0-alpha3 version.
- 🇨🇦Canada colan Toronto 🇨🇦
Going to make this version stable to prevent folks from getting v2. For v4 status, see 📌 Version 4 roadmap Active .