-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Discussion: Removal of concepts addQueryString
and argumentsToBeExcludedFromQueryString
in Neos
#5076
Comments
I would drop |
I think were talking slightly past each other.
That means its yes is separate from the routing - currently handled by Flows uri builder - but might still not be sensible to reimplement. The flow uribuilder code is obscured due to the nature of subrequests but its current implementation looks like this: https://github.com/neos/flow-development-collection/blob/32055e5c966579509a3ec06a3520b246696bcdc4/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php#L452: protected function mergeArgumentsWithRequestArguments(array $arguments)
{
// ... (sub-request stuff) ...
if ($this->request->isMainRequest() && $this->addQueryString === true) {
$requestArguments = $this->request->getArguments();
foreach ($this->argumentsToBeExcludedFromQueryString as $argumentToBeExcluded) {
unset($requestArguments[$argumentToBeExcluded]);
}
if ($requestArguments !== []) {
$arguments = Arrays::arrayMergeRecursiveOverrule($requestArguments, $arguments);
}
}
return $arguments;
} That means to archive the same feature without these little helpers, one could write this in Fusion: - root = Neos.Fusion:NodeUri {
- addQueryString = true
- argumentsToBeExcludedFromQueryString = ${['bar']}
- }
+ root = Neos.Fusion:NodeUri {
+ additionalParams = ${request.arguments.filter((value, key) => key != 'bar')}
+ } Alternatively with a proper introduction of As it seems to be easier than assumed to offer a b/c layer in Fusion, where we still have the action request at hand, i could reimplement it for 9.0 |
Right yeah the bool is meh it can go I guess |
Actually i could imagine implementing it like: $nodeUriBuilder->uriFor($nodeAddress, Options::create()->withAddedQueryString($actionRequest, excludedArguments: ['bar']); its just an odd api, but would work and re enable the usecase for the LinkingService, NodeUri in Fusion & Fluid for Neos 9.0 But with the expense of carrying this thing around another time - till Neos 10. I think the |
This should also be removed from the flow UriBuilder |
As part of improving our flow routing and uri building we discussed to also adjust our fusion prototypes and the Linking service accordingly.
It was originally planned to deprecate
addQueryString
andargumentsToBeExcludedFromQueryString
for Neos 9.0:The docs state:
public discussion so far
@mficzel said:
@kitsunet noted (Dresden sprint 23):
Which was answered by @mficzel
how to move forward?
We rediscussed this topic briefly again in the HH Sprint March and we came to the conclusion that as the features are artefacts of the past (typo3) they can be safely removed with Neos 9. They should not be part of a new uri builder api and thus are not fundamentally supported.
We could think of an anti corruption layer in front but i dont know if that is possible - it looks like some effort - and for that i have to understand how the conceptional outdated and obsolete features should work. At least we thought it would not be worth the effort as there are more dedicated replacement and patterns to solve the once thought usecase.
So We need to make a final decision in order to move forward with the overhaul of the new uri builder.
When we agree to remove the features we should also write a little upgrade note.
links
Neos.Fusion:ActionUri
and deprecate said properties: FEATURE: IntroduceroutingArguments
andqueryParameters
to Fusion link prototypes to eventually replacearguments
andadditionalParams
#3914The text was updated successfully, but these errors were encountered: