Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Sep 7, 2023
2 parents 490b66e + 6d82c08 commit 37e082a
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 26 deletions.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: 'BUG: foobar fails when baz'
labels: ''
assignees: ''

---

**I have checked that the bug exists in the `dev-development` branch**
_Yes or no._
If you're about to answer "no" here, it is your responsibility to check `dev-development` **before** opening a bug report!

**I have checked that there are no already open issues or recently closed issues about this bug**
_Yes or no._
If you're about to answer "no" here, it is your responsibility to first check the open and recently closed issues for potential duplicaates.

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature request: having foobar would be nice'
labels: ''
assignees: ''

---

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered or workarounds you currently have to use**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 8 additions & 5 deletions Classes/Controller/AbstractFluxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,14 @@ public function getRecord(): array
}
$record = $contentObject->data;
if ($record['_LOCALIZED_UID'] ?? false) {
$record = $this->recordService->getSingle(
(string) $this->getFluxTableName(),
'*',
$record['_LOCALIZED_UID']
) ?? $record;
$record = array_merge(
$record,
$this->recordService->getSingle(
(string) $this->getFluxTableName(),
'*',
$record['_LOCALIZED_UID']
) ?? $record
);
}
return $record;
}
Expand Down
5 changes: 0 additions & 5 deletions Classes/Integration/Overrides/ChimeraConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager;
use TYPO3\CMS\Extbase\Service\ExtensionService;

class ChimeraConfigurationManager extends AbstractChimeraConfigurationManager
{
Expand All @@ -28,10 +27,6 @@ protected function initializeConcreteConfigurationManager(): void

$this->frontendConfigurationManager = $frontendConfigurationManager;
$this->backendConfigurationManager = $backendConfigurationManager;

/** @var ExtensionService $extensionService */
$extensionService = $this->container->get(ExtensionService::class);
$extensionService->injectConfigurationManager($this);
}

public function setRequest(ServerRequestInterface $request): void
Expand Down
42 changes: 28 additions & 14 deletions Classes/Service/CacheService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
declare(strict_types=1);
namespace FluidTYPO3\Flux\Service;

use Doctrine\DBAL\Exception\TableNotFoundException;
use TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use TYPO3\CMS\Core\SingletonInterface;

Expand All @@ -22,15 +24,19 @@ public function __construct(FrontendInterface $persistentCache, FrontendInterfac
public function getFromCaches(string ...$identifyingValues)
{
$cacheKey = $this->createCacheIdFromValues($identifyingValues);
$fromTransient = $this->transientCache->get($cacheKey);
if ($fromTransient) {
return $fromTransient;
}
try {
$fromTransient = $this->transientCache->get($cacheKey);
if ($fromTransient) {
return $fromTransient;
}

$fromPersistent = $this->persistentCache->get($cacheKey);
if ($fromPersistent) {
$this->transientCache->set($cacheKey, $fromPersistent);
return $fromPersistent;
$fromPersistent = $this->persistentCache->get($cacheKey);
if ($fromPersistent) {
$this->transientCache->set($cacheKey, $fromPersistent);
return $fromPersistent;
}
} catch (NoSuchCacheException | TableNotFoundException $exception) {
// Suppressed: operation without cache is allowed.
}

return false;
Expand All @@ -42,17 +48,25 @@ public function getFromCaches(string ...$identifyingValues)
public function setInCaches($value, bool $persistent, string ...$identifyingValues): void
{
$cacheKey = $this->createCacheIdFromValues($identifyingValues);
$this->transientCache->set($cacheKey, $value);
if ($persistent) {
$this->persistentCache->set($cacheKey, $value);
try {
$this->transientCache->set($cacheKey, $value);
if ($persistent) {
$this->persistentCache->set($cacheKey, $value);
}
} catch (NoSuchCacheException | TableNotFoundException $exception) {
// Suppressed: operation without cache is allowed.
}
}

public function remove(string ...$identifyingValues): void
{
$cacheKey = $this->createCacheIdFromValues($identifyingValues);
$this->transientCache->remove($cacheKey);
$this->persistentCache->remove($cacheKey);
try {
$cacheKey = $this->createCacheIdFromValues($identifyingValues);
$this->transientCache->remove($cacheKey);
$this->persistentCache->remove($cacheKey);
} catch (NoSuchCacheException | TableNotFoundException $exception) {
// Suppressed: operation without cache is allowed.
}
}

protected function createCacheIdFromValues(array $identifyingValues): string
Expand Down
4 changes: 4 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ services:
public: true
FluidTYPO3\Flux\Integration\HookSubscribers\StaticTypoScriptInclusion:
public: true
FluidTYPO3\Flux\Integration\Overrides\ChimeraConfigurationManager:
public: true
FluidTYPO3\Flux\Integration\Overrides\LegacyChimeraConfigurationManager:
public: true
FluidTYPO3\Flux\Integration\BackendLayoutRenderer:
public: true
autowire: false
Expand Down
4 changes: 3 additions & 1 deletion Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
* I judge this risk to be acceptably low enough that this stupid - but very effective - fallback-style loading
* of Flux's content types when in CLI mode is acceptable.
*/
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\FluidTYPO3\Flux\Integration\Configuration\SpooledConfigurationApplicator::class)->processData();
/** @var \FluidTYPO3\Flux\Integration\Configuration\SpooledConfigurationApplicator $applicator */
$applicator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\FluidTYPO3\Flux\Integration\Configuration\SpooledConfigurationApplicator::class);
$applicator->processData();
}
})();
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'priority' => 'top',
'loadOrder' => '',
'module' => '',
'state' => 'stable',
'state' => 'beta',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
Expand Down
4 changes: 4 additions & 0 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Backend\Controller\Page\LocalizationController::class]['className'] = \FluidTYPO3\Flux\Integration\Overrides\LocalizationController::class;
}

$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class]['className'] = version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11.0', '<')
? \FluidTYPO3\Flux\Integration\Overrides\LegacyChimeraConfigurationManager::class
: \FluidTYPO3\Flux\Integration\Overrides\ChimeraConfigurationManager::class;

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] =
\FluidTYPO3\Flux\Integration\HookSubscribers\DataHandlerSubscriber::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] =
Expand Down

0 comments on commit 37e082a

Please sign in to comment.