Skip to content

Commit

Permalink
[TASK] Move all build configuration to .Build folder
Browse files Browse the repository at this point in the history
  • Loading branch information
derhansen committed Dec 17, 2023
1 parent 6d2c900 commit 3055cd3
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 120 deletions.
File renamed without changes.
48 changes: 48 additions & 0 deletions .Build/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "derhansen/sf_event_mgt_build",
"description": "composer.json for builds",
"repositories": [
{
"type": "path",
"url": "../"
}
],
"require": {
"derhansen/sf_event_mgt": "@dev",
"typo3/cms-core": "^12.4",
"php": ">=8.1"
},
"require-dev": {
"typo3/cms-composer-installers": "^5.0",
"typo3/cms-backend": "^12.4",
"typo3/cms-frontend": "^12.4",
"typo3/cms-extbase": "^12.4",
"typo3/cms-felogin": "^12.4",
"typo3/cms-fluid-styled-content": "^12.4",
"typo3/cms-fluid": "^12.4",
"typo3/cms-tstemplate": "^12.4",
"typo3/cms-install": "^12.4",
"typo3/cms-extensionmanager": "^12.4",
"typo3/testing-framework": "^8.0.0 || dev-main",
"friendsofphp/php-cs-fixer": "^3.12.0",
"saschaegerer/phpstan-typo3": "^1.8.3",
"phpstan/extension-installer": "^1.1",
"jangregor/phpstan-prophecy": "^1.0",
"codeception/codeception": "^5.0",
"codeception/module-webdriver": "^4.0",
"ericmartel/codeception-email": "^1.0",
"codeception/module-db": "^3.1"
},
"config": {
"allow-plugins": {
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true,
"phpstan/extension-installer": true
}
},
"autoload-dev": {
"psr-4": {
"DERHANSEN\\SfEventMgt\\Tests\\": "../Tests"
}
}
}
8 changes: 8 additions & 0 deletions .Build/documentation/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3'
services:
t3docmake:
image: ghcr.io/t3docs/render-documentation:latest
command: makehtml
volumes:
- ./:/PROJECT:ro
- ./Documentation-GENERATED-temp:/RESULT
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->in(dirname(__DIR__ . '/../../../'))
->exclude(['.Build', 'Documentation', 'Resources'])
->notName('ext_emconf.php')
);
20 changes: 10 additions & 10 deletions phpstan-baseline.neon → .Build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,50 @@ parameters:
-
message: "#^Parameter \\#2 \\$optionKey of method TYPO3\\\\CMS\\\\Extbase\\\\Property\\\\PropertyMappingConfiguration\\:\\:setTypeConverterOption\\(\\) expects string, int given\\.$#"
count: 1
path: Classes/Controller/EventController.php
path: ../../Classes/Controller/EventController.php

-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\QueryInterface\\:\\:between\\(\\)\\.$#"
count: 4
path: Classes/Domain/Repository/EventRepository.php
path: ../../Classes/Domain/Repository/EventRepository.php

-
message: "#^Call to static method TYPO3\\\\CMS\\\\Core\\\\Utility\\\\MathUtility\\:\\:canBeInterpretedAsFloat\\(\\) with string will always evaluate to false\\.$#"
count: 1
path: Classes/Evaluation/LatitudeEvaluator.php
path: ../../Classes/Evaluation/LatitudeEvaluator.php

-
message: "#^Call to static method TYPO3\\\\CMS\\\\Core\\\\Utility\\\\MathUtility\\:\\:canBeInterpretedAsFloat\\(\\) with string will always evaluate to false\\.$#"
count: 1
path: Classes/Evaluation/LongitudeEvaluator.php
path: ../../Classes/Evaluation/LongitudeEvaluator.php

-
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
count: 1
path: Classes/Service/FluidStandaloneService.php
path: ../../Classes/Service/FluidStandaloneService.php

-
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
count: 1
path: Classes/Service/NotificationService.php
path: ../../Classes/Service/NotificationService.php

-
message: "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#"
count: 1
path: Classes/ViewHelpers/PrefillViewHelper.php
path: ../../Classes/ViewHelpers/PrefillViewHelper.php

-
message: "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#"
count: 1
path: Classes/ViewHelpers/Registration/Field/PrefillFieldViewHelper.php
path: ../../Classes/ViewHelpers/Registration/Field/PrefillFieldViewHelper.php

-
message: "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#"
count: 1
path: Classes/ViewHelpers/Registration/Field/PrefillMultiValueFieldViewHelper.php
path: ../../Classes/ViewHelpers/Registration/Field/PrefillMultiValueFieldViewHelper.php

-
message: "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#"
count: 1
path: Classes/ViewHelpers/Validation/ErrorClassViewHelper.php
path: ../../Classes/ViewHelpers/Validation/ErrorClassViewHelper.php

4 changes: 2 additions & 2 deletions phpstan.neon → .Build/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ includes:
parameters:
level: 7
paths:
- Classes/
- Configuration/
- ../../Classes/
- ../../Configuration/

checkMissingIterableValueType: false
reportUnmatchedIgnoredErrors: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<coverage/>
<testsuites>
<testsuite name="Functional Tests">
<directory>../Functional/</directory>
<directory>../../Tests/Functional/</directory>
</testsuite>
</testsuites>
<source>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Build/UnitTests.xml → .Build/phpunit/UnitTests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<coverage/>
<testsuites>
<testsuite name="Unit Tests">
<directory>../Unit/</directory>
<directory>../../Tests/Unit/</directory>
</testsuite>
</testsuites>
<source>
Expand Down
56 changes: 0 additions & 56 deletions .editorconfig

This file was deleted.

12 changes: 8 additions & 4 deletions .github/workflows/AcceptanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ jobs:
run: |
sudo rm -rf ~/.composer
- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json
run: |
cd .Build
composer validate
- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -50,12 +52,14 @@ jobs:

- name: Install composer dependencies
run: |
cd .Build
composer install --no-progress
- name: Initialize TYPO3 environment
run: |
echo "Copy TYPO3 config to extension root path"
cp -R Tests/Acceptance/_data/config .
cp -R Tests/Acceptance/_data/config .Build/
cd .Build
echo "Run 'composer install' to activate extension"
composer install --no-progress
Expand Down Expand Up @@ -83,7 +87,7 @@ jobs:
while ! nc -z 127.0.0.1 8888 </dev/null; do echo Waiting for PHP server to start...; sleep 1; done
- name: Codeception Acceptance Tests
run: .Build/bin/codecept run acceptance --fail-fast --env=github-actions -c Tests/Build/AcceptanceTests.yml --html
run: .Build/vendor/bin/codecept run acceptance --fail-fast --env=github-actions -c .Build/codeception/AcceptanceTests.yml --html

- name: Upload Codeception output
if: ${{ always() }}
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/CodeQuality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
php-version: ${{ matrix.env.php }}
tools: composer:v2

- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json
run: |
cd .Build
composer validate
- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -34,12 +36,13 @@ jobs:

- name: Install composer dependencies
run: |
cd .Build
composer install --no-progress
- name: Validate PHP coding guidelines
run: |
.Build/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no
.Build/vendor/bin/php-cs-fixer fix --config=.Build/php-cs-fixer/.php-cs-fixer.php -v --dry-run --stop-on-violation --using-cache=no
- name: Run phpstan checks
run: |
.Build/bin/phpstan
.Build/vendor/bin/phpstan --configuration=.Build/phpstan/phpstan.neon
11 changes: 7 additions & 4 deletions .github/workflows/UnitFunctionalTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ jobs:
run: |
sudo rm -rf ~/.composer
- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json
run: |
cd .Build
composer validate
- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -44,12 +46,13 @@ jobs:

- name: Install composer dependencies
run: |
cd .Build
composer install --no-progress
- name: Unit tests
run: |
echo "Running unit tests";
.Build/bin/phpunit -c Tests/Build/UnitTests.xml
.Build/vendor/bin/phpunit -c .Build/phpunit/UnitTests.xml
- name: Functional tests
run: |
Expand All @@ -58,4 +61,4 @@ jobs:
export typo3DatabaseUsername="root";
export typo3DatabasePassword="root";
echo "Running functional tests";
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit -c Tests/Build/FunctionalTests.xml {}'
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/vendor/bin/phpunit -c .Build/phpunit/FunctionalTests.xml {}'
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.idea/
.DS_Store
.Build/
.Build/public
.Build/vendor
.Build/var/
composer.lock
.php-cs-fixer.cache
/var/
.phpunit.result.cache
docker-compose.yml
2 changes: 1 addition & 1 deletion Tests/Acceptance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

2. Execute Acceptance Testsuite

`.Build/bin/codecept run acceptance --env local -c Tests/Build/AcceptanceTests.yml`
`.Build/vendor/bin/codecept run acceptance --env local -c .Build/codeception/AcceptanceTests.yml`
34 changes: 1 addition & 33 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,6 @@
"require": {
"typo3/cms-core": "^12.4"
},
"require-dev": {
"typo3/cms-composer-installers": "^5.0",
"typo3/cms-backend": "^12.4",
"typo3/cms-frontend": "^12.4",
"typo3/cms-extbase": "^12.4",
"typo3/cms-felogin": "^12.4",
"typo3/cms-fluid-styled-content": "^12.4",
"typo3/cms-fluid": "^12.4",
"typo3/cms-tstemplate": "^12.4",
"typo3/cms-install": "^12.4",
"typo3/cms-extensionmanager": "^12.4",
"typo3/testing-framework": "^8.0.0 || dev-main",
"friendsofphp/php-cs-fixer": "^3.12.0",
"saschaegerer/phpstan-typo3": "^1.8.3",
"phpstan/extension-installer": "^1.1",
"jangregor/phpstan-prophecy": "^1.0",
"codeception/codeception": "^5.0",
"codeception/module-webdriver": "^4.0",
"ericmartel/codeception-email": "^1.0",
"codeception/module-db": "^3.1"
},
"replace": {
"typo3-ter/sf-event-mgt": "self.version"
},
Expand All @@ -55,20 +34,9 @@
"DERHANSEN\\SfEventMgt\\Tests\\": "Tests"
}
},
"config": {
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin",
"allow-plugins": {
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true,
"phpstan/extension-installer": true
}
},
"extra": {
"typo3/cms": {
"extension-key": "sf_event_mgt",
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/public"
"extension-key": "sf_event_mgt"
}
}
}

0 comments on commit 3055cd3

Please sign in to comment.