Skip to content

Commit

Permalink
Merge tag '2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus committed Oct 16, 2024
2 parents 4e4349c + 6f67c52 commit 61bc354
Show file tree
Hide file tree
Showing 52 changed files with 375 additions and 500 deletions.
4 changes: 2 additions & 2 deletions .composer-require-checker.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Contao\\ManagerPlugin\\Config\\ContainerBuilder",
"Contao\\ManagerPlugin\\Config\\ExtensionPluginInterface",
"Contao\\ManagerPlugin\\Dependency\\DependentPluginInterface",
"TL_FILES",
"scan"
"Netzmacht\\Contao\\Toolkit\\NetzmachtContaoToolkitBundle",
"Netzmacht\\Contao\\Toolkit\\Bundle\\NetzmachtContaoToolkitBundle"
]
}
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[{*.(xlf,xml,html5,twig,json,js,vue}]
indent_style = space
indent_size = 2

[*.php]
indent_style = space
indent_size = 4
max_line_length = 120
25 changes: 22 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# Custom
.check-author.yml export-ignore
.gitattributes export-ignore
.github export-ignore
.gitignore export-ignore
.travis.yml export-ignore
/js export-ignore
/specs export-ignore
/tests export-ignore
build.default.properties export-ignore
build.xml export-ignore
phpunit.xml.dist export-ignore
/tests export-ignore
/specs export-ignore
/js export-ignore

# Auto detect text files and perform LF normalization
* text-auto

# Configuration
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.phpcq.lock export-ignore
.phpcq.yaml.dist export-ignore
companion.json export-ignore
composer.lock -diff
phpcs.xml.dist export-ignore
psalm.xml export-ignore
rector.php export-ignore

# PHP files
*.php text eol=lf diff=php
9 changes: 3 additions & 6 deletions .github/workflows/diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ jobs:
fail-fast: false
matrix:
include:
- php: 7.4
output: '-o github-action -o default'
phpcq_install: 'install'
- php: 8.0
- php: 8.2
output: '-o github-action -o default'
phpcq_install: 'update'
- php: 8.1
- php: 8.3
output: '-o github-action -o default'
phpcq_install: 'update'

steps:
- name: Pull source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
Expand Down
22 changes: 9 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# composer related
vendor/
composer.lock
# Companion
/.env.companion

# PHPCQ
.phpcq.yaml
.phpcq/*
!.phpcq
!.phpcq/local

# PHPCS
.phpcs-cache
# Composer
/composer.lock
/vendor

# docs
_book/
# PHPCQ
/.phpcq
/.phpcq.yaml
/.phpcs-cache
2 changes: 1 addition & 1 deletion .phpcq.lock

Large diffs are not rendered by default.

88 changes: 38 additions & 50 deletions .phpcq.yaml.dist
Original file line number Diff line number Diff line change
@@ -1,103 +1,91 @@
phpcq:
repositories:
- https://phpcq.github.io/repository/repository.json
- 'https://phpcq.github.io/repository/repository.json'
directories:
- src
artifact: .phpcq/build

plugins:
psalm:
composer-normalize:
version: ^1.0
signed: false
composer-require-checker:
version: ^1.0
signed: false
phpmd:
version: ^1.0
signed: false
requirements:
phpmd:
signed: false
phpcpd:
version: ^1.1
signed: false
phploc:
version: ^1.0
signed: false
phpcs:
phpmd:
version: ^1.0
signed: false
composer-normalize:
psalm:
version: ^1.0
signed: false
rector:
version: ^1.0
signed: false
phpcs:
version: ^1.0
signed: false
trusted-keys:
# composer-require-checker
- C00543248C87FB13
- 033E5F8D801A2F8D
# sb@sebastian-bergmann.de
- D2CCAC42F6295E7D
- 4AA394086372C20A
# psalm
- 9093F8B32E4815AA
- 8A03EA3B385DBAA1
- 12CE0F1D262429A5
# magl@magll.net
- D2CCAC42F6295E7D
# PHP_CodeSniffer
- 31C7E470E2138192
# Composer normalize
- C00543248C87FB13

- 5E6DDE998AB73B8E
- A978220305CD5C32
tasks:
fix:
- composer-normalize-fix
- rector-fix
- phpcbf

verify:
- composer-require-checker
- composer-normalize

- composer-require-checker
analyze:
- phploc
- phpcpd
- phploc
- phpmd
- phpcs
- psalm

- rector
- phpcs
default:
- verify
- analyze

phpcpd:
composer-normalize-fix:
config:
exclude:
- spec/PropertyAccess/ContaoModelPropertyAccessorSpec.php

phpmd:
dry_run: false
ignore_output:
- '#> pre-command-run: Contao\\ManagerPlugin\\Composer\\ArtifactsPlugin->preCommandRun#'
plugin: composer-normalize
composer-normalize:
config:
directories:
- src
ruleset:
- codesize
- controversial
- naming
- unusedcode

ignore_output:
- '#> pre-command-run: Contao\\ManagerPlugin\\Composer\\ArtifactsPlugin->preCommandRun#'
composer-require-checker:
config:
config_file: '.composer-require-checker.json'

config_file: .composer-require-checker.json
rector-fix:
config:
dry-run: false
plugin: rector
phpcs:
config: &phpcs-config
config:
standard: ~
standard_paths:
- ./vendor/slevomat/coding-standard
- ./vendor/doctrine/coding-standard/lib

phpcbf:
plugin: phpcs
config:
<<: *phpcs-config
standard: ~
standard_paths:
- ./vendor/slevomat/coding-standard
- ./vendor/doctrine/coding-standard/lib
fix: true

composer-normalize-fix:
plugin: composer-normalize
config:
dry_run: false
32 changes: 32 additions & 0 deletions companion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"receipts": ["projects/contao-bundle/4.13-5.3"],
"config": {
"phpConstraint": "^8.2"
},
"tools": {
"composer": {
"namespace": "Netzmacht\\ContaoFormBundle"
},
"psalm": {
"configuration": {
"errorLevel": "3"
}
},
"phpcq": {
"plugins": {
"phpunit": false
},
"presets": {
"composer-require-checker": {
"tasks": {
"composer-require-checker": {
"config": {
"config_file": ".composer-require-checker.json"
}
}
}
}
}
}
}
}
45 changes: 26 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,34 @@
"source": "https://github.com/netzmacht/contao-form-bundle"
},
"require": {
"php": "^7.4 || ^8.0",
"beberlei/assert": "^2.0 || ^3.0",
"contao/core-bundle": "^4.13",
"netzmacht/contao-toolkit": "^3.8",
"psr/log": "^1.1",
"symfony/config": "^4.4 || ^5.1",
"symfony/dependency-injection": "^4.4 || ^5.1",
"symfony/filesystem": "^4.4 || ^5.1",
"symfony/form": "^4.4 || ^5.1",
"symfony/http-foundation": "^4.4 || ^5.1",
"symfony/http-kernel": "^4.4 || ^5.1",
"symfony/options-resolver": "^4.4 || ^5.1",
"symfony/security-csrf": "^4.4 || ^5.1",
"symfony/translation-contracts": "^1.1 || ^2",
"symfony/validator": "^4.4 || ^5.1",
"php": "^8.2",
"beberlei/assert": "^3.0",
"contao/core-bundle": "^4.13 || ^5.3",
"netzmacht/contao-toolkit": "^3.9 || ^4.0",
"psr/log": "^1.1 || ^2.0",
"symfony/config": "^5.4 || ^6.4",
"symfony/dependency-injection": "^5.4 || ^6.4",
"symfony/filesystem": "^5.4 || ^6.4",
"symfony/form": "^5.4 || ^6.4",
"symfony/http-foundation": "^5.4 || ^6.4",
"symfony/http-kernel": "^5.4 || ^6.4",
"symfony/options-resolver": "^5.4 || ^6.4",
"symfony/security-csrf": "^5.4 || ^6.4",
"symfony/translation-contracts": "^1.1 || ^2 || ^3.0",
"symfony/validator": "^5.4 || ^6.4",
"twig/twig": "^3.0",
"webmozart/path-util": "^2.3"
},
"require-dev": {
"contao/manager-plugin": "^2.1",
"doctrine/coding-standard": "^9.0",
"phpcq/runner-bootstrap": "^1.0@dev"
"doctrine/coding-standard": "^12.0",
"phpcq/runner-bootstrap": "@dev"
},
"conflict": {
"contao/manager-plugin": "<2.1 || >= 3.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Netzmacht\\ContaoFormBundle\\": "src/"
Expand All @@ -53,8 +58,10 @@
"composer/package-versions-deprecated": true,
"contao-components/installer": true,
"contao/manager-plugin": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
"dealerdirect/phpcodesniffer-composer-installer": true,
"php-http/discovery": true
},
"sort-packages": true
},
"extra": {
"branch-alias": {
Expand Down
20 changes: 10 additions & 10 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<?xml version="1.0"?>
<psalm
errorLevel="3"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" errorLevel="3" resolveFromConfigFile="true" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" findUnusedCode="false" findUnusedBaselineEntry="false">
<projectFiles>
<directory name="src" />
<directory name="src"/>
<ignoreFiles>
<directory name="vendor" />
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>

Expand All @@ -24,9 +18,15 @@
</InternalMethod>
<UndefinedConstant>
<errorLevel type="suppress">
<file name="src/Form/FormGenerator/UploadHandler.php" />
<file name="src/Form/FormGenerator/UploadHandler.php"/>
</errorLevel>
</UndefinedConstant>
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="Netzmacht\Contao\Toolkit\NetzmachtContaoToolkitBundle"/>
<referencedClass name="Netzmacht\Contao\Toolkit\Bundle\NetzmachtContaoToolkitBundle"/>
</errorLevel>
</UndefinedClass>
</issueHandlers>

<universalObjectCrates>
Expand Down
Loading

0 comments on commit 61bc354

Please sign in to comment.