Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

[TASK] Support frontend requests in case of helhum/typo3-secure-web #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rostyslavmatviiv
Copy link

@rostyslavmatviiv rostyslavmatviiv commented May 14, 2019

== Description ==
On our project we are using helhum/typo3-secure-web package together with nimut/testing-framework, and we got an issue when running FunctionalTests together with frontend requests.
As we are using helhum/typo3-secure-web we have a private folder and public folder in the project. And we wrote a functional test to check if frontend request will response with the data we expect (we are using this: https://github.com/Nimut/testing-framework#frontend-requests), TYPO3_PATH_ROOT is set to the private folder, however /private/index.php file is empty, and because of that frontend answers with empty response. So looks like nimut/testing-framework doesn't expect a compatibility with helhum/typo3-secure-web.

== What was changed? ==
As I see TYPO3_PATH_WEB is used in the code too, but actually in the current state it is only used to define ORIGINAL_ROOT in case when TYPO3_PATH_ROOT isn't set.

So we are defining a new constant ORIGINAL_WEB which will use value from TYPO3_PATH_WEB or if it is empty then from TYPO3_PATH_ROOT. In this case we can separate our private environment and public environment by next constants: ORIGINAL_ROOT and ORIGINAL_WEB, which will have the same value in the code in case when user sets only one of them.

And in the place where we are preparing testing environment we are linking our index.php from testing env to the index.php from root which is set by TYPO3_PATH_WEB.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant