Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'TASK/use-development-php.ini-on-gitlab-ci' of https://g…
Browse files Browse the repository at this point in the history
…ithub.com/FriendsOfTYPO3/tea into TASK/use-development-php.ini-on-gitlab-ci

# Conflicts:
#	.gitlab/pipeline/jobs/.default.yml
linxpinx committed Oct 7, 2024
2 parents 0e4ef2e + e0d32f4 commit 8555b7e
Showing 10 changed files with 129 additions and 131 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -83,6 +83,7 @@ jobs:
- "json:lint"
- "php:cs-fixer"
- "php:mess"
- "php:rector"
- "php:sniff"
- "php:stan"
- "typoscript:lint"
@@ -326,6 +327,7 @@ jobs:
documentation:
name: Documentation
runs-on: ubuntu-24.04
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v4
17 changes: 9 additions & 8 deletions .gitlab/pipeline/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ stages:

include:
- '/.gitlab/pipeline/jobs/.composer-update.yml'
- '/.gitlab/pipeline/jobs/.default.yml'
- '/.gitlab/pipeline/jobs/.default-frontend.yml'
- '/.gitlab/pipeline/jobs/.default.yml'
- '/.gitlab/pipeline/jobs/.variables.yml'
- '/.gitlab/pipeline/jobs/build-composer-dependencies.yml'
- '/.gitlab/pipeline/jobs/composer-normalize.yml'
@@ -20,36 +20,37 @@ include:
- '/.gitlab/pipeline/jobs/func-php8.0-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/func-php8.1-v11-highest.yml'
- '/.gitlab/pipeline/jobs/func-php8.1-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/func-php8.2-v11-highest.yml'
- '/.gitlab/pipeline/jobs/func-php8.2-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/func-php8.1-v12-highest.yml'
- '/.gitlab/pipeline/jobs/func-php8.1-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/func-php8.2-v11-highest.yml'
- '/.gitlab/pipeline/jobs/func-php8.2-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/func-php8.2-v12-highest.yml'
- '/.gitlab/pipeline/jobs/func-php8.2-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/javascript-lint.yml'
- '/.gitlab/pipeline/jobs/json-lint.yml'
- '/.gitlab/pipeline/jobs/php-cs-fixer.yml'
- '/.gitlab/pipeline/jobs/php-lint-php7.4.yml'
- '/.gitlab/pipeline/jobs/php-lint-php8.0.yml'
- '/.gitlab/pipeline/jobs/php-lint-php8.1.yml'
- '/.gitlab/pipeline/jobs/php-lint-php8.2.yml'
- '/.gitlab/pipeline/jobs/php-lint-php8.3.yml'
- '/.gitlab/pipeline/jobs/phpcs.yml'
- '/.gitlab/pipeline/jobs/php-cs-fixer.yml'
- '/.gitlab/pipeline/jobs/rector.yml'
- '/.gitlab/pipeline/jobs/typoscript-lint.yml'
- '/.gitlab/pipeline/jobs/unit-php7.4-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php7.4-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.0-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.0-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.1-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.1-v12-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.1-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v12-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v12-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/xliff-lint.yml'
4 changes: 2 additions & 2 deletions .gitlab/pipeline/jobs/.default.yml
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@
- bash .gitlab/build/docker_install.sh > /dev/null
variables:
PHP_INI_SCAN_DIR: "/etc/php"
script:
- cp $CI_PROJECT_DIR/.gitlab/pipeline/ci/php.ini /usr/local/etc/php/php.ini; # copy php.ini into image
script:
- cp $CI_PROJECT_DIR/.gitlab/pipeline/ci/php.ini /usr/local/etc/php/php.ini; # copy php.ini into image
11 changes: 11 additions & 0 deletions .gitlab/pipeline/jobs/rector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
rector:
extends: .default
stage: codestyle
needs:
- build-composer-dependencies
- php-lint-php7.4
- php-lint-php8.0
- php-lint-php8.1
- php-lint-php8.2
script:
- composer ci:php:rector
2 changes: 1 addition & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ continuous integration.

Introduction
PHPVersionSupport
TestingFramework
ReleaseBranchingStrategy
Environment
DependencyManager
Running
65 changes: 65 additions & 0 deletions Documentation/ReleaseBranchingStrategy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.. include:: /Includes.rst.txt

.. _release-branching-strategy:

==============================
Release and Branching Strategy
==============================

When maintaining TYPO3 extensions, developers often need to support multiple
TYPO3 Long-Term Support (LTS) versions simultaneously. This typically requires
a clear release and branching strategy to manage development and maintenance
across different TYPO3 versions.

There are two common strategies for managing branches when supporting multiple
TYPO3 LTS versions.

.. contents:: Table of Contents:
:backlinks: top
:class: compact-list
:depth: 2
:local:

.. _release-branching-strategy-one-branch:

Approach 1: One branch for multiple TYPO3 LTS versions
======================================================

In this approach, there is a single main branch that receives new features and
updates, while supporting multiple TYPO3 LTS versions at the same time.

The downside of this approach is that it may require some version-dependent
code switches, which can increase complexity. However, the major advantage is
that there is only one branch to maintain, making it easier to implement new
features and code changes across all supported TYPO3 versions.

This approach simplifies the maintenance of the extension and is preferred when
minimizing maintenance overhead is the primary concern.

.. _release-branching-strategy-multiple-branches:

Approach 2: Separate branch per TYPO3 LTS version
=================================================

In this approach, there is one main branch for each TYPO3 LTS version. This
means that each branch exclusively supports a single TYPO3 LTS version.

The advantage here is that version-specific code can be used without requiring
version-dependent switches, reducing complexity in the codebase. However, this
approach increases the maintenance burden, as any new features or updates must
be applied to each branch individually.

This approach may be necessary when there are significant differences between
TYPO3 LTS versions or when you want to avoid version-dependent code.

.. _release-strategy-conclusion:

Conclusion
==========

The appropriate release and branching strategy depends on the specific
requirements of the extension and the TYPO3 versions you are supporting. If
reducing maintenance complexity is a priority, using a single branch for
multiple versions is often the better choice. However, if you need to tailor
your extension for each version, a separate branch for each version may be more
suitable.
57 changes: 0 additions & 57 deletions Documentation/TestingFramework.rst

This file was deleted.

9 changes: 9 additions & 0 deletions Tests/Functional/Domain/Repository/TeaRepositoryTest.php
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
use TTN\Tea\Domain\Repository\TeaRepository;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

/**
@@ -31,6 +32,14 @@ protected function setUp(): void
$this->subject = $this->get(TeaRepository::class);
}

/**
* @test
*/
public function isRepository(): void
{
self::assertInstanceOf(Repository::class, $this->subject);
}

/**
* @test
*/
39 changes: 0 additions & 39 deletions Tests/Unit/Domain/Repository/TeaRepositoryTest.php

This file was deleted.

54 changes: 30 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -47,31 +47,31 @@
"typo3/cms-frontend": "^11.5.4 || ^12.4.2"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.43.0",
"friendsofphp/php-cs-fixer": "^3.64.0",
"helmich/typo3-typoscript-lint": "^3.1.1",
"icanhazstring/composer-unused": "^0.8.11",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpmd/phpmd": "^2.15.0",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^1.12.3",
"phpstan/phpstan-phpunit": "^1.4.0",
"phpstan/phpstan-strict-rules": "^1.6.0",
"phpunit/phpunit": "^9.6.20",
"saschaegerer/phpstan-typo3": "^1.10.2",
"seld/jsonlint": "^1.11.0",
"spaze/phpstan-disallowed-calls": "^3.4",
"squizlabs/php_codesniffer": "^3.10.3",
"ssch/typo3-rector": "^2.6.5",
"ssch/typo3-rector-testing-framework": "^2.0.1",
"symfony/console": "^5.4 || ^6.4 || ^7.0",
"symfony/translation": "^5.4 || ^6.4 || ^7.0",
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
"tomasvotruba/cognitive-complexity": "^0.2.3",
"tomasvotruba/type-coverage": "^0.3.1",
"ergebnis/composer-normalize": "2.44.0",
"friendsofphp/php-cs-fixer": "3.64.0",
"helmich/typo3-typoscript-lint": "3.1.1",
"icanhazstring/composer-unused": "0.8.11",
"php-parallel-lint/php-parallel-lint": "1.4.0",
"phpmd/phpmd": "2.15.0",
"phpstan/extension-installer": "1.4.3",
"phpstan/phpstan": "1.12.6",
"phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan-strict-rules": "1.6.1",
"phpunit/phpunit": "9.6.20",
"saschaegerer/phpstan-typo3": "1.10.2",
"seld/jsonlint": "1.11.0",
"spaze/phpstan-disallowed-calls": "3.4.0",
"squizlabs/php_codesniffer": "3.10.3",
"ssch/typo3-rector": "2.9.2",
"ssch/typo3-rector-testing-framework": "2.0.1",
"symfony/console": "^5.4.44 || ^6.4.12 || ^7.1.5",
"symfony/translation": "^5.4.44 || ^6.4.12 || ^7.1.5",
"symfony/yaml": "^5.4.44 || ^6.4.12 || ^7.1.5",
"tomasvotruba/cognitive-complexity": "0.2.3",
"tomasvotruba/type-coverage": "1.0.0",
"typo3/cms-fluid-styled-content": "^11.5.4 || ^12.4.2",
"typo3/coding-standards": "^0.6.1 || ^0.8.0",
"typo3/testing-framework": "^7.1.0",
"typo3/coding-standards": "0.6.1 || 0.8.0",
"typo3/testing-framework": "7.1.0",
"webmozart/assert": "^1.11.0"
},
"replace": {
@@ -147,6 +147,7 @@
"ci:php:cs-fixer": "php-cs-fixer fix --config .php-cs-fixer.php -v --dry-run --diff",
"ci:php:lint": "parallel-lint .*.php *.php Classes Configuration Tests",
"ci:php:mess": "phpmd Classes text Build/phpmd/phpmd.xml",
"ci:php:rector": "rector --dry-run",
"ci:php:sniff": "phpcs --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
"ci:php:stan": "phpstan --no-progress -v",
"ci:static": [
@@ -155,6 +156,7 @@
"@ci:json:lint",
"@ci:php:cs-fixer",
"@ci:php:lint",
"@ci:php:rector",
"@ci:php:sniff",
"@ci:php:stan",
"@ci:typoscript:lint",
@@ -174,10 +176,12 @@
"docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation",
"fix:composer:normalize": "@composer normalize --no-check-lock",
"fix:php": [
"@fix:php:rector",
"@fix:php:cs",
"@fix:php:sniff"
],
"fix:php:cs": "php-cs-fixer fix --config .php-cs-fixer.php",
"fix:php:rector": "rector",
"fix:php:sniff": "phpcbf --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
"phpstan:baseline": "phpstan --generate-baseline --allow-empty-baseline",
"prepare-release": [
@@ -218,6 +222,7 @@
"ci:php:cs-fixer": "Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).",
"ci:php:lint": "Lints the PHP files for syntax errors.",
"ci:php:mess": "Runs PHP mess detection.",
"ci:php:rector": "Checks for code for changes by Rector.",
"ci:php:sniff": "Checks the code style with PHP_CodeSniffer (PHPCS).",
"ci:php:stan": "Checks the PHP types using PHPStan.",
"ci:static": "Runs all static code checks (syntax, style, types).",
@@ -232,6 +237,7 @@
"fix:composer:normalize": "Normalizes composer.json file content.",
"fix:php": "Runs all fixers for the PHP code.",
"fix:php:cs": "Fixes the code style with PHP-CS-Fixer.",
"fix:php:rector": "Updates the code with Rector.",
"fix:php:sniff": "Fixes the code style with PHP_CodeSniffer.",
"phpstan:baseline": "Updates the PHPStan baseline file to match the code.",
"prepare-release": "Removes development-only files in preparation of a TER release."

0 comments on commit 8555b7e

Please sign in to comment.