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
[TASK] Refactor and and guard namespace extraction #451
[TASK] Refactor and and guard namespace extraction #451
Conversation
Pull Request Test Coverage Report for Build 1199
💛 - Coveralls |
src/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php
Outdated
Show resolved
Hide resolved
src/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php
Outdated
Show resolved
Hide resolved
Refactors the namespace validation from occurring in the TemplateProcessor, to occur instead when parsing the template. Behavior remains unchanged. Also guards several potentially empty matches of namespaces from being iterated over, causing fatal PHP errors.
4a20db8
to
0d6eb68
Compare
src/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php
Show resolved
Hide resolved
@mbrodala Could I have you do a quick re-review (reading is enough) and if OK, merge? I need to prepare a new release today if we want to solve (work around) the regular expression backtrack issues in CMS. |
Done that now. Given the complexity I'd wanted to at least do some tests but it's probably fine. |
Refactors the namespace validation from occurring in the TemplateProcessor, to occur instead when parsing the template. Behavior remains unchanged. Also guards several potentially empty matches of namespaces from being iterated over, causing fatal PHP errors.
Refactors the namespace validation from occurring in the TemplateProcessor, to occur instead when parsing the template. Behavior remains unchanged. Also guards several potentially empty matches of namespaces from being iterated over, causing fatal PHP errors.
Hi guys,
not 100% sure, but it seems that the behavior did change in fact. Assume: {namespace f*}{namespace bar}<foo:bar /><bar:foo></bar:foo><foo.bar:baz /><f:format.raw>foobar</f:format.raw> Result before: <foo:bar /><bar:foo></bar:foo><foo.bar:baz />foobar Result now: <foo:bar /><bar:foo></bar:foo><foo.bar:baz /><f:format.raw>foobar</f:format.raw> And the reason is that registered namespaces took precedence over ignored namespaces before and no longer do now. (see neos/flow-development-collection#1761 for more details) |
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
With 2.6.6 this seems to be back for us, see neos/flow-development-collection#1761 |
… and it seems quite logical, looking at f8c0fb3 that went into 2.6.6 as per 2.6.5...2.6 What is the background for the revert? I can't seem to find a changelog… 😳 |
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: TYPO3#451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: #451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Refactors the namespace validation from occurring in the TemplateProcessor, to occur instead when parsing the template. Behavior remains unchanged. Also guards several potentially empty matches of namespaces from being iterated over, causing fatal PHP errors.
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: TYPO3#451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Fixes a regression in namespace resolving behavior, wherein a conflicting ignored namespace (e.g. "f*") incorrectly caused the registered namespace to be ignored (e.g. "f:" would be ignored). References: TYPO3#451 References: neos/flow-development-collection#1761 Signed-off-by: Claus Due <claus@namelesscoder.net>
Refactors the namespace validation from occurring in
the TemplateProcessor, to occur instead when parsing
the template. Behavior remains unchanged.
Also guards several potentially empty matches of
namespaces from being iterated over, causing fatal
PHP errors.