Allow defaultTableOptions to be configured#420
Allow defaultTableOptions to be configured#420guilhermeblanco merged 11 commits intodoctrine:masterfrom DHager:default_table_options
Conversation
|
I'm assuming that documentation for this option will involve a separate, future PR against the separate symfony-docs repo. So besides that, is there anything else I can do to help move this feature forward? |
|
@DHager Please add the documentation in the |
|
@stof OK, I added some samples to the documentation folder. I can't enumerate all the possible options because they are situation-dependent on some DBAL platform internals. Stylistically, |
|
@DHager we already have such a mechanism in the DoctrineExtension to rename keys to camelCase |
There was a problem hiding this comment.
you are missing the ->fixXmlConfig() on the parent node for the XML to work properly
|
@stof : The pluralization is now fixed, but what I meant is that I'm not sure if there's a worthwhile way to let the user specify |
|
@stof: I think this one is done. Personally, it removes the need for a lot of |
|
Are there any changes or checks I can do to help move this one along? |
|
the XML conventions are to use dash-separated words in keys, and the Yaml convention is to use snake_case. So yes, I would use such names in the config (we already have some logic in the DI extension converting to camelCase for Doctrine names; you just need to add it in the list) |
|
OK, so you're saying that the meta-configuration layer does not handle all three varieties, only the dash and underscore variety, and any conversion to camelCase must be done with some ad-hoc code, correct? Perhaps in Are you sure all this convention-juggling is necessary? To some extent this is not structured configuration for the bundle to consume, but a complex payload we just want to pass-through so that DBAL can consume and interpret. (There are also several documented sibling-keys which break the pattern, such as |
…table_options (or dashed, if XML) Add renaming step to the extension so that DBAL layer is still satisfied seeing defaultTableOptions
|
OK, I've added some code that--after loading configurations--renames/replaces them as camelCase. The rename has to occur in order to satisfy DBAL code in |
|
@stof : It ought to match the XML/YAML conventions now. Anything else? |
There was a problem hiding this comment.
we already have code doing this. See getConnectionOptions. Just add this option there
|
@stof : Fixed the conversion step to use the existing mechanism. Thanks, didn't see it there. |
|
@stof Is there anything else? |
|
Ping |
|
@stof: Ping |
|
@stof: Ping |
|
@stof : Weekly checkin. |
|
@stof Anything else I can do to make this merge-ready? Personally speaking, it should let me avoid putting across hundreds of |
Allow defaultTableOptions to be configured
Since its now possible (doctrine/DoctrineBundle#420) to set the default character set for all tables using DoctrineBundle it can be mentioned in the docs
Since its now possible (doctrine/DoctrineBundle#420) to set the default character set for all tables using DoctrineBundle it can be mentioned in the docs
Since its now possible (doctrine/DoctrineBundle#420) to set the default character set for all tables using DoctrineBundle it can be mentioned in the docs
Since its now possible (doctrine/DoctrineBundle#420) to set the default character set for all tables using DoctrineBundle it can be mentioned in the docs
This PR was merged into the 3.0 branch. Discussion ---------- Update Doctrine UTF8 docs Since its now possible (doctrine/DoctrineBundle#420) to set the default character set for all tables using DoctrineBundle it can be mentioned in the docs Commits ------- dcd1126 Update Doctrine UTF8 docs
Change configuration metadata to unlock the use of
defaultTableOptions, so that defaults can be passed to the schema-tool. In the case of MySQL, possible defaults include charset, collation, and engine.The array-data is taken up here and then applied by individual platforms.