Skip to content

Add `Gitlab::Utils::HashStruct` class

Bogdan Denkovych requested to merge add-struct_hash into master

What does this MR do and why?

In the scope of #344279, we've started actively to use ActiveSupport::InheritableOptions. See !75280 (comment 843625918).

Later, we noticed that ActiveSupport::InheritableOptions doesn't build an instance from a hash with stringified keys.

This MR adds Gitlab::Utils::StructHash to address this.

Related to !75280 (comment 847633646)

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Bogdan Denkovych

Merge request reports

Loading