Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9a6065f
chore(ci): add GitHub workflows for CGL, tests and TER release
konradmichalik Apr 20, 2026
a55be2b
chore: add CGL toolchain (PHP CS Fixer, PHPStan, Rector, EditorConfig)
konradmichalik Apr 20, 2026
215a625
chore: add PHPUnit configuration and unit test directory
konradmichalik Apr 20, 2026
38abfa4
chore: add EditorConfig, packaging excludes and version bumper config
konradmichalik Apr 20, 2026
a85428e
docs: add contributing guidelines
konradmichalik Apr 20, 2026
6b017b1
chore: add composer scripts, dev-dependencies and update gitignore
konradmichalik Apr 20, 2026
729ceb2
chore(ci): remove TER release workflow
konradmichalik Apr 20, 2026
ef6901a
Merge remote-tracking branch 'origin/main' into chore/project-infrast…
konradmichalik Apr 20, 2026
dce0500
docs: add fork notice to README
konradmichalik Apr 20, 2026
305aecc
docs: restructure README with GitHub highlights and sections
konradmichalik Apr 20, 2026
d5eb9da
docs: update composer name in install instructions, simplify credits
konradmichalik Apr 20, 2026
0475ec0
fix: resolve all PHPStan level 8 errors
konradmichalik Apr 21, 2026
36847ac
test: add unit tests for events and event listeners
konradmichalik Apr 21, 2026
a81b846
chore: add project metadata, CI release workflow and tooling
konradmichalik Apr 21, 2026
33884ed
chore: normalize file headers and apply CGL formatting
konradmichalik Apr 21, 2026
51f0538
chore: update CGL tooling config, ddev template and ext_emconf
konradmichalik Apr 21, 2026
e3c7c00
refactor: remove dead code, duplicate headers and unused parameters
konradmichalik Apr 21, 2026
9bc3a40
docs: add extension icon to README, fix LICENSE link and PHP version …
konradmichalik Apr 21, 2026
3a704cf
docs: center README header with icon and add shields.io badges
konradmichalik Apr 21, 2026
5858035
docs: reduce extension icon size in README
konradmichalik Apr 21, 2026
0e63487
fix: declare php and psr/event-dispatcher as explicit dependencies
konradmichalik Apr 21, 2026
b24a887
chore: add composer.lock file
konradmichalik Apr 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .ddev/.setup/templates/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$supportedVersions = explode(' ', getenv('TYPO3_VERSIONS'));

// Check if composer.json exists
$composerJsonPath = __DIR__ . '/../composer.json';
$composerJsonPath = __DIR__.'/../composer.json';
if (file_exists($composerJsonPath)) {
$composerJsonContent = file_get_contents($composerJsonPath);
$composerData = json_decode($composerJsonContent, true);
Expand Down Expand Up @@ -42,7 +42,7 @@
<p>Run <code>ddev install all</code> to install all TYPO3 instances below:</p>
<?php
foreach ($supportedVersions as $version) {
$directoryPath = '/var/www/html/.Build/' . $version;
$directoryPath = '/var/www/html/.Build/'.$version;
if (is_dir($directoryPath)) {
echo "<article class='flex'><kbd>{$version}</kbd><div><strong>Frontend</strong><br/><strong>Backend</strong></div><div><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site'>https://{$version}.{$extensionKey}.ddev.site</a><br/><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site/typo3/?u={$typo3AdminUser}&p={$typo3AdminPassword}'>https://{$version}.{$extensionKey}.ddev.site/typo3</a></div></article>";
} else {
Expand All @@ -64,7 +64,7 @@
$filePath = $fileInfo->getPathname();
$fileName = $fileInfo->getFilename();

if ($fileName[0] === '.' || $fileInfo->isDir()) {
if ('.' === $fileName[0] || $fileInfo->isDir()) {
continue;
}

Expand Down
8 changes: 8 additions & 0 deletions .ddev/commands/web/cgl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e

## Description: Run CGL script for the package files
## Usage: cgl [command] [options]
## Example: ddev cgl lint\nddev cgl fix\nddev cgl migration\nddev cgl sca\nddev cgl lint:composer\nddev cgl fix:composer

composer -d /var/www/html/Tests/CGL "$@"
77 changes: 77 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# JS files
[*.js]
indent_size = 2

# JSON files
[*.json]
indent_style = tab

# package.json
[package.json]
indent_size = 2

# ReST files
[{*.rst,*.rst.txt}]
indent_size = 4
max_line_length = 80

# SQL files
[*.sql]
indent_style = tab
indent_size = 2

# TypoScript files
[*.{typoscript,tsconfig}]
indent_size = 2

# YAML files
[{*.yml,*.yaml}]
indent_size = 2

# XLF files
[*.xlf]
indent_style = tab

# .htaccess
[.htaccess]
indent_style = tab

# Markdown files
[*.md]
indent_style = unset
indent_size = unset
trim_trailing_whitespace = unset
insert_final_newline = unset

# phpstan.neon
[*.neon]
indent_style = tab

# Ignore paths
[/.ddev/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

[/Documentation/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
21 changes: 18 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
* text=auto
/.gitattributes export-ignore
/.gitignore export-ignore
* text=auto
/.ddev export-ignore
/.github export-ignore
/Tests export-ignore
/Documentation export-ignore
/docs export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/CODEOWNERS export-ignore
/CODE_OF_CONDUCT.md export-ignore
/CONTRIBUTING.md export-ignore
/SECURITY.md export-ignore
/composer.lock export-ignore
/packaging_exclude.php export-ignore
/phpunit.xml export-ignore
/renovate.json export-ignore
/version-bumper.yaml export-ignore
9 changes: 9 additions & 0 deletions .github/workflows/cgl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: CGL
on:
push:
branches:
- '**'

jobs:
cgl:
uses: konradmichalik/reusable-github-actions/.github/workflows/cgl-test.yml@main
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Release
on:
push:
tags:
- '*'

jobs:
ter-publish:
uses: konradmichalik/reusable-github-actions/.github/workflows/release-typo3.yml@main
secrets:
typo3-api-token: ${{ secrets.TYPO3_API_TOKEN }}
with:
typo3-extension-key: 'repeatable_form_elements'
13 changes: 13 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Tests
on:
push:
branches:
- '**'

jobs:
tests:
uses: konradmichalik/reusable-github-actions/.github/workflows/tests-typo3.yml@main
with:
php-versions: '["8.2", "8.3", "8.4", "8.5"]'
typo3-versions: '["13.4", "14.2"]'
dependencies: '["highest", "lowest"]'
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.Build/
.claude
.idea
/public
!Resources/Public
/vendor
/composer.lock
.Build/
/var
/Tests/CGL/vendor
.phpunit.result.cache
Tests/CGL/.php-cs-fixer.cache
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* km@move-elevator.de
7 changes: 7 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Code of Conduct

This project uses the
[TYPO3 Code of Conduct](https://typo3.org/community/values/code-of-conduct).

When you contribute to this project or interact with community members,
you agree to adhere to this code of conduct.
97 changes: 97 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Contributing

Thank you for considering contributing to this project! Every contribution is welcome and helps improve the quality of the project. To ensure a smooth process and maintain high code quality, please follow the steps below.

Please note that this project adheres to the [TYPO3 Code of Conduct](https://typo3.org/community/values/code-of-conduct). By participating, you are expected to uphold this code.

## Requirements

- [DDEV](https://ddev.readthedocs.io/en/stable/)

## Preparation

```bash
# Clone repository
git clone https://github.com/move-elevator/typo3-repeatable-form-elements.git
cd typo3-repeatable-form-elements

# Start the project with DDEV
ddev start

# Install dependencies
ddev composer install
```

## Run linters

```bash
# All linters
ddev cgl lint

# Specific linters
ddev cgl lint:composer
ddev cgl lint:editorconfig
ddev cgl lint:php

# Fix all CGL issues
ddev cgl fix

# Fix specific CGL issues
ddev cgl fix:composer
ddev cgl fix:editorconfig
ddev cgl fix:php
```

## Run static code analysis

```bash
# All static code analyzers
ddev cgl sca

# Specific static code analyzers
ddev cgl sca:php
```

## Run tests

```bash
# All tests
ddev composer test

# All tests with code coverage
ddev composer test:coverage
```

## TYPO3 Setup

For testing the extension, you need to set up the TYPO3 instances.

```bash
# Install all TYPO3 versions, which are supported by the extension
ddev install all

# Or install specific TYPO3 versions
ddev install 13

# Open the overview page
ddev launch

# Run TYPO3 specific commands
ddev 13 typo3 cache:flush
ddev 13 composer install
ddev all typo3 database:updateschema
```

## Workflow

1. Fork the repository and create a feature branch from `main`.
2. Make your changes and ensure all linters and tests pass.
3. Use descriptive commit messages following the conventional commits format: `<type>: <description>` (e.g. `feat: add nested repeatable container support`, `fix: resolve copy button state after removal`).

## Submit a pull request

After completing your work, **open a pull request** and provide a description of your changes. Ideally, your PR should reference an issue that explains the problem you are addressing.

All mentioned code quality tools will run automatically on every pull request. For more details, see the relevant [workflows][1].

[1]: .github/workflows
25 changes: 6 additions & 19 deletions Classes/Configuration/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
declare(strict_types=1);

/*
* This file is part of the TYPO3 CMS extension "repeatable_form_elements".
* This file is part of the "repeatable_form_elements" TYPO3 CMS extension.
*
* Copyright (C) 2018 Ralf Zimmermann dreistrom.land AG <r.zimmermann@dreistrom.land>
* Copyright (C) 2021 Elias Häußler <elias@haeussler.dev>
* (c) 2018-2026 Konrad Michalik <km@move-elevator.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace TRITUM\RepeatableFormElements\Configuration;
Expand All @@ -28,11 +17,9 @@
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

/**
* Extension
* Extension.
*
* @author Ralf Zimmermann | dreistrom.land AG <r.zimmermann@dreistrom.land>
* @author Elias Häußler <elias@haeussler.dev>
* @author Christian Seyfferth | dreistrom.land AG <c.seyfferth@dreistrom.land>
* @author Konrad Michalik <km@move-elevator.de>
* @license GPL-2.0-or-later
*/
final class Extension
Expand Down
19 changes: 13 additions & 6 deletions Classes/Event/AfterBuildingFinishedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@

declare(strict_types=1);

/*
* This file is part of the "repeatable_form_elements" TYPO3 CMS extension.
*
* (c) 2018-2026 Konrad Michalik <km@move-elevator.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace TRITUM\RepeatableFormElements\Event;

use TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface;

/**
* Dispatched after a form renderable has been built/copied by the repeatable container logic.
* AfterBuildingFinishedEvent.
*
* This event replaces the former SC_OPTIONS hook
* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['afterBuildingFinished']
* which was removed in TYPO3 v14 (Breaking #98239).
* @author Konrad Michalik <km@move-elevator.de>
*/
final class AfterBuildingFinishedEvent
final readonly class AfterBuildingFinishedEvent
{
public function __construct(
public readonly RenderableInterface $renderable,
public RenderableInterface $renderable,
) {}
}
Loading