Skip to content

Commit

Permalink
[DOCS] Generate documentation
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
sabbelasichon authored and github-actions[bot] committed Jan 9, 2024
1 parent 19749f5 commit 4247cd7
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion docs/all_rectors_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 295 Rules Overview
# 296 Rules Overview

## AbstractMessageGetSeverityFluidRector

Expand Down Expand Up @@ -2771,6 +2771,30 @@ Refactor method getPagesTSconfig of class BackendUtility if possible

<br>

## RefactorCHashArrayOfTSFERector

Refactor Internal public property cHash_array

- class: [`Ssch\TYPO3Rector\Rector\v10\v1\typo3\RefactorCHashArrayOfTSFERector`](../src/Rector/v10/v1/typo3/RefactorCHashArrayOfTSFERector.php)

```diff
-$cHash_array = $GLOBALS['TSFE']->cHash_array;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\HttpUtility;
+use TYPO3\CMS\Frontend\Page\CacheHashCalculator;
+
+$relevantParametersForCachingFromPageArguments = [];
+$pageArguments = $GLOBALS['REQUEST']->getAttribute('routing');
+$queryParams = $pageArguments->getDynamicArguments();
+if (!empty($queryParams) && ($pageArguments->getArguments()['cHash'] ?? false)) {
+ $queryParams['id'] = $pageArguments->getPageId();
+ $relevantParametersForCachingFromPageArguments = GeneralUtility::makeInstance(CacheHashCalculator::class)->getRelevantParameters(HttpUtility::buildQueryString($queryParams));
+}
+$cHash_array = $relevantParametersForCachingFromPageArguments;
```

<br>

## RefactorDbConstantsRector

Changes TYPO3_db constants to `$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'].`
Expand Down

0 comments on commit 4247cd7

Please sign in to comment.