-
Notifications
You must be signed in to change notification settings - Fork 196
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
Zend_Config_Yaml broken #20
Comments
Thanks I'll take a look |
Should be fixed |
Thanks for the quick turnaround! Seems to still be borked when dealing with multiple subkeys. Example: development:
maindb:
default: true
host: data.server.com.local
username: db_user
password: -
dbname: db_development
adapter: pdo_mysql
profiler:
enabled: true
class: Zend_Db_Profiler
otherdb:
default: true
host: data.server.com.local
username: db_user
password: -
dbname: other_development
adapter: pdo_mysql Will return only Zend_Config_Yaml {#21 ▼
#_skipExtends: false
#_yamlDecoder: array:2 [▶]
#_allowModifications: false
#_index: 0
#_count: 1
#_data: array:1 [▼
"maindb" => Zend_Config {#26 ▼
#_allowModifications: false
#_index: 0
#_count: 7
#_data: array:7 [▼
"default" => true
"host" => "data.server.com.local"
"username" => "db_user"
"password" => "-"
"dbname" => "db_development"
"adapter" => "pdo_mysql"
"profiler" => Zend_Config {#25 ▶}
]
#_skipNextIteration: null
#_loadedSection: null
#_extends: []
#_loadFileErrorStr: null
}
]
#_skipNextIteration: null
#_loadedSection: "development"
#_extends: []
#_loadFileErrorStr: null
} It ignores |
Figured it out. removing the reference for |
I'll sort it out on Monday, or make a pull request and I might see it and accept it before Monday |
Thanks for your help! |
3e9b26c#diff-9235a8f0d83484e2adcf78f7ebffe2caL292
This change broke
Zend_Config_Yaml
because the class was using the internal array pointer to handle the loop's search space witheach()
andprev()
. Since PHP7foreach
no longer respects the internal array pointer, so addingnext()
in the loop wouldn't help eitherI have attempted my best at solving this issue by using
array_slice()
to handle the loop's search space in https://gist.github.com/blinktag/b2757d9f20177237b21b0270436b6009It now correctly handles the following yaml:
However it duplicates maindb's sub-values in the root of the config object, and I haven't been able to figure this part out:
Perhaps someone with better recursion skills can take a look at this
The text was updated successfully, but these errors were encountered: