Feature #99585
open
Add Upgrade Wizard for Apache htaccess files
Added by Oliver Hader almost 2 years ago.
Updated over 1 year ago.
Sprint Focus:
On Location Sprint
Description
- (for instance)
- check state of
fileadmin/.htaccess
and compare with current version provided in TYPO3
- offer diff view and/or possibility to override or deny (for CLI)
Files
- Assignee set to Oliver Hader
- Status changed from New to Needs Feedback
The "Directory Status" module in the install tool was / is designed to deal with stuff like this.
That's how it the install tool current "deals with it" in TYPO3 v12...
- Target version changed from 12.2 to 12.3
- Target version changed from 12.3 to 12 LTS
- Target version changed from 12 LTS to Candidate for Major Version
- Assignee deleted (
Oliver Hader)
Would be a nice enhancement, but I don't have time for working on this...
- Status changed from Needs Feedback to Accepted
- Sprint Focus set to On Location Sprint
Hey folks,
after discussing a little bit with some core-devs (during the T3DD2023 coding-night), a wanted to sum up what we've analysed so far.
- Mark (.htaccess) file candidates that could be handled by this feature in
TYPO3\CMS\Install\FolderStructure\DefaultFactory::getDefaultStructureDefinition()
- Update the implementation used in
TYPO3\CMS\Install\Controller\EnvironmentController::folderStructureGetStatusAction()
to show a green badge, if the marked files from (1.) are either unchanged or only contain (line-based) additions (but no changes).
- This ensures that custom rules don't lead to false positives (ie. where rules have been added to
public/.htaccess
)
- This should be implemented in
TYPO3\CMS\Install\FolderStructure\FileNode
, probably utilising sebastian/diff
- Update
TYPO3\CMS\Install\FolderStructure\FileNode::fixSelf()
adding a additional section which deals with changed files, propably by creating backup files and restoring the desired file contents
- Implement unit-tests to ensure the above changes are working
- Implement an update-wizard which utilises
TYPO3\CMS\Install\FolderStructure\DefaultFactory
to reset the changed files as described above. Of course after the user has given confirmation, probably after presenting a unified diff to the user first.
- Take care about the following implementations, which are using
TYPO3\CMS\Install\FolderStructure\DefaultFactory
TYPO3\CMS\Install\Command\SetupCommand
TYPO3\CMS\Install\Controller\InstallerController
TYPO3\CMS\Install\Service\CoreUpdateService
Also available in: Atom
PDF