Skip to content

Commit 71e1895

Browse files
committed
Merge branch '12.x'
2 parents 8935d27 + 39e62b8 commit 71e1895

568 files changed

Lines changed: 9875 additions & 96097 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trim_trailing_whitespace = true
1414

1515
# TS/JS-Files
1616
[*.{ts,js}]
17-
indent_size = 2
17+
indent_size = 4
1818

1919
# JSON-Files
2020
[*.json]

.eslintrc.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"globals": {
7+
"YAHOO": "readonly",
8+
"TYPO3": "readonly",
9+
"extbaseModeling_wiringEditorLanguage": "readonly"
10+
},
11+
"extends": ["eslint:recommended"],
12+
"parserOptions": {
13+
"ecmaVersion": 2020
14+
},
15+
"rules": {
16+
"indent": ["error", 4],
17+
"quotes": ["error", "single"],
18+
"semi": ["error", "always"],
19+
"no-unused-vars": ["warn"],
20+
"no-console": ["warn"],
21+
"eqeqeq": ["error", "always"],
22+
"curly": ["error", "all"]
23+
},
24+
"ignorePatterns": [
25+
".Build/",
26+
"node_modules/",
27+
"Resources/Public/jsDomainModeling/wireit/"
28+
]
29+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/.* export-ignore
77
/crowdin.yaml export-ignore
88
/docker-compose.yml export-ignore
9+
/rector.php export-ignore

.github/workflows/linters.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,23 @@ on:
1515
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1616
jobs:
1717
rectortest:
18-
# The type of runner that the job will run on
1918
runs-on: ubuntu-latest
2019

21-
# Steps represent a sequence of tasks that will be executed as part of the job
2220
steps:
23-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24-
- uses: actions/checkout@v4
21+
- name: "Checkout code"
22+
uses: actions/checkout@v4
23+
24+
- name: "Setup PHP"
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: 8.3
28+
coverage: none
29+
30+
- name: "Install dependencies"
31+
run: composer install --prefer-dist --no-progress --no-interaction
2532

26-
# Runs a single command using the runners shell
27-
- name: "Run a one-line script"
28-
run: echo This should run the rector test. This is not implemented yet
33+
- name: "Run Rector (dry-run)"
34+
run: .Build/bin/rector process --dry-run
2935

3036
sass-linter:
3137
# The type of runner that the job will run on
@@ -40,10 +46,10 @@ jobs:
4046
- name: "Setup Node"
4147
uses: actions/setup-node@v3
4248
with:
43-
node-version: 16.x
49+
node-version: 20.x
4450

4551
- name: "Run npm ci"
4652
run: npm ci
4753

4854
- name: "Run npm sass-linter"
49-
run: npm run sass-lint
55+
run: npm run lint:scss

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
fail-fast: true
1717
matrix:
1818
os: [ubuntu-latest]
19-
php: [7.4, 8.0, 8.1, 8.2, 8.3]
20-
typo3: [^11.5]
19+
php: [8.3]
20+
typo3: [^12.4]
2121

2222
name: P${{ matrix.php }} - T${{ matrix.typo3 }}
2323

@@ -39,7 +39,7 @@ jobs:
3939
coverage: none
4040

4141
- name: "Install dependencies"
42-
run: composer require "typo3/minimal:${{ matrix.typo3 }}" --prefer-dist --no-progress --no-suggest --no-interaction
42+
run: composer require "typo3/minimal:${{ matrix.typo3 }}" --prefer-dist --no-progress --no-interaction
4343

4444
- name: "Check PHP syntax errors"
4545
run: find . -name \*.php ! -path "./.Build/*" -print0 | xargs -0 -n1 -P4 php -d display_errors=stderr -n -l > /dev/null

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/.idea*
22
/.Build/
33
*node_modules*
4+
/dist/
5+
/Resources/Public/JavaScript/
46
/var/
57
.DS_Store
68
/composer.lock
@@ -29,3 +31,13 @@ sass-lint.html
2931
.devbox/.ddev/providers/
3032
.devbox/.ddev/xhprof/
3133
.devbox/.ddev/composer.lock
34+
.claude
35+
.firecrawl
36+
tickets
37+
38+
.env
39+
40+
# Playwright E2E
41+
Tests/E2E/.auth/
42+
playwright-report/
43+
test-results/

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.Build/
2+
node_modules/
3+
package-lock.json
4+
Resources/Public/jsDomainModeling/wireit/
5+
vendor/

.prettierrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": false,
4+
"singleQuote": true,
5+
"semi": true,
6+
"trailingComma": "es5",
7+
"printWidth": 120,
8+
"overrides": [
9+
{
10+
"files": ["*.scss", "*.css"],
11+
"options": {
12+
"singleQuote": false
13+
}
14+
}
15+
]
16+
}

.stylelintrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": ["stylelint-config-standard"],
3+
"rules": {
4+
"color-hex-length": "short",
5+
"selector-class-pattern": null,
6+
"selector-id-pattern": null,
7+
"no-descending-specificity": null,
8+
"declaration-empty-line-before": null
9+
},
10+
"ignoreFiles": [
11+
".Build/**",
12+
"node_modules/**"
13+
]
14+
}

Classes/Configuration/ExtensionBuilderConfigurationManager.php

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@
1919

2020
use EBT\ExtensionBuilder\Domain\Model\Extension;
2121
use EBT\ExtensionBuilder\Utility\SpycYAMLParser;
22-
use Psr\Http\Message\ResponseInterface;
23-
use Psr\Http\Message\ServerRequestInterface;
24-
use TYPO3\CMS\Backend\Routing\Exception\RouteNotFoundException;
25-
use TYPO3\CMS\Backend\Routing\UriBuilder;
2622
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException;
2723
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException;
2824
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
2925
use TYPO3\CMS\Core\Core\Environment;
30-
use TYPO3\CMS\Core\Http\JsonResponse;
3126
use TYPO3\CMS\Core\SingletonInterface;
3227
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
3328
use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -54,12 +49,11 @@ class ExtensionBuilderConfigurationManager implements SingletonInterface
5449
const DEFAULT_TEMPLATE_ROOTPATH = 'EXT:extension_builder/Resources/Private/CodeTemplates/Extbase/';
5550
private array $inputData = [];
5651

57-
protected ConfigurationManagerInterface $configurationManager;
58-
59-
public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager): void
60-
{
61-
$this->configurationManager = $configurationManager;
62-
}
52+
public function __construct(
53+
private readonly ConfigurationManagerInterface $configurationManager,
54+
private readonly ExtensionConfiguration $extensionConfiguration,
55+
private readonly DataMapper $dataMapper,
56+
) {}
6357

6458
/**
6559
* Wrapper for file_get_contents('php://input')
@@ -133,7 +127,7 @@ public function getSettings(?array $typoscript = null): array
133127
*/
134128
public function getExtensionBuilderSettings(): array
135129
{
136-
return GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('extension_builder');
130+
return $this->extensionConfiguration->get('extension_builder');
137131
}
138132

139133
public function getExtensionSettings(string $extensionKey, string $extensionStoragePath): array
@@ -182,7 +176,7 @@ public static function getExtensionBuilderJson(string $extensionKey, ?string $st
182176
*/
183177
public function getPersistenceTable(string $className): string
184178
{
185-
return GeneralUtility::makeInstance(DataMapper::class)->getDataMap($className)->getTableName();
179+
return $this->dataMapper->getDataMap($className)->getTableName();
186180
}
187181

188182
/**
@@ -466,34 +460,4 @@ public function getParentClassForEntityObject(Extension $extension): string
466460
'\\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity';
467461
}
468462

469-
/**
470-
* Ajax callback that reads the smd file and modiefies the target URL to include
471-
* the module token.
472-
*
473-
* @param ServerRequestInterface $request
474-
* @return JsonResponse
475-
* @throws RouteNotFoundException
476-
*/
477-
public function getWiringEditorSmd(ServerRequestInterface $request): JsonResponse
478-
{
479-
$smdJsonString = file_get_contents(
480-
ExtensionManagementUtility::extPath('extension_builder') . 'Resources/Public/jsDomainModeling/phpBackend/WiringEditor.smd'
481-
);
482-
$smdJson = json_decode($smdJsonString);
483-
$parameters = [
484-
'tx_extensionbuilder_tools_extensionbuilderextensionbuilder' => [
485-
'controller' => 'BuilderModule',
486-
'action' => 'dispatchRpc',
487-
]
488-
];
489-
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
490-
try {
491-
$uri = $uriBuilder->buildUriFromRoute('tools_ExtensionBuilderExtensionbuilder', $parameters);
492-
} catch (RouteNotFoundException $e) {
493-
$uri = $uriBuilder->buildUriFromRoutePath('tools_ExtensionBuilderExtensionbuilder', $parameters);
494-
}
495-
$smdJson->target = (string)$uri;
496-
497-
return (new JsonResponse())->setPayload((array)$smdJson);
498-
}
499463
}

0 commit comments

Comments
 (0)