Loading core/modules/breakpoint/src/BreakpointManager.php +2 −3 Changes for core/modules/breakpoint/src/BreakpointManager.php: 2 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -133,9 +133,8 @@ public function processDefinition(&$definition, $plugin_id) { if (!in_array('1x', $definition['multipliers'])) { $definition['multipliers'][] = '1x'; } // Ensure that multipliers are sorted numerically so 1x, 1.5x and 2x // come out in that order instead of 1.5x, 1x, 2x. sort($definition['multipliers'], SORT_NUMERIC); // Ensure that multipliers are sorted correctly. sort($definition['multipliers']); } /** Loading core/modules/responsive_image/responsive_image.post_update.php −14 Changes for core/modules/responsive_image/responsive_image.post_update.php: 0 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -5,10 +5,6 @@ * Post update functions for Responsive Image. */ use Drupal\Core\Config\Entity\ConfigEntityUpdater; use Drupal\responsive_image\ResponsiveImageConfigUpdater; use Drupal\responsive_image\ResponsiveImageStyleInterface; /** * Implements hook_removed_post_updates(). */ Loading @@ -17,13 +13,3 @@ function responsive_image_removed_post_updates() { 'responsive_image_post_update_recreate_dependencies' => '9.0.0', ]; } /** * Re-order mappings by breakpoint ID and descending numeric multiplier order. */ function responsive_image_post_update_order_multiplier_numerically(array &$sandbox = NULL): void { $responsive_image_config_updater = \Drupal::classResolver(ResponsiveImageConfigUpdater::class); \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'responsive_image_style', function (ResponsiveImageStyleInterface $responsive_image_style) use ($responsive_image_config_updater): bool { return $responsive_image_config_updater->orderMultipliersNumerically($responsive_image_style); }); } core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php −12 Changes for core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php: 0 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -3,9 +3,7 @@ namespace Drupal\responsive_image\Entity; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\image\Entity\ImageStyle; use Drupal\responsive_image\ResponsiveImageConfigUpdater; use Drupal\responsive_image\ResponsiveImageStyleInterface; /** Loading Loading @@ -112,16 +110,6 @@ public function __construct(array $values, $entity_type_id = 'responsive_image_s parent::__construct($values, $entity_type_id); } /** * {@inheritdoc} */ public function preSave(EntityStorageInterface $storage) { parent::preSave($storage); $config_updater = \Drupal::classResolver(ResponsiveImageConfigUpdater::class); assert($config_updater instanceof ResponsiveImageConfigUpdater); $config_updater->orderMultipliersNumerically($this); } /** * {@inheritdoc} */ Loading core/modules/responsive_image/src/ResponsiveImageConfigUpdater.php −47 File deleted. Show changes core/modules/responsive_image/tests/fixtures/update/responsive_image-order-multipliers-numerically.php −71 File deleted. Show changes Loading
core/modules/breakpoint/src/BreakpointManager.php +2 −3 Changes for core/modules/breakpoint/src/BreakpointManager.php: 2 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -133,9 +133,8 @@ public function processDefinition(&$definition, $plugin_id) { if (!in_array('1x', $definition['multipliers'])) { $definition['multipliers'][] = '1x'; } // Ensure that multipliers are sorted numerically so 1x, 1.5x and 2x // come out in that order instead of 1.5x, 1x, 2x. sort($definition['multipliers'], SORT_NUMERIC); // Ensure that multipliers are sorted correctly. sort($definition['multipliers']); } /** Loading
core/modules/responsive_image/responsive_image.post_update.php −14 Changes for core/modules/responsive_image/responsive_image.post_update.php: 0 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -5,10 +5,6 @@ * Post update functions for Responsive Image. */ use Drupal\Core\Config\Entity\ConfigEntityUpdater; use Drupal\responsive_image\ResponsiveImageConfigUpdater; use Drupal\responsive_image\ResponsiveImageStyleInterface; /** * Implements hook_removed_post_updates(). */ Loading @@ -17,13 +13,3 @@ function responsive_image_removed_post_updates() { 'responsive_image_post_update_recreate_dependencies' => '9.0.0', ]; } /** * Re-order mappings by breakpoint ID and descending numeric multiplier order. */ function responsive_image_post_update_order_multiplier_numerically(array &$sandbox = NULL): void { $responsive_image_config_updater = \Drupal::classResolver(ResponsiveImageConfigUpdater::class); \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'responsive_image_style', function (ResponsiveImageStyleInterface $responsive_image_style) use ($responsive_image_config_updater): bool { return $responsive_image_config_updater->orderMultipliersNumerically($responsive_image_style); }); }
core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php −12 Changes for core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php: 0 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -3,9 +3,7 @@ namespace Drupal\responsive_image\Entity; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\image\Entity\ImageStyle; use Drupal\responsive_image\ResponsiveImageConfigUpdater; use Drupal\responsive_image\ResponsiveImageStyleInterface; /** Loading Loading @@ -112,16 +110,6 @@ public function __construct(array $values, $entity_type_id = 'responsive_image_s parent::__construct($values, $entity_type_id); } /** * {@inheritdoc} */ public function preSave(EntityStorageInterface $storage) { parent::preSave($storage); $config_updater = \Drupal::classResolver(ResponsiveImageConfigUpdater::class); assert($config_updater instanceof ResponsiveImageConfigUpdater); $config_updater->orderMultipliersNumerically($this); } /** * {@inheritdoc} */ Loading
core/modules/responsive_image/tests/fixtures/update/responsive_image-order-multipliers-numerically.php −71 File deleted. Show changes