Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Jan 2014 at 00:24 UTC
Updated:
29 Jul 2014 at 23:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
vijaycs85Initial patch with test-only-fail patch...
Comment #3
vijaycs85It is a bug and blocking a beta blocker - #2167623: Add test for all default configuration to ensure schema exists and is correct, So major.
Comment #4
vijaycs85Addressing #2167623-44: Add test for all default configuration to ensure schema exists and is correct.1 here...
Comment #5
alexpottThe test currently works because an exception is being thrown by Symfony's YAMP dumper
\Symfony\Component\Yaml\Exception\DumpException. I think it is an improvement to move the error up to the Config class and make it independent of the Config storage layer.But I think we need to ensure that the exception thrown is consistent. So we have to decide how to do this. Config data is set through two methods - we could throw an exception in the
set()method if the value is an unsupported data type. But we have an issue with setData(). The current patch won't throw this exception for config that does not have schema.So I think we need to add a catch in
FileStorage::encode()for the DumpException and rethrow aUnsupportedConfigDataTypeException. Actually looking at the name of the exception I think iUnsupportedDataTypeConfigExceptionis better since this extendsConfigException. In order to test this we need to try saving to a config file that has no schema. The test should also assert that the config object has no schema just in case someone tries to implement one at a later date.Comment #6
damiankloip commented- Renames exception
- Catches DumpException in FileStorage::write (Not in encode, so we can provide the config name).
- Added a new test for this, that has no config schema.
- Minor other changes.
Comment #8
alexpottIt's going to be great to get helpful error messages from CMI +1
Comment #9
catchNice change, committed pushed to 8.x, thanks!