What's New in Teams Calling, Meetings and Devices March 2024
Death of variables revisited
1. CMI: Death of Variables revisited
Roni Kantis
Thursday, May 16, 13
2. Roni Kantis
drupal.org: bfr
@roni_kantis
Druid Oy
@druidfi
Drupal Meetup Finland
14.6.2013
Program:
Sauna, terva and kossu.
Generously sponsored by the association and
KW Digital.
druid.fi/meetup
Thursday, May 16, 13
3. Current state of configuration
• 95% of Drupal development is done through UI
• Scattered throughout the database
• Variable table
• Custom tables and entities
• No standard format
• No API
Thursday, May 16, 13
5. Features -module
" Features is not a reliable way to deploy configuration
changes.
It was never meant to be. "
- Tim Plunkett
Thursday, May 16, 13
6. Problems with variables
• No standardized way to move between environments
• Cumbersome to manage environment specific configuration
• Loaded on every request
Thursday, May 16, 13
7. So we killed it!
- No more variable_trololoo()
- No more Features?
Thursday, May 16, 13
10. Content vs configuration
• Can you give it a default value?
• Would it benefit significally from direct sql-queries?
• Is it environment specific?
Thursday, May 16, 13
11. How does it work?
• Object oriented approach:
• BEFORE: variable_set(‘my variable’, $data);
• NOW: $config->set(‘my variable’, $data)->save();
Thursday, May 16, 13
12. How does it work?
• Configuration locations:
• sites/default/files/config_{hash}/active
• sites/default/files/config_{hash}/staging
• Configuration files:
• manifest.image.styles.yml
• image.settings.yml
• image.style.medium.yml
Thursday, May 16, 13