- Issue created by @Rajab Natshah
- Merge request !18Issue #3399618: Fix Type Error for the constructor for ConfigIgnoreConfig with Argument #1 ($mode) must be of type string, null given → (Closed) created by Rajab Natshah
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 4:48pm 6 November 2023 - 🇯🇴Jordan Rajab Natshah Jordan
Attaching a static patch file for the commit_id=dfeb5112d9fc35fbeab6f4f15c0f7d7899726690 in the issue fork
- Status changed to Needs work
about 1 year ago 5:24pm 6 November 2023 - 🇨🇭Switzerland bircher 🇨🇿
Thanks for the patch.
I am not going to set default arguments in the constructor. But we can make it more tolerant to the config not being correct.
- 🇯🇴Jordan Rajab Natshah Jordan
Thanks, Fabian, for the quick comment.
With you on that.At this time I'm having three scenarios
Scenario #1: An update/upgrade for sites to ( Drupal
Scenario #2: A new install with latest Drupal~10.1.0
+ Config Ignore~3.0
)
Only look for to have a smoother upgrade process~10.1.0
+ Config Ignore~3.0
But, with old config format ( in the template for project ) --
The template's default config must change to match with the ~3.0 versions ( Doing this change in our template ) Scenario #3: Update the template's default configs ( Doing this change in our template )( To switch to recipes in some point )
- 🇯🇴Jordan Rajab Natshah Jordan
Yes!
Maybe not in the constructor
only in fromConfig as fullback value.public static function fromConfig(Config $config): self { - return new self($config->get('mode'), $config->get('ignored_config_entities')); + return new self($config->get('mode') ?? 'simple', $config->get('ignored_config_entities') ?? []); }
Would you like it to be in this way?
- Status changed to Fixed
about 1 year ago 8:20pm 6 November 2023 - 🇨🇭Switzerland bircher 🇨🇿
yes that should be good. Also in the other places where we can not be sure about the config.
Automatically closed - issue fixed for 2 weeks with no activity.