-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Config::get changed return value #1068
Comments
It is mentioned — in the past Phalcon\Config did not support numeric properties and therefore arrays with numeric indices had to be treated as arrays and could not be converted to Phalcon\Config (see, for example, #696 for the discussion). Thus, if you had an array with numeric properties, you could not consistently use In #842 this has been fixed and arrays with numeric keys are converted to Phalcon\Config objects. But as far as I understand, you can use this both in 1.2.0 and 1.3.0: $config->get('test')[1]; or (in 1.3.0) $config->test->{1}; In other words, Phalcon\Config tries to mimic the plain array and in most cases you should not see any difference. |
Oh, I see now what "Phalcon\Config now support numeric properties as well" means. Thank you for the explanation. I think this should be stated in config.rst, because it's a little bit tricky and unobvious thing unless you track this repository issues. |
What is |
Could you please file a bug report here: https://github.com/phalcon/docs/issues |
Let's take a sample config:
In 1.2.0 it produces an array:
In 1.3.0 it produces an object:
This is inconsistent, and it's not stated in changelog.
The text was updated successfully, but these errors were encountered: