Problem/Motivation
During deployment of updates on a production server, I just got a very strange diff when exporting the configuration after running drush deploy. I'm not sure though whether this is a problem of the config system, any Drupal dependency (Symfony, ...) or PHP itself. The PHP version on dev and prod are identical (8.3.37).
colorbox.settings.yml:
diff --git a/config/mysite/sync/colorbox.settings.yml b/config/mysite/sync/colorbox.settings.yml
index 713de88a8..dbe06574d 100644
--- a/config/mysite/sync/colorbox.settings.yml
+++ b/config/mysite/sync/colorbox.settings.yml
@@ -4,7 +4,7 @@ custom:
activate: 1
transition_type: elastic
transition_speed: 350
- opacity: 0.85
+ opacity: 0.84999999999999997779553950749686919152736663818359375
text_current: '{current} of {total}'
text_previous: '« Prev'
text_next: 'Next »
slick.optionset.custom.yml:
diff --git a/config/mysite/sync/slick.optionset.custom.yml b/config/mysite/sync/slick.optionset.custom.yml
index 144a52c8a..3ecee1aa4 100644
--- a/config/mysite/sync/slick.optionset.custom.yml
+++ b/config/mysite/sync/slick.optionset.custom.yml
@@ -54,7 +54,7 @@ options:
speed: 1000
swipe: true
swipeToSlide: false
- edgeFriction: 0.35
+ edgeFriction: 0.34999999999999997779553950749686919152736663818359375
touchMove: true
touchThreshold: 5
useCSS: true
As this affects configuration of at least two modules (colorbox and slick), it is most likely not related to them. Unfortunately, I was not able to reproduce it. Repeated exporting the config produces the same output. Correcting it in the YAML file, importing and then re-exporting exports it correctly.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3644050
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mvonfrie commentedUpdate: after changing configuration of another module (Layout Builder) and exporting the config, this happened again.
Comment #4
quietone commentedHi, for Drupal core should be targeted to the 'main' branch, our primary development branch. Changes are made on the main branch first, and are then back ported as needed according to the Core change policies. The version the problem was discovered on should be stated in the issue summary Problem/Motivation section. Thanks for your help.
Comment #5
hoxton commented@mvonfrie, you can check with php configuration for `precision` which if set to a high value will result in noisy float value.
A value of 53 started giving same results.
If `precision` value is around 14 in php configuration then it would be good to look into any implementation which is trying to change it.