Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .ddev/commands/web/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
## Description: Run functional tests
## Usage: test [phpunit-args]
## Example: "ddev test", "ddev test --filter clearCacheOptions"

cd /var/www/html
.Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml Tests/Functional "$@"
19 changes: 19 additions & 0 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: permission-sets
type: php
php_version: "8.4"
database:
type: mariadb
version: "10.11"
webserver_type: generic
router_http_port: "80"
router_https_port: "443"

hooks:
post-start:
- exec-host: ddev mysql --database=mysql -e "GRANT ALL ON \`typo3_%\`.* TO 'db'@'%'; FLUSH PRIVILEGES;"

web_environment:
- typo3DatabaseName=typo3
- typo3DatabaseHost=db
- typo3DatabaseUsername=db
- typo3DatabasePassword=db
69 changes: 69 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# EditorConfig is awesome: http://EditorConfig.org

# 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

# TS/JS-Files
[*.{ts,js}]
indent_size = 2

# JSON-Files
[*.json]
indent_style = tab

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

# Markdown-Files
[*.md]
max_line_length = 80

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

# NEON-Files
[*.neon]
indent_size = 2
indent_style = tab

#.eslintrc.json
[.eslintrc.json]
indent_size = 2
indent_style = space

# stylelint
[.stylelintrc]
indent_size = 2

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

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

# XLF-Files
[*.xlf]
indent_style = tab

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

# .htaccess
[{_.htaccess,.htaccess}]
indent_style = tab
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.gitattributes export-ignore
/.ddev export-ignore
/Tests/ export-ignore
/Build/ export-ignore
/.gitignore export-ignore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
label: clear all cache
settings:
TCEMAIN:
clearCache: all
options:
clearCache:
all: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
label: TCEMAIN clear cache cmd
settings:
TCEMAIN:
clearCacheCmd: all
1 change: 0 additions & 1 deletion Build/php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
'declare_strict_types' => true,
])
->setUsingCache(false);

15 changes: 14 additions & 1 deletion Tests/Functional/AttachPermissionsToGroupsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,19 @@ public function clearAllCacheSettings(): void
$attachPermissionsToGroups = GeneralUtility::makeInstance(AttachPermissionsToGroups::class);
$attachPermissionsToGroups($event);
$modGroup = $event->getGroups()[0];
self::assertStringContainsString('TCEMAIN.clearCache = all', $modGroup['TSconfig']);
self::assertStringContainsString('options.clearCache.all = 1', $modGroup['TSconfig']);
}

#[Test]
public function tcemainClearCacheCmd(): void
{
$group = $this->emptyGroup;
$group['permission_sets'] = 'b13/permission-sets-examples/tcemain-clear-cache-cmd';
$event = new AfterGroupsResolvedEvent('be_groups', [$group], [1], []);
$attachPermissionsToGroups = GeneralUtility::makeInstance(AttachPermissionsToGroups::class);
$attachPermissionsToGroups($event);
$modGroup = $event->getGroups()[0];
self::assertStringContainsString('TCEMAIN.clearCacheCmd = all', $modGroup['TSconfig']);
}

}
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
}
},
"require-dev": {
"typo3/cms-dashboard": "^12.4 || ^13.4 || ^14.3",
"b13/permission-sets-examples": "1.0.0",
"saschaegerer/phpstan-typo3": "^1.8 || ^2.0",
"typo3/coding-standards": "^0.8.0",
"typo3/testing-framework": "^8.0 || ^9.0",
"b13/permission-sets-examples": "1.0.0"
"typo3/cms-dashboard": "^12.4 || ^13.4 || ^14.3",
"typo3/coding-standards": "^0.8",
"typo3/testing-framework": "^8.0 || ^9.0"
},
"config": {
"vendor-dir": ".Build/vendor",
Expand Down
Loading