[Yaml] dump customization option with dumper flags#17578
Conversation
xabbuh
commented
Jan 27, 2016
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | yes |
| Tests pass? | yes |
| Fixed tickets | #17520 |
| License | MIT |
| Doc PR | symfony/symfony-docs#6226 |
|
@xabbuh thanks for working on this nice feature! I have a proposal regarding the new constants. You propose to define the constants in use Symfony\Component\Yaml\Yaml;
use Symfony\Component\Yaml\Dumper;
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, Dumper::DUMP_OBJECT);I propose to define these constants in the main use Symfony\Component\Yaml\Yaml;
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, Yaml::DUMP_OBJECT);What do you think about this? |
|
👍 |
|
@javiereguiluz Your suggestion sounds reasonable to me as the |
|
Good suggestion |
There was a problem hiding this comment.
is bit correct or is integer better?
There was a problem hiding this comment.
Bit is right. Each future dumper option will get its own bit so that we can use PHP's bitwise operators to check if a particular dumper option was requested.
|
@javiereguiluz I moved the constant to the ping @symfony/deciders |
There was a problem hiding this comment.
Dumper::DUMP_OBJECT -> Yaml::DUMP_OBJECT
There was a problem hiding this comment.
@DavidBadura Thanks for catching all these silly mistakes.
There was a problem hiding this comment.
good catch, fixed everywhere
|
👍 |
…bbuh) This PR was merged into the 3.1-dev branch. Discussion ---------- [Yaml] dump customization option with dumper flags | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #17520 | License | MIT | Doc PR | TODO Commits ------- 286103b [Yaml] dump customization option with dumper flags
…ger (xabbuh) This PR was merged into the 3.1-dev branch. Discussion ---------- [TwigBridge] deprecate the boolean object support trigger | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This reflects the changes done in the Yaml component in #17578. Commits ------- 27243c6 deprecate the boolean object support trigger