Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21834

Settings override broken in configuration files

    Details

      Description

      when defining a file ezpublish_XX.yml that imports the ezpublish.yml settings, the override is not working. a new array entry is created, instead of overriding the previous value.

      example:
      define in ezpublish.yml the values:

      ezpublish:
          siteaccess:
              match:
                  Map\URI:
                      ezdemo_site: ezdemo_site
                      eng: eng
                      ezdemo_site_admin: ezdemo_site_admin
      

      now, define in ezpublish_dev.yml the values:

      imports:
          - { resource: ezpublish.yml }
       
      ezpublish:
       
          siteaccess:
              match:
                  Map\URI:
                      ezdemo_site: coredumped
      

      the behavior expected, the dev environment should show the "coredumped" siteaccess. instead, it still shows the "ezdemo_site" siteaccess.
      using a simple test command will show that the new value is not overriden, is added as a new entry with a key "[0]" and value "coredumped"

          protected function execute( InputInterface $input, OutputInterface $output )
          {
              $vardump =  $this->getContainer()->getParameter( 'ezpublish.siteaccess.match_config' );
              var_dump( $vardump );
       
          }
      
      

        Issue Links

          Activity

          Hide
          Joao Inacio (Inactive) added a comment -

          Additionally, even adding (not overriding an existing value) will result in a new element with a numeric key, such as:

          ["Map\Host"]=>
            array(5) {
              ["ezpublish.local"]=>
              string(11) "ezdemo_site"
              ["admin.ezpublish.local"]=>
              string(17) "ezdemo_site_admin"
              [0]=>
              string(17) "new_siteaccess"
            }

          Show
          Joao Inacio (Inactive) added a comment - Additionally, even adding (not overriding an existing value) will result in a new element with a numeric key, such as: ["Map\Host"]=> array(5) { ["ezpublish.local"]=> string(11) "ezdemo_site" ["admin.ezpublish.local"]=> string(17) "ezdemo_site_admin" [0]=> string(17) "new_siteaccess" }
          Show
          Joao Inacio (Inactive) added a comment - Suggested PR at : https://github.com/ezsystems/ezpublish-kernel/pull/576
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Suggested PR is OK (tested)

          Show
          Jérôme Vieilledent (Inactive) added a comment - Suggested PR is OK (tested)
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/531151b5825c43e68115138d31ecf56256c28cab
          Hide
          Joao Pingo (Inactive) added a comment -

          QA Approved

          Show
          Joao Pingo (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Bras (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 30 minutes
                4h 30m