-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added curl-options to configuration #251
Conversation
Some test failures: https://travis-ci.org/doctrine/DoctrinePHPCRBundle/jobs/107765874 also need to apply the styleci fixes... |
looks sane to me. can you please also create the accompagning doc PR on the doc repository? |
the test failure is assumptions about the default configuration that no longer are true. can you look into those please? |
@dbu fixed tests and style-ci. where can i find the docs repository? |
the documentation is in the symfony-cmf docs: https://github.com/symfony-cmf/symfony-cmf-docs/edit/master/bundles/phpcr_odm/configuration.rst please also use a |
if (array_key_exists('curl_options', $session['backend']) && count($session['backend']['curl_options'])) { | ||
$curlOptions = array(); | ||
foreach ($session['backend']['curl_options'] as $option => $value) { | ||
$curlOptions[constant('CURLOPT_'.$option)] = $value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is constant()
case insensitive or do people use to write the constant names in all caps? if the later, i wonder if we should not force them to write the CURLOPT_ part themselves as well, to make things more straightforward?
should we also allow numeric options here and only resolve if the option is a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be possible! it would also be possible to uppercase the $option
that should be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would prefer to have them write the full CURLOPT_XX thing and require it to be uppercase. the less variation and magic, the easier to understand.
and lets check is_int to allow people using php configuration to use the constants themselves.
@dbu i have fixed the config and opened a docs PR |
thx! can you please add a note to the CHANGELOG.md and squash the commits? btw, agree with the switch from HEREDOC to NOWDOC (man, needed some time to find those terms :-) ) |
@dbu finished |
Added curl-options to configuration
i released 1.3.2 with this change. |
Main PR: jackalope/jackalope-jackrabbit#130