-
Notifications
You must be signed in to change notification settings - Fork 206
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
EZP-23441: IO url decorators configuration #1028
EZP-23441: IO url decorators configuration #1028
Conversation
2404600
to
6a84199
Compare
Shouldn't spec be part of PR? Also seems phpspec is added but does not seem to be used. |
|
||
private function isDynamicSetting( $string ) | ||
{ | ||
return ( preg_match( "^\$[a-z0-9_\.]+(?:;[a-z0-9_\.]+){0,2}\$$", $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.
Why not using DynamicSettingParser
?
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.
This must be removed. I use ComplexSettingParser, that extends DynamicSettingParser.
+1, apart interfaces claims |
EZP-23328: Split IO handlers
e28ba76
to
151b7e1
Compare
Added a regexp if the first, lightweight test passes.
Identifies arguments/methods with a complex setting, a string with more than one dynamic setting, or one dynamic setting and anything else. Converts them into factories that dynamically replace the settings in the string with their value.
Complex parameter in the io.url_prefix ezpublish setting will be parsed and resolved to the real settings in each context it is set for.
Any complex setting must be added to scopes where one of its dependencies (dynamic variables it uses) is declared in this scope, so that it can get its own value written.
Will convert from public url, that use the default url decorator, to what legacy expects to store (note: it leaves the /, while legacy doesn't want it).
151b7e1
to
da4474c
Compare
XML parsing from imageStorage has been moved to the LegacyStorage image gateway, and the legacy url redecorator injected to this service. No manual stripping/adding / to uris manually.
2837410
to
ec7c583
Compare
@@ -0,0 +1,46 @@ | |||
# IO URL decoration | |||
|
|||
> Added in 5.4 |
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.
- 2014.09 ?
Also checks that delimiters count makes sense.
All current comments fixed, closing, and re-opening against master. |
Makes it possible to set the prefix for IO uris at siteaccess level. Other siteacces level variables can be used in the configuration.
Absolute prefixes to other hosts are also possible, and will work with legacy data (as long as the file is available from this uri).
Changes
Settings
Most of the changes are about the ConfigResolver:
$var_dir$/$storage_dir$
).Complex settings has been added as part of the CoreBundle. Dynamic settings in semantic config is only part of the IOBundle for now, as it is a bit rough around the edges (but should be possible to move it up to the CoreBundle with a bit of work).
url_decorator services
There are now two main url decorators: the default one, and a legacy one. The legacy one is used in the Legacy Converter, via an UrlRedecorator, to convert the system's uris to the format it requires.
Configuration example
TODO