Skip to content

Commit efb0cfc

Browse files
lukadschaakjdreesenMarkTromike4git
committed
Initial Commit
Co-authored-by: Jacob Dreesen <j.dreesen@neusta.de> Co-authored-by: Markus Tröger <m.troeger@neusta.de> Co-authored-by: Michael Albrecht <m.albrecht@neusta.de>
0 parents  commit efb0cfc

File tree

132 files changed

+5811
-0
lines changed

Some content is hidden

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

132 files changed

+5811
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{json,yaml,yml}]
12+
indent_size = 2
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.neon]
18+
indent_style = tab

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/.editorconfig export-ignore
2+
/.gitattributes export-ignore
3+
/.github/ export-ignore
4+
/.gitignore export-ignore
5+
/.gitlab-ci.yml export-ignore
6+
/.gitlab-ci/ export-ignore
7+
/.php-cs-fixer.php export-ignore
8+
/bin/ export-ignore
9+
/compose.yaml export-ignore
10+
/docs/ export-ignore
11+
/phpstan-baseline.neon export-ignore
12+
/phpstan.neon export-ignore
13+
/phpunit.xml.dist export-ignore
14+
/sonar-project.properties export-ignore
15+
/tests/ export-ignore

.github/workflows/qa.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Quality Assurance
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
schedule:
10+
- cron: "10 4 * * 2" # Every Tuesday at 4:10 AM UTC
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
qa:
17+
name: Quality Checks
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Git Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: PHP Setup
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: 8.3
28+
29+
- name: Validate composer.json
30+
run: composer validate --strict
31+
32+
- name: Install dependencies
33+
uses: ramsey/composer-install@v2
34+
35+
- name: Check CS-Fixer
36+
run: composer cs:check
37+
38+
- name: Check PHPStan
39+
run: composer phpstan

.github/workflows/tests.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
schedule:
10+
- cron: "10 4 * * 2" # Every Tuesday at 4:10 AM UTC
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
tests:
17+
name: PHPUnit with PHP ${{ matrix.php-version }} ${{ matrix.dependencies }}
18+
runs-on: ubuntu-latest
19+
20+
# from https://ldarren.medium.com/number-of-ways-to-setup-database-in-github-actions-2cd48df9faae
21+
services:
22+
db:
23+
image: mariadb:10.11.11
24+
env:
25+
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
26+
MYSQL_DATABASE: 'pimcore'
27+
MYSQL_USER: 'pimcore'
28+
MYSQL_PASSWORD: 'pimcore'
29+
options: >-
30+
--health-cmd="healthcheck.sh --connect --innodb_initialized"
31+
--health-interval=10s
32+
--health-timeout=5s
33+
--health-retries=3
34+
ports:
35+
- 3306:3306
36+
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- php-version: "8.1"
42+
dependencies: "lowest" # Pimcore 11.0.0
43+
- php-version: "8.1"
44+
dependencies: "highest" # Pimcore 11.*
45+
- php-version: "8.2"
46+
dependencies: "highest" # Pimcore 11.*
47+
- php-version: "8.3"
48+
dependencies: "highest" # Pimcore 11.*
49+
50+
steps:
51+
- name: Git Checkout
52+
uses: actions/checkout@v4
53+
54+
- name: PHP Setup
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: ${{ matrix.php-version }}
58+
59+
- name: Install dependencies
60+
uses: ramsey/composer-install@v3
61+
with:
62+
dependency-versions: ${{ matrix.dependencies }}
63+
composer-options: ${{ matrix.composer-options }}
64+
65+
- name: Add Pimcore Admin UI
66+
run: composer require --dev pimcore/admin-ui-classic-bundle --no-interaction
67+
if: matrix.dependencies == 'highest'
68+
69+
- name: Execute tests
70+
run: composer tests
71+
env:
72+
MYSQL_HOST: '127.0.0.1'
73+
MYSQL_SERVER_VERSION: '10.11.11-MariaDB'

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Composer
2+
/composer.lock
3+
/vendor/
4+
5+
# Docker Compose
6+
/compose.override.yaml
7+
8+
# PHP-CS-Fixer
9+
/.php-cs-fixer.cache
10+
11+
# PHPUnit
12+
/.phpunit.result.cache
13+
/.phpunit.cache/
14+
/reports/

.php-cs-fixer.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
/*
4+
* This document has been initially generated with
5+
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.5.0|configurator
6+
* and then adapted to our needs
7+
*/
8+
9+
return (new PhpCsFixer\Config)
10+
->setFinder((new PhpCsFixer\Finder)
11+
->in([
12+
__DIR__ . '/src',
13+
__DIR__ . '/tests',
14+
])
15+
->notPath(['DependencyInjection/Configuration.php', 'app/var'])
16+
)
17+
->setRiskyAllowed(true)
18+
->setRules([
19+
'@Symfony' => true,
20+
'@Symfony:risky' => true,
21+
22+
// declare strict types must be on first line after opening tag
23+
'blank_line_after_opening_tag' => false, // overwrite @Symfony
24+
'linebreak_after_opening_tag' => false, // overwrite @Symfony
25+
'declare_strict_types' => true, // custom
26+
27+
// allow throw's in multiple lines, so message can be a long string
28+
'single_line_throw' => false, // overwrite @Symfony
29+
30+
// we want spaces
31+
'concat_space' => ['spacing' => 'one'], // overwrite @Symfony
32+
33+
// we want to leave the choice to the developer,
34+
// because some people have their own style of naming test methods
35+
'php_unit_method_casing' => false, // overwrite @Symfony
36+
37+
// we want to leave the choice to the developer
38+
'php_unit_test_annotation' => false, // overwrite @Symfony:risky
39+
]);

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
## 1.0.0
4+
5+
- feature: Initial Version
6+
- feature: Add configurable BatchCommand for Symfony commands
7+
- feature: Filters
8+
- feature: Add helper methods for Tag assignment & creation
9+
- feature: Filesize calculation (in SI and IEC format)
10+
- feature: Add new static wrapper for `Pimcore\SystemSettingsConfig`: `Neusta\Pimcore\ToolboxBundle\Wrapper\SystemSettingsConfig`
11+
- feature: SnippetRepository and Thumbnail Config
12+
- feature: Add helper for folder management (repositories & factories for (`Asset`, `DataObject`, `Document`) folders)
13+
- feature: Add `Neusta\Pimcore\ToolboxBundle\Repository\PageRepository`
14+
- feature: Add wrapper for `Pimcore\Tool\Frontend`: `Neusta\Pimcore\ToolboxBundle\Wrapper\Frontend`
15+
- feature: Add wrapper for `Pimcore\Model\Element\Tag`: `Neusta\Pimcore\ToolboxBundle\Wrapper\Model\Element\Tag`
16+
- feature: Add wrapper for `Pimcore\Model\Site`: `Neusta\Pimcore\ToolboxBundle\Wrapper\Model\Site`
17+
- feature: Add `Neusta\Pimcore\ToolboxBundle\Service\LocaleService` for retrieving the locale via the request or a backend user
18+
- feature: Add wrapper for `Pimcore\Tool\Admin`: `Neusta\Pimcore\ToolboxBundle\Wrapper\Admin`
19+
- feature: Repositories for Classification values
20+
- feature: Factories for Classification values
21+
- feature: Add wrapper for Pimcore's static methods
22+
- feature: Add repositories for Pimcore's static methods of finding documents, assets and data objects

0 commit comments

Comments
 (0)