Ticket #519 (assigned task)

Opened 19 months ago

Last modified 10 days ago

Change configuration system to support only XML

Reported by: david Owned by: david
Priority: highest Milestone: 1.0
Component: config Version:
Severity: normal Keywords:
Cc: Patch attached: no

Description

Reasons:

  1. XML rocks :)
  2. Nobody wrote a different parser so far anyway :p
  3. What we do (XIncludes, XSL etc) isn't possible with ini, yaml etc anyway
  4. We can move the parent handling stuff into the parser
  5. Config handlers can use namespaces (e.g. RDF in module.xml)

We add an additional method or something and keep the value holders so existing handlers don't break. But the core ones will use DOMDocuments instead of ConfigValueHolders?

Attachments

Change History

Changed 19 months ago by david

  • status changed from new to assigned
  • milestone changed from 1.0 to 0.11

Changed 19 months ago by david

(In [1920]) initial support for native xml config handlers. config validation much more flexible now, added internal support for xml schema, relaxng and (dummy) schematron. all the old stuff still works and always will (or, well, at least until 1.1 or so). more to come. refs #519

Changed 19 months ago by david

(In [1923]) more work on native XML config handlers, refs #519

Changed 19 months ago by david

(In [1926]) fixed undef var errors, added code for removal of xml:base attributes again, refs #519

Changed 18 months ago by david

  • milestone changed from 0.11 to 1.0

experimental support implemented in 0.11 as of r1949/r1950

Changed 14 months ago by david

More ideas:

  • we extend DOMElement, DOMNode and so on, so they have the "normal" access methods of the current node classes for supporting singular/plural etc
  • orderConfigurations also handles the merging
  • merging rules are set up using XPath expressions - that way, they can be per node! certainly tricky to do, but if we can implement it that way, overwriting certain configuration values is going to be a piece of cake
  • still should think about some kind of secondary validation that is applied to the then cleaned up config files - so that the <databases> block in my <configuration environment="development-david"> section does not need to have a "default" attribute etc

Changed 12 months ago by david

More ideas:

  • multi-stage validation (i.e. one validation run for the original file, and one for the merged version) could be done using namespaces - after the ordering/merging is done, the xmlns on the doc is changed, and validation is run again (w/ different rules for that ns)
  • need to remember not to use transformToDoc() for the native XSL, or pay some sort of attention, as there might be XSLs that transform directly to PHP source

Changed 11 months ago by david

  • priority changed from normal to highest

Changed 9 months ago by david

  • has_patch unset

more ideas:

  • agavi:id attribute that can be used to mark things for replacing instead of merging between <configuration> blocks (similar to xml:id, except that there can be more than one occurence until the document is finally reduced
  • xsd:type support on any element to force a type cast (or at least on parameters). could be done in the parser already. heh :)

Changed 7 months ago by david

(In [2457]) branching off trunk for work on making the configuration subsystem XML-only, refs #519

Changed 7 months ago by david

(In [2468]) initial work on native xml configuration system, refs #519

Changed 5 months ago by david

Closed #709 as a dupe of #710... or this one? :>

Changed 5 months ago by david

(In [2581]) Now setting "matched" attribute flags on appropriate <configuration> elements. And some cleanup. Refs #519, #710

Changed 4 months ago by impl

(In [2631]) branches/david-xml_only_config_system (refs #519): Refactor libxml error reporting to throw DOMExceptions in the XML config; add AgaviXmlConfigXsltProcessor?

Changed 4 months ago by impl

(In [2632]) branches/david-xml_only_config_system (refs #519): Add new namespaces for 1.0; introduce RelaxNG validation for factories.xml; implement parts of AgaviXmlConfig?(DomElement?|DomDocument?); implement the factories XML config handler; bugfixes

Changed 4 months ago by impl

(In [2633]) branches/david-xml_only_config_system (refs #519): move test AgaviXmlFactoryConfigHandler? to AgaviFactoryConfigHandler?

Changed 4 months ago by impl

(In [2634]) branches/david-xml_only_config_system (refs #519): Introduce core.skip_config_transformations directive to allow users to skip XSL transformations if they do not have the XSL extension enabled

Changed 4 months ago by impl

(In [2635]) branches/david-xml_only_config_system (refs #519): Fix ConfigHandlersConfigHandlerTest? to use the right array key

Changed 4 months ago by impl

(In [2640]) branches/david-xml_only_config_system (refs #519): fix AgaviXmlConfigDomElement::getAgaviParameters() and add documentation

Changed 4 months ago by impl

(In [2641]) branches/david-xml_only_config_system (refs #519): introduce annotation namespace for internal matched attribute; refactoring

Changed 4 months ago by impl

(In [2642]) branches/david-xml_only_config_system (refs #519): Refactor AgaviXmlConfigParser? to follow new execution flow (see http://trac.agavi.org/wiki/Cleanup/Configuration/1.0#Processflow); implement AgaviConfigHandlersConfigHandler? as an XML configuration handler; bugfixes

Changed 4 months ago by impl

(In [2643]) branches/david-xml_only_config_system (refs #519): Update unit tests

Changed 4 months ago by impl

(In [2644]) branches/david-xml_only_config_system (refs #519): rename (before|after)-transformations to transformations_(before|after)

Changed 3 months ago by david

(In [2648]) merging in branches/david-xml_only_config_system, kudos to impl for helping so much with this one :> please test it thoroughly; more work on migration of other config handlers will be done over the next couple of weeks. refs #519, #462, #710, #515

Changed 3 months ago by david

(In [2680]) added new xml config namespaces where appropriate, some cleanup, too, for templates, sample app, defaults. refs #519

Changed 3 months ago by david

(In [2681]) forgotten in [2680], refs #519

Changed 3 months ago by david

(In [2682]) another typo forgotten in [2680] and [2681], refs #519

Changed 3 months ago by felix

(In [2700]) Merged revisions 2679-2684,2686,2694 via svnmerge from http://svn.agavi.org/branches/1.0

........

r2679 | david | 2008-08-19 18:37:43 +0200 (Tue, 19 Aug 2008) | 1 line

Allow skipping of template auto-assigns, closes #605

........

r2680 | david | 2008-08-19 18:46:30 +0200 (Tue, 19 Aug 2008) | 1 line

added new xml config namespaces where appropriate, some cleanup, too, for templates, sample app, defaults. refs #519

........

r2681 | david | 2008-08-19 18:47:24 +0200 (Tue, 19 Aug 2008) | 1 line

forgotten in [2680], refs #519

........

r2682 | david | 2008-08-19 18:48:44 +0200 (Tue, 19 Aug 2008) | 1 line

another typo forgotten in [2680] and [2681], refs #519

........

r2683 | david | 2008-08-19 18:58:44 +0200 (Tue, 19 Aug 2008) | 1 line

Close #815

........

r2684 | david | 2008-08-20 11:34:06 +0200 (Wed, 20 Aug 2008) | 1 line

Some refactorings related to [2679], refs #605

........

r2686 | david | 2008-08-20 13:11:40 +0200 (Wed, 20 Aug 2008) | 1 line

merge [2663:2685/branches/0.11]

........

r2694 | felix | 2008-08-22 14:29:37 +0200 (Fri, 22 Aug 2008) | 1 line

removes the phpunit external, not working and currently unnessesary, fixes #822

........

Changed 6 weeks ago by david

(In [3002]) Added getAttributes() and getAttributesNS() and cleaned up a bit (comments), refs #519

Changed 6 weeks ago by felix

(In [3007]) Merged revisions 3001-3002,3005 via svnmerge from http://svn.agavi.org/branches/1.0

........

r3001 | david | 2008-10-08 20:28:51 +0200 (Wed, 08 Oct 2008) | 1 line

Changed singular/plural handling in AgaviXmlConfigDomElement? convenience methods, closes #878

........

r3002 | david | 2008-10-08 21:58:55 +0200 (Wed, 08 Oct 2008) | 1 line

Added getAttributes() and getAttributesNS() and cleaned up a bit (comments), refs #519

........

r3005 | felix | 2008-10-10 17:50:38 +0200 (Fri, 10 Oct 2008) | 3 lines

merges r3004 from http://svn.agavi.org/branches/dominik-validation-argument-sources fixes a minor typo in AgaviValidationManager::setError() and AgaviValidationManager::setError() that produced an error about a non declared variable and swallowed errors

........

Changed 5 weeks ago by david

(In [3041]) Ported AgaviValidatorConfigHandler? to XML config system, refs #519

Changed 5 weeks ago by felix

(In [3045]) Merged revisions 3041-3044 via svnmerge from http://svn.agavi.org/branches/1.0

........

r3041 | david | 2008-10-16 19:50:17 +0200 (Thu, 16 Oct 2008) | 1 line

Ported AgaviValidatorConfigHandler? to XML config system, refs #519

........

r3042 | david | 2008-10-16 19:57:33 +0200 (Thu, 16 Oct 2008) | 1 line

Changelog update, closes #785

........

r3043 | david | 2008-10-16 19:59:20 +0200 (Thu, 16 Oct 2008) | 1 line

Another changelog entry, closes #786

........

r3044 | david | 2008-10-16 20:02:16 +0200 (Thu, 16 Oct 2008) | 1 line

release notes, refs #785

........

Changed 5 weeks ago by david

(In [3048]) moved flagging of matching <configuration> blocks so it is performed before single-config transforms, but after pre-transform validations (mainly a BC thing), refs #519

Changed 5 weeks ago by david

(In [3050]) migrated sample app validation configs to 1.0 format, kind of forgot that in [3041], refs #519 and kind of refs #882

Changed 5 weeks ago by david

(In [3051]) changed module config handler not to enforce a module.lala. prefix for all <settings> and refactored it a bit to deal with multiple <settings> blocks more elegantly, refs #519

Changed 5 weeks ago by david

(In [3052]) some .rng cleanup; mostly removed <interleave>s that allowed mixing of singular and plural tags on the same level, hope I got them all. refs #519

Changed 5 weeks ago by felix

(In [3058]) Merged revisions 3046,3048,3050-3057 via svnmerge from http://svn.agavi.org/branches/1.0

........

r3046 | david | 2008-10-17 18:41:53 +0200 (Fri, 17 Oct 2008) | 1 line

beta4 version info in preparation for release

........

r3048 | david | 2008-10-18 20:59:29 +0200 (Sat, 18 Oct 2008) | 1 line

moved flagging of matching <configuration> blocks so it is performed before single-config transforms, but after pre-transform validations (mainly a BC thing), refs #519

........

r3050 | david | 2008-10-19 01:08:00 +0200 (Sun, 19 Oct 2008) | 1 line

migrated sample app validation configs to 1.0 format, kind of forgot that in [3041], refs #519 and kind of refs #882

........

r3051 | david | 2008-10-19 01:23:27 +0200 (Sun, 19 Oct 2008) | 1 line

changed module config handler not to enforce a module.lala. prefix for all <settings> and refactored it a bit to deal with multiple <settings> blocks more elegantly, refs #519

........

r3052 | david | 2008-10-19 01:24:24 +0200 (Sun, 19 Oct 2008) | 1 line

some .rng cleanup; mostly removed <interleave>s that allowed mixing of singular and plural tags on the same level, hope I got them all. refs #519

........

r3053 | impl | 2008-10-19 08:54:43 +0200 (Sun, 19 Oct 2008) | 1 line

refs #875: Clean up the Phing components of the project configuration system

........

r3054 | impl | 2008-10-19 09:03:30 +0200 (Sun, 19 Oct 2008) | 1 line

Fix #884: Project configuration system depends on Phing >= 2.3.0, but should depend on >= 2.3.1

........

r3055 | david | 2008-10-19 09:52:55 +0200 (Sun, 19 Oct 2008) | 1 line

merged [3022:3054/branches/0.11] (really just ported [3049], refs #881)

........

r3056 | david | 2008-10-19 14:38:39 +0200 (Sun, 19 Oct 2008) | 1 line

added explicit phing version check to command line script, refs #884

........

r3057 | david | 2008-10-19 15:24:35 +0200 (Sun, 19 Oct 2008) | 1 line

refs #885: Build system output is unreadable in Terminal.app on Mac OS X Leopard

........

Changed 5 weeks ago by david

(In [3060]) release notes about necessity for referencing src/config/defaults/validators.xml in v1.0 validation XMLs, refs #882 and #519

Changed 4 weeks ago by felix

(In [3073]) Merged revisions 3059-3060,3062,3068-3071 via svnmerge from http://svn.agavi.org/branches/1.0

........

r3059 | david | 2008-10-19 15:43:02 +0200 (Sun, 19 Oct 2008) | 1 line

Added support for new validation configs to build system and introduced best practices, refs #882

........

r3060 | david | 2008-10-19 16:12:28 +0200 (Sun, 19 Oct 2008) | 1 line

release notes about necessity for referencing src/config/defaults/validators.xml in v1.0 validation XMLs, refs #882 and #519

........

r3062 | david | 2008-10-19 17:34:44 +0200 (Sun, 19 Oct 2008) | 1 line

dev version info

........

r3068 | david | 2008-10-20 02:06:40 +0200 (Mon, 20 Oct 2008) | 1 line

merged and ported [3055:3067/branches/0.11]

........

r3069 | david | 2008-10-20 02:11:02 +0200 (Mon, 20 Oct 2008) | 1 line

fixed #888: Validator config handler might produce undefined variable notices and subsequent errors with nested validators

........

r3070 | impl | 2008-10-20 08:07:25 +0200 (Mon, 20 Oct 2008) | 1 line

Fix #876: Allow for a fallback directory for template resolution in the project configuration system

........

r3071 | impl | 2008-10-20 08:08:55 +0200 (Mon, 20 Oct 2008) | 1 line

branches/1.0: Project configuration system: Whitespace fixes

........

Changed 4 weeks ago by impl

(In [3138]) Update naming for RNG datatypes, refs #519, #462

Changed 4 weeks ago by impl

(In [3139]) Fix minor issues in XSL transformations, refs #519, #462

Changed 4 weeks ago by impl

(In [3140]) Convert autoload.xml to 1.0 configuration format, refs #519, #462

Changed 4 weeks ago by felix

(In [3148]) Merged revisions 3138-3140,3145 via svnmerge from http://svn.agavi.org/branches/1.0

........

r3138 | impl | 2008-10-24 14:17:35 +0200 (Fri, 24 Oct 2008) | 1 line

Update naming for RNG datatypes, refs #519, #462

........

r3139 | impl | 2008-10-24 14:19:03 +0200 (Fri, 24 Oct 2008) | 1 line

Fix minor issues in XSL transformations, refs #519, #462

........

r3140 | impl | 2008-10-24 14:21:38 +0200 (Fri, 24 Oct 2008) | 1 line

Convert autoload.xml to 1.0 configuration format, refs #519, #462

........

r3145 | impl | 2008-10-24 14:28:31 +0200 (Fri, 24 Oct 2008) | 1 line

Fix typo and update unit tests

........

Changed 4 weeks ago by david

(In [3172]) converted build templates and sample app autoload.xml files to 1.0 configuration format, forgotten in [3140], refs #519

Changed 4 weeks ago by impl

(In [3188]) Update databases.xml to use 1.0-style handlers, refs #519, #462

Changed 4 weeks ago by david

(In [3189]) ported sample and code tpl databases.xml files to new format, forgotten in [3188], refs #519

Changed 4 weeks ago by felix

(In [3191]) Merged revisions 3165-3166,3168,3171-3172,3187-3190 via svnmerge from http://svn.agavi.org/branches/1.0

........

r3165 | impl | 2008-10-24 22:57:54 +0200 (Fri, 24 Oct 2008) | 1 line

refs #894: Regression: XIncludes in sandbox-tags result in PHP segfaults

........

r3166 | david | 2008-10-24 23:03:29 +0200 (Fri, 24 Oct 2008) | 1 line

fixed changelog entry, my bad, refs #894

........

r3168 | impl | 2008-10-24 23:53:56 +0200 (Fri, 24 Oct 2008) | 1 line

refs #895: Regression: xml:base attributes left behind by XIncludes cause config validations to fail; fix comment formatting LOL DONGS

........

r3171 | david | 2008-10-25 14:31:36 +0200 (Sat, 25 Oct 2008) | 1 line

merge [3125:3170/branches/0.11]

........

r3172 | david | 2008-10-25 14:44:04 +0200 (Sat, 25 Oct 2008) | 1 line

converted build templates and sample app autoload.xml files to 1.0 configuration format, forgotten in [3140], refs #519

........

r3187 | impl | 2008-10-25 23:47:00 +0200 (Sat, 25 Oct 2008) | 1 line

If the templates directory is the Agavi templates directory when the project configuration system creates a new project, then use a variable reference to it instead of a hardcoded path (thanks Felix, Dominik)

........

r3188 | impl | 2008-10-26 01:29:06 +0200 (Sun, 26 Oct 2008) | 1 line

Update databases.xml to use 1.0-style handlers, refs #519, #462

........

r3189 | david | 2008-10-26 12:30:05 +0100 (Sun, 26 Oct 2008) | 1 line

ported sample and code tpl databases.xml files to new format, forgotten in [3188], refs #519

........

r3190 | felix | 2008-10-26 12:51:09 +0100 (Sun, 26 Oct 2008) | 3 lines

disabling modules works again and displays the disabled page instead of throwing an exception

........

Changed 4 weeks ago by felix

(In [3223]) Merged revisions 3124-3125,3138-3140,3145,3149,3151-3152,3165-3166,3168,3171-3172,3187-3190,3194,3200,3202,3205,3207,3213,3218 via svnmerge from http://svn.agavi.org/branches/1.0

........

r3124 | david | 2008-10-23 18:53:43 +0200 (Thu, 23 Oct 2008) | 1 line

-dev version info

........

r3125 | david | 2008-10-23 18:54:44 +0200 (Thu, 23 Oct 2008) | 1 line

merge [3092:3124/branches/0.11]

........

r3138 | impl | 2008-10-24 14:17:35 +0200 (Fri, 24 Oct 2008) | 1 line

Update naming for RNG datatypes, refs #519, #462

........

r3139 | impl | 2008-10-24 14:19:03 +0200 (Fri, 24 Oct 2008) | 1 line

Fix minor issues in XSL transformations, refs #519, #462

........

r3140 | impl | 2008-10-24 14:21:38 +0200 (Fri, 24 Oct 2008) | 1 line

Convert autoload.xml to 1.0 configuration format, refs #519, #462

........

r3145 | impl | 2008-10-24 14:28:31 +0200 (Fri, 24 Oct 2008) | 1 line

Fix typo and update unit tests

........

r3149 | impl | 2008-10-24 16:22:00 +0200 (Fri, 24 Oct 2008) | 1 line

Fix #891: Build system output is unreadable in Windows PowerShell?

........

r3151 | impl | 2008-10-24 16:24:24 +0200 (Fri, 24 Oct 2008) | 1 line

Remove stupid message that makes output ugly

........

r3152 | impl | 2008-10-24 17:10:41 +0200 (Fri, 24 Oct 2008) | 1 line

Support commas as well as spaces in project configuration system input lists

........

r3165 | impl | 2008-10-24 22:57:54 +0200 (Fri, 24 Oct 2008) | 1 line

Fix #894: Regression: XIncludes in sandbox-tags result in PHP segfaults

........

r3166 | david | 2008-10-24 23:03:29 +0200 (Fri, 24 Oct 2008) | 1 line

fixed changelog entry, my bad, refs #894

........

r3168 | impl | 2008-10-24 23:53:56 +0200 (Fri, 24 Oct 2008) | 1 line

Fix #895: Regression: xml:base attributes left behind by XIncludes cause config validations to fail; fix comment formatting LOL DONGS

........

r3171 | david | 2008-10-25 14:31:36 +0200 (Sat, 25 Oct 2008) | 1 line

merge [3125:3170/branches/0.11]

........

r3172 | david | 2008-10-25 14:44:04 +0200 (Sat, 25 Oct 2008) | 1 line

converted build templates and sample app autoload.xml files to 1.0 configuration format, forgotten in [3140], refs #519

........

r3187 | impl | 2008-10-25 23:47:00 +0200 (Sat, 25 Oct 2008) | 1 line

If the templates directory is the Agavi templates directory when the project configuration system creates a new project, then use a variable reference to it instead of a hardcoded path (thanks Felix, Dominik)

........

r3188 | impl | 2008-10-26 01:29:06 +0200 (Sun, 26 Oct 2008) | 1 line

Update databases.xml to use 1.0-style handlers, refs #519, #462

........

r3189 | david | 2008-10-26 12:30:05 +0100 (Sun, 26 Oct 2008) | 1 line

ported sample and code tpl databases.xml files to new format, forgotten in [3188], refs #519

........

r3190 | felix | 2008-10-26 12:51:09 +0100 (Sun, 26 Oct 2008) | 3 lines

disabling modules works again and displays the disabled page instead of throwing an exception

........

r3194 | felix | 2008-10-26 14:53:47 +0100 (Sun, 26 Oct 2008) | 8 lines

Merges the changes from branches/felix-testing-implementation, r3091 - r3192

  • adds the infrastructure for testing the framework itself
  • adds the first couple of TestCases?, mainly for the Routing

refs #380, #308

........

r3200 | impl | 2008-10-26 18:56:21 +0100 (Sun, 26 Oct 2008) | 1 line

Update routing.xml config handler to 1.0 format

........

r3202 | impl | 2008-10-26 19:06:38 +0100 (Sun, 26 Oct 2008) | 1 line

Fix hasChildren -> has checks in AgaviRoutingConfigHandler?

........

r3205 | felix | 2008-10-26 19:23:05 +0100 (Sun, 26 Oct 2008) | 9 lines

Merge from branches/felix-testing-implementation/ r3194 - r3204

  • More Tests for the routing
  • checks #444, #609
  • checks generation of the shortest possible url - this feature is currently broken

........

r3207 | impl | 2008-10-26 19:33:20 +0100 (Sun, 26 Oct 2008) | 1 line

Update routing.xml template and sample app

........

r3213 | david | 2008-10-26 20:46:57 +0100 (Sun, 26 Oct 2008) | 1 line

date fix

........

r3218 | felix | 2008-10-26 21:16:28 +0100 (Sun, 26 Oct 2008) | 3 lines

Merge from branches/felix-testing-implementation/ r3204 - r3216

........

Changed 2 weeks ago by david

(In [3263]) a bit more info for the exception thrown in case ext/xsl is not available, refs #519

Changed 10 days ago by david

(In [3308]) ported compile.xml, *_filters.xml and translation.xml config handlers to new infrastructure, refs #519

Add/Change #519 (Change configuration system to support only XML)

Author



Action
as assigned
 
Note: See TracTickets for help on using tickets.