Skip to content

Commit

Permalink
Preparation the next migration. Drop Manifest Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Sep 23, 2024
1 parent e05ce00 commit dfd6bcb
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 150 deletions.
1 change: 1 addition & 0 deletions Classes/Cache/Rule/AbstractRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* Abstract Rule.
* @todo migrate to Listener
*/
abstract class AbstractRule extends StaticFileCacheObject
{
Expand Down
3 changes: 1 addition & 2 deletions Classes/Command/FlushCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class FlushCacheCommand extends AbstractCommand
protected function configure(): void
{
parent::configure();
$this->addOption('force-boost-mode-flush', null, InputOption::VALUE_NONE, 'Force a boost mode flush')
;
$this->addOption('force-boost-mode-flush', null, InputOption::VALUE_NONE, 'Force a boost mode flush');
}

protected function execute(InputInterface $input, OutputInterface $output): int
Expand Down
5 changes: 0 additions & 5 deletions Classes/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use SFC\Staticfilecache\Generator\ConfigGenerator;
use SFC\Staticfilecache\Generator\GzipGenerator;
use SFC\Staticfilecache\Generator\HtaccessGenerator;
use SFC\Staticfilecache\Generator\ManifestGenerator;
use SFC\Staticfilecache\Generator\PhpGenerator;
use SFC\Staticfilecache\Generator\PlainGenerator;
use SFC\Staticfilecache\Hook\DatamapHook;
Expand Down Expand Up @@ -143,10 +142,6 @@ protected function registerGenerators(): self
'htaccess' => HtaccessGenerator::class,
];


if ($this->configurationService->get('enableGeneratorManifest')) {
$generator['manifest'] = ManifestGenerator::class;
}
if ($this->configurationService->get('enableGeneratorPhp')) {
$generator['php'] = PhpGenerator::class;
unset($generator['htaccess']);
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Repository/AbstractRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* AbstractRepository.
*
* @todo move methods to iterator?
*/
abstract class AbstractRepository extends StaticFileCacheObject
{
Expand Down
3 changes: 3 additions & 0 deletions Classes/Generator/AbstractGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;

/**
* @todo move to Generate Event
*/
abstract class AbstractGenerator extends StaticFileCacheObject
{
abstract public function generate(string $entryIdentifier, string $fileName, ResponseInterface $response, int $lifetime): void;
Expand Down
35 changes: 0 additions & 35 deletions Classes/Generator/ManifestGenerator.php

This file was deleted.

9 changes: 5 additions & 4 deletions Classes/Middleware/CookieCheckMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
use SFC\Staticfilecache\Service\CookieService;
use TYPO3\CMS\Core\Context\Context;

/**
* CookieCheckMiddleware.
*/
class CookieCheckMiddleware implements MiddlewareInterface
{
public function __construct(protected Context $context, protected CookieService $cookieService, protected EventDispatcherInterface $eventDispatcher) {}
public function __construct(
protected Context $context,
protected CookieService $cookieService,
protected EventDispatcherInterface $eventDispatcher
) {}

/**
* Check for the sfc cookie and remove it when there is no valid user session.
Expand Down
8 changes: 4 additions & 4 deletions Classes/Middleware/FallbackMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* FallbackMiddleware.
*/
class FallbackMiddleware implements MiddlewareInterface
{
public function __construct(protected EventDispatcherInterface $eventDispatcher, protected ConfigurationService $configurationService) {}
public function __construct(
protected EventDispatcherInterface $eventDispatcher,
protected ConfigurationService $configurationService
) {}

public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
Expand Down
3 changes: 0 additions & 3 deletions Classes/Middleware/FrontendUserMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;

/**
* Init frontend user.
*/
class FrontendUserMiddleware implements MiddlewareInterface
{
public function __construct(private CookieService $cookieService) {}
Expand Down
7 changes: 5 additions & 2 deletions Classes/Middleware/GenerateMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ class GenerateMiddleware implements MiddlewareInterface
{
protected ?UriFrontend $cache = null;


public function __construct(protected EventDispatcherInterface $eventDispatcher, protected CookieService $cookieService) {}
public function __construct(
protected EventDispatcherInterface $eventDispatcher,
protected CookieService $cookieService
) {}

/**
* Process an incoming server request.
Expand Down Expand Up @@ -89,6 +91,7 @@ protected function calculateLifetime(TypoScriptFrontendController $tsfe): int
// Check ModifyCacheLifetimeForPageEvent & AfterCachedPageIsPersistedEvent

// @phpstan-ignore-next-line
// @todo check this Line!!!
$timeOutTime = $tsfe->get_cache_timeout();

Check failure on line 95 in Classes/Middleware/GenerateMiddleware.php

View workflow job for this annotation

GitHub Actions / build (8.2, 13)

Call to protected method get_cache_timeout() of class TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController.

Check failure on line 95 in Classes/Middleware/GenerateMiddleware.php

View workflow job for this annotation

GitHub Actions / build (8.2, 13)

Method TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::get_cache_timeout() invoked with 0 parameters, 1 required.

Check failure on line 95 in Classes/Middleware/GenerateMiddleware.php

View workflow job for this annotation

GitHub Actions / build (8.3, 13)

Call to protected method get_cache_timeout() of class TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController.

Check failure on line 95 in Classes/Middleware/GenerateMiddleware.php

View workflow job for this annotation

GitHub Actions / build (8.3, 13)

Method TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::get_cache_timeout() invoked with 0 parameters, 1 required.

// If page has a endtime before the current timeOutTime, use it instead:
Expand Down
67 changes: 0 additions & 67 deletions Classes/Middleware/ManifestMiddleware.php

This file was deleted.

3 changes: 0 additions & 3 deletions Classes/Middleware/PrepareMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
use SFC\Staticfilecache\Service\TypoScriptFrontendService;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* PrepareMiddleware.
*/
class PrepareMiddleware implements MiddlewareInterface
{
public function __construct(protected EventDispatcherInterface $eventDispatcher) {}
Expand Down
3 changes: 0 additions & 3 deletions Classes/Service/ClientService.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* ClientService.
*/
class ClientService extends AbstractService
{
protected const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0';
Expand Down
3 changes: 0 additions & 3 deletions Classes/Service/DateTimeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* DateTimeService.
*/
class DateTimeService extends AbstractService
{
/**
Expand Down
3 changes: 0 additions & 3 deletions Classes/Service/EnvironmentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;

/**
* EnvironmentService.
*/
class EnvironmentService
{
/**
Expand Down
3 changes: 0 additions & 3 deletions Classes/Service/GeneratorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
use SFC\Staticfilecache\Generator\AbstractGenerator;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* GeneratorService.
*/
class GeneratorService extends AbstractService
{
/**
Expand Down
3 changes: 0 additions & 3 deletions Classes/Service/HtaccessConfigurationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* HtaccessConfigurationService.
*/
class HtaccessConfigurationService extends AbstractService
{
/**
Expand Down
3 changes: 0 additions & 3 deletions Classes/Service/HttpPushService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use SFC\Staticfilecache\Service\HttpPush\AbstractHttpPush;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* HttpPushService.
*/
class HttpPushService extends AbstractService
{
/**
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/ObjectFactoryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* ObjectFactoryService.
* @todo drop this for events
*/
class ObjectFactoryService extends AbstractService
{
Expand Down
3 changes: 0 additions & 3 deletions Classes/Service/RemoveService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* RemoveService.
*/
class RemoveService extends AbstractService
{
/**
Expand Down
1 change: 1 addition & 0 deletions Classes/StaticFileCacheObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
*/
abstract class StaticFileCacheObject implements SingletonInterface, LoggerAwareInterface
{
// @todo remove this "all object stuff"
use LoggerAwareTrait;
}
3 changes: 0 additions & 3 deletions ext_conf_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ phpTemplateName = EXT:staticfilecache/Resources/Private/Templates/Php.html
# cat=basic; type=string; label=Override cache directory: If this config var is empty the default is "typo3temp/assets/tx_staticfilecache/". If you change this value you HAVE TO adapt your rewrite configuration.
overrideCacheDirectory =

# cat=Generator; type=boolean; label=Enable Cache Manifest generator (BETA!!!): Create manifest files
enableGeneratorManifest = 0

# cat=Generator; type=boolean; label=Enable PHP generator: When checked, the php file including headers output will write to the cache. This will also disable the .htaccess file generation.
enableGeneratorPhp = 0

Expand Down

0 comments on commit dfd6bcb

Please sign in to comment.