-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use file streaming for output to prevent large files from exhausting …
…PHP memory limit (#203) * [TASK] Use file streaming for output to prevent large files from exhausting PHP memory limit [TER-194] [TER-195] * [TASK] Raise upper PHP requirement in ext_emconf.php [TER-194] [TER-195] * [TASK] Update php-cs-fixer configuration [TER-194] [TER-195] * [TASK] Run php-cs-fixer [TER-194] [TER-195] * [BUGFIX] Add missing use statement [TER-194] [TER-195] * [BUGFIX] Add missing use statement [TER-194] [TER-195] * [TASK] Remove old comments and run php-cs-fixer [TER-194] [TER-195] * [TASK] Prepare release of version 6.0.3 [TER-194] [TER-195]
- Loading branch information
Showing
44 changed files
with
338 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use TYPO3\CodingStandards\CsFixerConfig; | ||
|
||
if (PHP_SAPI !== 'cli') { | ||
die('This script supports command line usage only. Please check your command.'); | ||
} | ||
|
||
$headerComment = <<<COMMENT | ||
This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
For the full copyright and license information, please read the | ||
LICENSE.txt file that was distributed with this source code. | ||
(c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
COMMENT; | ||
|
||
$config = CsFixerConfig::create(); | ||
$config | ||
->setHeader($headerComment, true) | ||
->getFinder() | ||
->name('*.php') | ||
->exclude('Configuration') | ||
->exclude('Libraries') | ||
->exclude('Resources') | ||
->exclude('Migrations') | ||
->notName('ext_emconf.php') | ||
->notName('ext_tables.php') | ||
->notName('ext_localconf.php') | ||
->in(dirname(__DIR__)); | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Cache; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Cache; | ||
|
||
use TYPO3\CMS\Core\SingletonInterface; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Cache; | ||
|
||
use Leuchtfeuer\SecureDownloads\Domain\Transfer\Token\AbstractToken; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Cache; | ||
|
||
use Leuchtfeuer\SecureDownloads\Domain\Transfer\Token\AbstractToken; | ||
|
||
/** | ||
* Stores decoded JSON web token data. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Cache; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Cache; | ||
|
||
/** | ||
* Stores encoded JSON web token data. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Controller; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Controller; | ||
|
||
use Doctrine\DBAL\Exception; | ||
use Leuchtfeuer\SecureDownloads\Domain\Repository\LogRepository; | ||
|
@@ -33,8 +32,7 @@ class LogController extends ActionController | |
public function __construct( | ||
protected ModuleTemplateFactory $moduleTemplateFactory, | ||
protected LogRepository $logRepository, | ||
) { | ||
} | ||
) {} | ||
|
||
/** | ||
* @return ResponseInterface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Domain\Model; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Domain\Model; | ||
|
||
use Doctrine\DBAL\Exception; | ||
use TYPO3\CMS\Core\Database\ConnectionPool; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Domain\Repository; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Domain\Repository; | ||
|
||
use Leuchtfeuer\SecureDownloads\Domain\Model\Log; | ||
use Leuchtfeuer\SecureDownloads\Domain\Transfer\Filter; | ||
|
@@ -29,13 +28,12 @@ | |
|
||
class LogRepository extends Repository | ||
{ | ||
const TABLENAME = 'tx_securedownloads_domain_model_log'; | ||
public const TABLENAME = 'tx_securedownloads_domain_model_log'; | ||
|
||
public function __construct( | ||
private readonly ConnectionPool $connectionPool, | ||
private readonly DataMapper $dataMapper | ||
) { | ||
} | ||
) {} | ||
|
||
public function createQueryBuilder(): QueryBuilder | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Domain\Repository; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2020 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Domain\Repository; | ||
|
||
use Doctrine\DBAL\Exception; | ||
use Leuchtfeuer\SecureDownloads\Resource\Driver\SecureDownloadsDriver; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Domain\Transfer; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Domain\Transfer; | ||
|
||
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException; | ||
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException; | ||
|
@@ -24,11 +23,11 @@ | |
*/ | ||
class ExtensionConfiguration implements SingletonInterface | ||
{ | ||
const FILE_TYPES_WILDCARD = '*'; | ||
public const FILE_TYPES_WILDCARD = '*'; | ||
|
||
const OUTPUT_STREAM = 'stream'; | ||
public const OUTPUT_STREAM = 'stream'; | ||
|
||
const OUTPUT_NGINX = 'x-accel-redirect'; | ||
public const OUTPUT_NGINX = 'x-accel-redirect'; | ||
|
||
/** | ||
* The value will be added to configured cache lifetime of the page, where the resource is embedded in. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace Leuchtfeuer\SecureDownloads\Domain\Transfer; | ||
|
||
/*** | ||
* | ||
/* | ||
* This file is part of the "Secure Downloads" Extension for TYPO3 CMS. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* (c) 2019 Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
* | ||
***/ | ||
* (c) Dev <[email protected]>, Leuchtfeuer Digital Marketing | ||
*/ | ||
|
||
namespace Leuchtfeuer\SecureDownloads\Domain\Transfer; | ||
|
||
class Filter | ||
{ | ||
const USER_TYPE_ALL = 0; | ||
const USER_TYPE_LOGGED_ON = -1; | ||
const USER_TYPE_LOGGED_OFF = -2; | ||
public const USER_TYPE_ALL = 0; | ||
public const USER_TYPE_LOGGED_ON = -1; | ||
public const USER_TYPE_LOGGED_OFF = -2; | ||
|
||
/** | ||
* @var string The file type. | ||
|
Oops, something went wrong.