mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2025-03-16 13:03:53 +01:00
Compare commits
9 commits
dca2ea8b0b
...
b7fbf21fc3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b7fbf21fc3 | ||
![]() |
25dd6694e8 | ||
fc16c2ccde | |||
![]() |
e47753ecab | ||
![]() |
0384464033 | ||
![]() |
3fd97a95fc | ||
![]() |
29a08dd71b | ||
![]() |
8a703d1947 | ||
![]() |
a308257d74 |
18 changed files with 108 additions and 184 deletions
.github/workflows
.gitlab
build
pipeline
Build
CHANGELOG.mdClasses
Documentation
composer.jsonext_emconf.phprector.php
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
@ -44,6 +44,7 @@ jobs:
|
||||||
- "8.1"
|
- "8.1"
|
||||||
- "8.2"
|
- "8.2"
|
||||||
- "8.3"
|
- "8.3"
|
||||||
|
- "8.4"
|
||||||
code-quality:
|
code-quality:
|
||||||
name: "Code quality checks"
|
name: "Code quality checks"
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
@ -174,6 +175,12 @@ jobs:
|
||||||
- typo3-version: "^12.4"
|
- typo3-version: "^12.4"
|
||||||
php-version: "8.3"
|
php-version: "8.3"
|
||||||
composer-dependencies: highest
|
composer-dependencies: highest
|
||||||
|
- typo3-version: "^12.4"
|
||||||
|
php-version: "8.4"
|
||||||
|
composer-dependencies: lowest
|
||||||
|
- typo3-version: "^12.4"
|
||||||
|
php-version: "8.4"
|
||||||
|
composer-dependencies: highest
|
||||||
functional-tests:
|
functional-tests:
|
||||||
name: "Functional tests"
|
name: "Functional tests"
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
@ -251,6 +258,12 @@ jobs:
|
||||||
- typo3-version: "^12.4"
|
- typo3-version: "^12.4"
|
||||||
php-version: "8.3"
|
php-version: "8.3"
|
||||||
composer-dependencies: highest
|
composer-dependencies: highest
|
||||||
|
# - typo3-version: "^12.4"
|
||||||
|
# php-version: "8.4"
|
||||||
|
# composer-dependencies: lowest
|
||||||
|
- typo3-version: "^12.4"
|
||||||
|
php-version: "8.4"
|
||||||
|
composer-dependencies: highest
|
||||||
shellcheck:
|
shellcheck:
|
||||||
name: Check shell scripts
|
name: Check shell scripts
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
|
@ -3,10 +3,3 @@
|
||||||
[[ ! -e /.dockerenv ]] && exit 0
|
[[ ! -e /.dockerenv ]] && exit 0
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
apk add parallel
|
|
||||||
apk add icu-dev
|
|
||||||
docker-php-ext-configure intl
|
|
||||||
docker-php-ext-install intl
|
|
||||||
docker-php-ext-enable intl
|
|
||||||
docker-php-ext-install pdo_mysql mysqli
|
|
||||||
|
|
|
@ -20,6 +20,8 @@ include:
|
||||||
- '/.gitlab/pipeline/jobs/func-v12-php8.2-lowest.yml'
|
- '/.gitlab/pipeline/jobs/func-v12-php8.2-lowest.yml'
|
||||||
- '/.gitlab/pipeline/jobs/func-v12-php8.3-highest.yml'
|
- '/.gitlab/pipeline/jobs/func-v12-php8.3-highest.yml'
|
||||||
- '/.gitlab/pipeline/jobs/func-v12-php8.3-lowest.yml'
|
- '/.gitlab/pipeline/jobs/func-v12-php8.3-lowest.yml'
|
||||||
|
- '/.gitlab/pipeline/jobs/func-v12-php8.4-highest.yml'
|
||||||
|
- '/.gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml'
|
||||||
- '/.gitlab/pipeline/jobs/javascript-lint.yml'
|
- '/.gitlab/pipeline/jobs/javascript-lint.yml'
|
||||||
- '/.gitlab/pipeline/jobs/json-lint.yml'
|
- '/.gitlab/pipeline/jobs/json-lint.yml'
|
||||||
- '/.gitlab/pipeline/jobs/php-cs-fixer.yml'
|
- '/.gitlab/pipeline/jobs/php-cs-fixer.yml'
|
||||||
|
@ -34,6 +36,7 @@ include:
|
||||||
- '/.gitlab/pipeline/jobs/unit-v12-php8.2-lowest.yml'
|
- '/.gitlab/pipeline/jobs/unit-v12-php8.2-lowest.yml'
|
||||||
- '/.gitlab/pipeline/jobs/unit-v12-php8.3-highest.yml'
|
- '/.gitlab/pipeline/jobs/unit-v12-php8.3-highest.yml'
|
||||||
- '/.gitlab/pipeline/jobs/unit-v12-php8.3-lowest.yml'
|
- '/.gitlab/pipeline/jobs/unit-v12-php8.3-lowest.yml'
|
||||||
|
- '/.gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml'
|
||||||
- '/.gitlab/pipeline/jobs/xliff-lint.yml'
|
- '/.gitlab/pipeline/jobs/xliff-lint.yml'
|
||||||
- '/.gitlab/pipeline/jobs/yaml-lint.yml'
|
- '/.gitlab/pipeline/jobs/yaml-lint.yml'
|
||||||
- template: Security/Secret-Detection.gitlab-ci.yml
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
||||||
|
|
|
@ -2,7 +2,5 @@
|
||||||
image: ghcr.io/typo3/core-testing-php83:latest
|
image: ghcr.io/typo3/core-testing-php83:latest
|
||||||
before_script:
|
before_script:
|
||||||
- bash .gitlab/build/docker_install.sh > /dev/null
|
- bash .gitlab/build/docker_install.sh > /dev/null
|
||||||
variables:
|
|
||||||
PHP_INI_SCAN_DIR: "/usr/local/etc/php/"
|
|
||||||
script:
|
script:
|
||||||
- cp $CI_PROJECT_DIR/.gitlab/pipeline/ci/php.ini /usr/local/etc/php/conf.d/z_php.ini; # copy php.ini into image
|
- cp $CI_PROJECT_DIR/.gitlab/pipeline/ci/php.ini /usr/local/etc/php/conf.d/z_php.ini; # copy php.ini into image
|
||||||
|
|
14
.gitlab/pipeline/jobs/func-v12-php8.4-highest.yml
Normal file
14
.gitlab/pipeline/jobs/func-v12-php8.4-highest.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
func-v12-php8.4-highest:
|
||||||
|
extends: .default
|
||||||
|
image: ghcr.io/typo3/core-testing-php84:latest
|
||||||
|
services:
|
||||||
|
- mariadb:10
|
||||||
|
stage: test
|
||||||
|
needs:
|
||||||
|
- build-composer-dependencies
|
||||||
|
- php-lint-php8.4
|
||||||
|
script:
|
||||||
|
- echo "Job ${CI_JOB_NAME}"
|
||||||
|
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
|
||||||
|
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
|
||||||
|
- composer ci:tests:functional
|
14
.gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml
Normal file
14
.gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
func-v12-php8.4-lowest:
|
||||||
|
extends: .default
|
||||||
|
image: ghcr.io/typo3/core-testing-php84:latest
|
||||||
|
services:
|
||||||
|
- mariadb:10
|
||||||
|
stage: test
|
||||||
|
needs:
|
||||||
|
- build-composer-dependencies
|
||||||
|
- php-lint-php8.4
|
||||||
|
script:
|
||||||
|
- echo "Job ${CI_JOB_NAME}"
|
||||||
|
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
|
||||||
|
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
|
||||||
|
- composer ci:tests:functional
|
7
.gitlab/pipeline/jobs/php-lint-php8.4.yml
Normal file
7
.gitlab/pipeline/jobs/php-lint-php8.4.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
php-lint-php8.4:
|
||||||
|
extends: .composer-update
|
||||||
|
image: ghcr.io/typo3/core-testing-php84:latest
|
||||||
|
stage: lint
|
||||||
|
needs: [ ]
|
||||||
|
script:
|
||||||
|
- composer ci:php:lint
|
11
.gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml
Normal file
11
.gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
unit-v12-php8.4-highest:
|
||||||
|
extends: .default
|
||||||
|
image: ghcr.io/typo3/core-testing-php84:latest
|
||||||
|
stage: test
|
||||||
|
needs:
|
||||||
|
- build-composer-dependencies
|
||||||
|
- php-lint-php8.4
|
||||||
|
script:
|
||||||
|
- echo "Job ${CI_JOB_NAME}"
|
||||||
|
- composer require --no-progress typo3/cms-core:"^12.4"
|
||||||
|
- composer ci:tests:unit
|
|
@ -555,7 +555,7 @@ case ${TEST_SUITE} in
|
||||||
;;
|
;;
|
||||||
functional)
|
functional)
|
||||||
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Functional"
|
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Functional"
|
||||||
COMMAND=".Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}"
|
COMMAND=".Build/bin/paratest -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}"
|
||||||
case ${DBMS} in
|
case ${DBMS} in
|
||||||
mariadb)
|
mariadb)
|
||||||
echo "Using driver: ${DATABASE_DRIVER}"
|
echo "Using driver: ${DATABASE_DRIVER}"
|
||||||
|
@ -642,12 +642,12 @@ case ${TEST_SUITE} in
|
||||||
;;
|
;;
|
||||||
unit)
|
unit)
|
||||||
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit"
|
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit"
|
||||||
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/phpunit -c Build/phpunit/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}
|
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/paratest -c Build/phpunit/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}
|
||||||
SUITE_EXIT_CODE=$?
|
SUITE_EXIT_CODE=$?
|
||||||
;;
|
;;
|
||||||
unitRandom)
|
unitRandom)
|
||||||
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit"
|
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit"
|
||||||
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/phpunit -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE}
|
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/paratest -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE}
|
||||||
SUITE_EXIT_CODE=$?
|
SUITE_EXIT_CODE=$?
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ruleset name="phpList Coding Standard">
|
|
||||||
<description>
|
|
||||||
This standard requires PHP_CodeSniffer >= 3.5.3.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="colors"/>
|
|
||||||
<arg name="extensions" value="php"/>
|
|
||||||
|
|
||||||
<!--The complete PSR-12 rule set-->
|
|
||||||
<rule ref="PSR12"/>
|
|
||||||
|
|
||||||
<!-- Arrays -->
|
|
||||||
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
|
||||||
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
|
|
||||||
|
|
||||||
<!-- Classes -->
|
|
||||||
<rule ref="Generic.Classes.DuplicateClassName"/>
|
|
||||||
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
|
||||||
<rule ref="Squiz.Classes.ClassFileName"/>
|
|
||||||
<rule ref="Squiz.Classes.DuplicateProperty"/>
|
|
||||||
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>
|
|
||||||
<rule ref="Squiz.Classes.SelfMemberReference"/>
|
|
||||||
|
|
||||||
<!-- Code analysis -->
|
|
||||||
<rule ref="Generic.CodeAnalysis.AssignmentInCondition"/>
|
|
||||||
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
|
|
||||||
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
|
|
||||||
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
|
|
||||||
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
|
|
||||||
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
|
||||||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
|
||||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
|
||||||
|
|
||||||
<!-- Commenting -->
|
|
||||||
<rule ref="Generic.Commenting.Fixme"/>
|
|
||||||
<rule ref="Generic.Commenting.Todo"/>
|
|
||||||
<rule ref="PEAR.Commenting.InlineComment"/>
|
|
||||||
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
|
|
||||||
<rule ref="Squiz.Commenting.EmptyCatchComment"/>
|
|
||||||
<rule ref="Squiz.Commenting.FunctionCommentThrowTag"/>
|
|
||||||
<rule ref="Squiz.Commenting.PostStatementComment"/>
|
|
||||||
|
|
||||||
<!-- Control structures -->
|
|
||||||
<rule ref="PEAR.ControlStructures.ControlSignature"/>
|
|
||||||
|
|
||||||
<!-- Debug -->
|
|
||||||
<rule ref="Generic.Debug.ClosureLinter"/>
|
|
||||||
|
|
||||||
<!-- Files -->
|
|
||||||
<rule ref="Generic.Files.LineLength">
|
|
||||||
<exclude-pattern>Configuration/TCA/</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Generic.Files.OneClassPerFile"/>
|
|
||||||
<rule ref="Generic.Files.OneInterfacePerFile"/>
|
|
||||||
<rule ref="Generic.Files.OneObjectStructurePerFile"/>
|
|
||||||
<rule ref="Zend.Files.ClosingTag"/>
|
|
||||||
|
|
||||||
<!-- Formatting -->
|
|
||||||
<rule ref="PEAR.Formatting.MultiLineAssignment"/>
|
|
||||||
|
|
||||||
<!-- Functions -->
|
|
||||||
<rule ref="Generic.Functions.CallTimePassByReference"/>
|
|
||||||
<rule ref="Squiz.Functions.FunctionDuplicateArgument"/>
|
|
||||||
<rule ref="Squiz.Functions.GlobalFunction"/>
|
|
||||||
|
|
||||||
<!-- Methods -->
|
|
||||||
<rule ref="PSR2.Methods.MethodDeclaration.Underscore"/>
|
|
||||||
|
|
||||||
<!-- Metrics -->
|
|
||||||
<rule ref="Generic.Metrics.CyclomaticComplexity"/>
|
|
||||||
<rule ref="Generic.Metrics.NestingLevel"/>
|
|
||||||
|
|
||||||
<!-- Naming conventions -->
|
|
||||||
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
|
||||||
<rule ref="PEAR.NamingConventions.ValidClassName"/>
|
|
||||||
|
|
||||||
<!-- Objects -->
|
|
||||||
<rule ref="Squiz.Objects.ObjectMemberComma"/>
|
|
||||||
|
|
||||||
<!-- Operators -->
|
|
||||||
<rule ref="Squiz.Operators.IncrementDecrementUsage"/>
|
|
||||||
<rule ref="Squiz.Operators.ValidLogicalOperators"/>
|
|
||||||
|
|
||||||
<!-- PHP -->
|
|
||||||
<rule ref="Generic.PHP.BacktickOperator"/>
|
|
||||||
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
|
|
||||||
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
|
||||||
<rule ref="Generic.PHP.DisallowAlternativePHPTags"/>
|
|
||||||
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
|
||||||
<rule ref="Generic.PHP.DiscourageGoto"/>
|
|
||||||
<rule ref="Generic.PHP.ForbiddenFunctions"/>
|
|
||||||
<rule ref="Generic.PHP.NoSilencedErrors"/>
|
|
||||||
<rule ref="Squiz.PHP.CommentedOutCode">
|
|
||||||
<properties>
|
|
||||||
<property name="maxPercentage" value="70"/>
|
|
||||||
</properties>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Squiz.PHP.DisallowMultipleAssignments"/>
|
|
||||||
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
|
|
||||||
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
|
|
||||||
<rule ref="Squiz.PHP.Eval"/>
|
|
||||||
<rule ref="Squiz.PHP.GlobalKeyword"/>
|
|
||||||
<rule ref="Squiz.PHP.Heredoc"/>
|
|
||||||
<rule ref="Squiz.PHP.InnerFunctions"/>
|
|
||||||
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
|
|
||||||
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
|
||||||
|
|
||||||
<!-- Scope -->
|
|
||||||
<rule ref="Squiz.Scope.MemberVarScope"/>
|
|
||||||
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
|
||||||
|
|
||||||
<!--Strings-->
|
|
||||||
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
|
|
||||||
|
|
||||||
<!-- Whitespace -->
|
|
||||||
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent"/>
|
|
||||||
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
|
|
||||||
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
|
|
||||||
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
|
||||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
|
|
||||||
<properties>
|
|
||||||
<property name="ignoreNewlines" value="true" />
|
|
||||||
</properties>
|
|
||||||
</rule>
|
|
||||||
<rule ref="Squiz.WhiteSpace.PropertyLabelSpacing"/>
|
|
||||||
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
|
||||||
</ruleset>
|
|
|
@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
||||||
## x.y.z
|
## x.y.z
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- Add support for PHP 8.4 (#1536)
|
||||||
- Add support for PostgreSQL 16 (#1271)
|
- Add support for PostgreSQL 16 (#1271)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -17,15 +17,10 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||||
*/
|
*/
|
||||||
class FrontEndEditorController extends ActionController
|
class FrontEndEditorController extends ActionController
|
||||||
{
|
{
|
||||||
private Context $context;
|
public function __construct(
|
||||||
|
private readonly Context $context,
|
||||||
private TeaRepository $teaRepository;
|
private readonly TeaRepository $teaRepository,
|
||||||
|
) {}
|
||||||
public function __construct(Context $context, TeaRepository $teaRepository)
|
|
||||||
{
|
|
||||||
$this->context = $context;
|
|
||||||
$this->teaRepository = $teaRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function indexAction(): ResponseInterface
|
public function indexAction(): ResponseInterface
|
||||||
{
|
{
|
||||||
|
@ -48,9 +43,7 @@ class FrontEndEditorController extends ActionController
|
||||||
return $userUid;
|
return $userUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[Extbase\IgnoreValidation(['argumentName' => 'tea'])]
|
||||||
* @Extbase\IgnoreValidation("tea")
|
|
||||||
*/
|
|
||||||
public function editAction(Tea $tea): ResponseInterface
|
public function editAction(Tea $tea): ResponseInterface
|
||||||
{
|
{
|
||||||
$this->checkIfUserIsOwner($tea);
|
$this->checkIfUserIsOwner($tea);
|
||||||
|
@ -79,9 +72,7 @@ class FrontEndEditorController extends ActionController
|
||||||
return $this->redirect('index');
|
return $this->redirect('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[Extbase\IgnoreValidation(['argumentName' => 'tea'])]
|
||||||
* @Extbase\IgnoreValidation("tea")
|
|
||||||
*/
|
|
||||||
public function newAction(?Tea $tea = null): ResponseInterface
|
public function newAction(?Tea $tea = null): ResponseInterface
|
||||||
{
|
{
|
||||||
// Note: We are using `makeInstance` here instead of `new` to allow for XCLASSing.
|
// Note: We are using `makeInstance` here instead of `new` to allow for XCLASSing.
|
||||||
|
@ -100,9 +91,7 @@ class FrontEndEditorController extends ActionController
|
||||||
return $this->redirect('index');
|
return $this->redirect('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[Extbase\IgnoreValidation(['argumentName' => 'tea'])]
|
||||||
* @Extbase\IgnoreValidation("tea")
|
|
||||||
*/
|
|
||||||
public function deleteAction(Tea $tea): ResponseInterface
|
public function deleteAction(Tea $tea): ResponseInterface
|
||||||
{
|
{
|
||||||
$this->checkIfUserIsOwner($tea);
|
$this->checkIfUserIsOwner($tea);
|
||||||
|
|
|
@ -14,12 +14,9 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||||
*/
|
*/
|
||||||
class TeaController extends ActionController
|
class TeaController extends ActionController
|
||||||
{
|
{
|
||||||
private TeaRepository $teaRepository;
|
public function __construct(
|
||||||
|
private readonly TeaRepository $teaRepository,
|
||||||
public function __construct(TeaRepository $teaRepository)
|
) {}
|
||||||
{
|
|
||||||
$this->teaRepository = $teaRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function indexAction(): ResponseInterface
|
public function indexAction(): ResponseInterface
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,22 +14,18 @@ use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||||
*/
|
*/
|
||||||
class Tea extends AbstractEntity
|
class Tea extends AbstractEntity
|
||||||
{
|
{
|
||||||
/**
|
#[Extbase\Validate(['validator' => 'StringLength', 'options' => ['maximum' => 255]])]
|
||||||
* @Extbase\Validate("StringLength", options={"maximum": 255})
|
#[Extbase\Validate(['validator' => 'NotEmpty'])]
|
||||||
* @Extbase\Validate("NotEmpty")
|
|
||||||
*/
|
|
||||||
protected string $title = '';
|
protected string $title = '';
|
||||||
|
|
||||||
/**
|
#[Extbase\Validate(['validator' => 'StringLength', 'options' => ['maximum' => 2000]])]
|
||||||
* @Extbase\Validate("StringLength", options={"maximum": 2000})
|
|
||||||
*/
|
|
||||||
protected string $description = '';
|
protected string $description = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var FileReference|null
|
* @var FileReference|null
|
||||||
* @phpstan-var FileReference|LazyLoadingProxy|null
|
* @phpstan-var FileReference|LazyLoadingProxy|null
|
||||||
* @Extbase\ORM\Lazy
|
|
||||||
*/
|
*/
|
||||||
|
#[Extbase\ORM\Lazy]
|
||||||
protected $image;
|
protected $image;
|
||||||
|
|
||||||
// Note: We cannot use `@var` for the more specific type annotation here as this confuses the Extbase type mapper.
|
// Note: We cannot use `@var` for the more specific type annotation here as this confuses the Extbase type mapper.
|
||||||
|
|
|
@ -16,3 +16,18 @@ install or upgrade some tool as the tool's dependencies conflict with the
|
||||||
dependencies on another library). It also allows running versions of tools
|
dependencies on another library). It also allows running versions of tools
|
||||||
that require a PHP version that is higher than the lowest allowed PHP version
|
that require a PHP version that is higher than the lowest allowed PHP version
|
||||||
for this project.
|
for this project.
|
||||||
|
|
||||||
|
.. _using-phive-to-install-phpcov:
|
||||||
|
|
||||||
|
Using PHIVE to install `phpunit/phpcov`
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
To support php version 7.4 and 8.2 in the `tea` extension, we are using PHIVE
|
||||||
|
to install `phpunit/phpcov`.
|
||||||
|
We need `phpunit/phpcov` in version 10 to support php 8.2.
|
||||||
|
Our minimum php version 7.4 would prevent the installation with composer.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
To find more information about install and usage,
|
||||||
|
please check out the documentation of `PHIVE <https://phar.io>`__.
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"docs": "https://docs.typo3.org/p/ttn/tea/main/en-us/"
|
"docs": "https://docs.typo3.org/p/ttn/tea/main/en-us/"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
|
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
|
||||||
"psr/http-message": "^1.0.1",
|
"psr/http-message": "^1.0.1",
|
||||||
"typo3/cms-core": "^12.4.26",
|
"typo3/cms-core": "^12.4.26",
|
||||||
"typo3/cms-extbase": "^12.4.26",
|
"typo3/cms-extbase": "^12.4.26",
|
||||||
|
@ -47,9 +47,10 @@
|
||||||
"typo3/cms-frontend": "^12.4.26"
|
"typo3/cms-frontend": "^12.4.26"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"brianium/paratest": "6.11.1",
|
||||||
"ergebnis/composer-normalize": "2.45.0",
|
"ergebnis/composer-normalize": "2.45.0",
|
||||||
"friendsofphp/php-cs-fixer": "3.68.5",
|
"friendsofphp/php-cs-fixer": "3.68.5",
|
||||||
"helmich/typo3-typoscript-lint": "3.1.1 || 3.2.1",
|
"helmich/typo3-typoscript-lint": "^3.3.0",
|
||||||
"icanhazstring/composer-unused": "0.8.11",
|
"icanhazstring/composer-unused": "0.8.11",
|
||||||
"php-parallel-lint/php-parallel-lint": "1.4.0",
|
"php-parallel-lint/php-parallel-lint": "1.4.0",
|
||||||
"phpmd/phpmd": "2.15.0",
|
"phpmd/phpmd": "2.15.0",
|
||||||
|
@ -63,9 +64,9 @@
|
||||||
"spaze/phpstan-disallowed-calls": "4.2.1",
|
"spaze/phpstan-disallowed-calls": "4.2.1",
|
||||||
"ssch/typo3-rector": "2.12.2",
|
"ssch/typo3-rector": "2.12.2",
|
||||||
"ssch/typo3-rector-testing-framework": "2.0.1",
|
"ssch/typo3-rector-testing-framework": "2.0.1",
|
||||||
"symfony/console": "5.4.47 || 6.4.17 || 7.2.1",
|
"symfony/console": "6.4.17 || 7.2.1",
|
||||||
"symfony/translation": "5.4.45 || 6.4.13 || 7.2.2",
|
"symfony/translation": "6.4.13 || 7.2.2",
|
||||||
"symfony/yaml": "5.4.45 || 6.4.18 || 7.2.3",
|
"symfony/yaml": "6.4.18 || 7.2.3",
|
||||||
"tomasvotruba/cognitive-complexity": "0.2.3",
|
"tomasvotruba/cognitive-complexity": "0.2.3",
|
||||||
"tomasvotruba/type-coverage": "1.0.0",
|
"tomasvotruba/type-coverage": "1.0.0",
|
||||||
"typo3/cms-fluid-styled-content": "^12.4.26",
|
"typo3/cms-fluid-styled-content": "^12.4.26",
|
||||||
|
@ -126,7 +127,7 @@
|
||||||
"ci:coverage:functional": [
|
"ci:coverage:functional": [
|
||||||
"@ci:tests:create-directories",
|
"@ci:tests:create-directories",
|
||||||
"@coverage:create-directories",
|
"@coverage:create-directories",
|
||||||
"phpunit -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=build/coverage/functional.cov Tests/Functional"
|
"paratest -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=build/coverage/functional.cov Tests/Functional"
|
||||||
],
|
],
|
||||||
"ci:coverage:merge": [
|
"ci:coverage:merge": [
|
||||||
"@coverage:create-directories",
|
"@coverage:create-directories",
|
||||||
|
@ -134,7 +135,7 @@
|
||||||
],
|
],
|
||||||
"ci:coverage:unit": [
|
"ci:coverage:unit": [
|
||||||
"@coverage:create-directories",
|
"@coverage:create-directories",
|
||||||
"phpunit -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=build/coverage/unit.cov Tests/Unit"
|
"paratest -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=build/coverage/unit.cov Tests/Unit"
|
||||||
],
|
],
|
||||||
"ci:json:lint": "find . ! -path '*/.cache/*' ! -path '*/.Build/*' ! -path '*/node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q",
|
"ci:json:lint": "find . ! -path '*/.cache/*' ! -path '*/.Build/*' ! -path '*/node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q",
|
||||||
"ci:php": [
|
"ci:php": [
|
||||||
|
@ -162,9 +163,9 @@
|
||||||
"ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests",
|
"ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests",
|
||||||
"ci:tests:functional": [
|
"ci:tests:functional": [
|
||||||
"@ci:tests:create-directories",
|
"@ci:tests:create-directories",
|
||||||
"find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \\\"Running functional test suite {}\\\"; .Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml {}';"
|
"paratest -c Build/phpunit/FunctionalTests.xml Tests/Functional"
|
||||||
],
|
],
|
||||||
"ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit",
|
"ci:tests:unit": "paratest -c Build/phpunit/UnitTests.xml Tests/Unit",
|
||||||
"ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
"ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
||||||
"ci:xliff:lint": "php Build/xliff/xliff-lint lint:xliff Resources/Private/Language",
|
"ci:xliff:lint": "php Build/xliff/xliff-lint lint:xliff Resources/Private/Language",
|
||||||
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint",
|
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint",
|
||||||
|
|
|
@ -7,7 +7,7 @@ $EM_CONF[$_EXTKEY] = [
|
||||||
'category' => 'example',
|
'category' => 'example',
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
'depends' => [
|
'depends' => [
|
||||||
'php' => '8.1.0-8.3.99',
|
'php' => '8.1.0-8.4.99',
|
||||||
'typo3' => '12.4.26-12.4.99',
|
'typo3' => '12.4.26-12.4.99',
|
||||||
'extbase' => '12.4.26-12.4.99',
|
'extbase' => '12.4.26-12.4.99',
|
||||||
'fluid' => '12.4.26-12.4.99',
|
'fluid' => '12.4.26-12.4.99',
|
||||||
|
|
|
@ -26,7 +26,7 @@ return RectorConfig::configure()
|
||||||
__DIR__ . '/ext_emconf.php',
|
__DIR__ . '/ext_emconf.php',
|
||||||
__DIR__ . '/ext_localconf.php',
|
__DIR__ . '/ext_localconf.php',
|
||||||
])
|
])
|
||||||
->withPhpVersion(PhpVersion::PHP_74)
|
->withPhpVersion(PhpVersion::PHP_81)
|
||||||
->withPhpSets(
|
->withPhpSets(
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
@ -94,7 +94,7 @@ return RectorConfig::configure()
|
||||||
])
|
])
|
||||||
->withImportNames(true, true, false)
|
->withImportNames(true, true, false)
|
||||||
->withConfiguredRule(ExtEmConfRector::class, [
|
->withConfiguredRule(ExtEmConfRector::class, [
|
||||||
ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.3.99',
|
ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.4.99',
|
||||||
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.26-12.4.99',
|
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.26-12.4.99',
|
||||||
ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [],
|
ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [],
|
||||||
])
|
])
|
||||||
|
|
Loading…
Add table
Reference in a new issue