Skip to content

Commit e411b64

Browse files
committed
Fix PHPCQ
2 parents ea507c2 + bbf6ce0 commit e411b64

41 files changed

Lines changed: 1277 additions & 931 deletions

Some content is hidden

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

.composer-require-checker.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"symbol-whitelist": [
3+
"array", "bool", "false", "int", "null", "self", "static", "parent", "string", "true", "void", "mixed",
4+
"ContaoCommunityAlliance\\Translator\\TranslatorInterface",
5+
"Contao\\ManagerBundle\\ContaoManagerBundle",
6+
"Contao\\ManagerPlugin\\Bundle\\BundlePluginInterface",
7+
"Contao\\ManagerPlugin\\Bundle\\Config\\BundleConfig",
8+
"Contao\\ManagerPlugin\\Bundle\\Parser\\ParserInterface",
9+
"Contao\\ManagerPlugin\\Routing\\RoutingPluginInterface",
10+
"InspiredMinds\\ContaoFileUsage\\ContaoFileUsageBundle",
11+
"InspiredMinds\\ContaoFileUsage\\Provider\\FileUsageProviderInterface",
12+
"InspiredMinds\\ContaoFileUsage\\Result\\FileTreeMultipleResult",
13+
"InspiredMinds\\ContaoFileUsage\\Result\\FileTreeSingleResult",
14+
"InspiredMinds\\ContaoFileUsage\\Result\\ResultInterface",
15+
"InspiredMinds\\ContaoFileUsage\\Result\\ResultsCollection",
16+
"tl_content"
17+
]
18+
}

.phpcq.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"plugins":{"phpunit":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpunit/phpunit-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"phpunit":"^6.0 || ^7.0 || ^8.0 || ^9.0"}},"checksum":{"type":"sha-512","value":"c73f15658e3ba62665f09492ec91c3a6a715760bfaa88473a987538439fff442540148e086e46a6aa18ce55a3ea2fbf76caaa581384cb84a38859fcc609ae7e4"},"tools":{"phpunit":{"version":"9.6.22","url":"https://phar.phpunit.de/phpunit-9.6.22.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-xml":"*","ext-xmlwriter":"*"}},"checksum":{"type":"sha-256","value":"9618d52015c9b06b4979a8e481ca9567be6be20e711e98926c61378a400e1f2e"},"signature":"https://phar.phpunit.de/phpunit-9.6.22.phar.asc"}},"composerLock":null},"psalm":{"api-version":"1.0.0","version":"1.2.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/psalm/psalm-1.2.0.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0","ext-dom":"*"},"tool":{"psalm":"^3.0 || ^4.0 || ^5.0"}},"checksum":{"type":"sha-512","value":"4a550c9226d7bca582d7c10bd87cce01190c96398936b1613421640c83df62ed1c6e0d44c1b39635414ea8cf4a892a6458d27590793238add24e7cb5547e6ffd"},"tools":{"psalm":{"version":"5.26.1","url":"https://github.com/vimeo/psalm/releases/download/5.26.1/psalm.phar","requirements":{"php":{"php":"^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0","ext-SimpleXML":"*","ext-ctype":"*","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-tokenizer":"*"}},"checksum":null,"signature":"https://github.com/vimeo/psalm/releases/download/5.26.1/psalm.phar.asc"}},"composerLock":null},"composer-require-checker":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-require-checker/composer-require-checker-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0"},"tool":{"composer-require-checker":"^3.8 || ^4.0"}},"checksum":{"type":"sha-512","value":"d5415bddfe024c5749d894034583882aee4e5c3e1087815d9fdd81cb5e71630f631a0e35de0ff84b97fbbf738c16ece5f83bd8c00695913eb846aa6f04577dc2"},"tools":{"composer-require-checker":{"version":"4.14.0","url":"https://github.com/maglnet/ComposerRequireChecker/releases/download/4.14.0/composer-require-checker.phar","requirements":{"php":{"php":"~8.2.0 || ~8.3.0 || ~8.4.0","ext-phar":"*"}},"checksum":null,"signature":"https://github.com/maglnet/ComposerRequireChecker/releases/download/4.14.0/composer-require-checker.phar.asc"}},"composerLock":null},"phpmd":{"api-version":"1.0.0","version":"1.0.2.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpmd/phpmd-1.0.2.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpmd":"^2.6.1"}},"checksum":{"type":"sha-512","value":"f22280a6dec8dbdd2ec1d83b294f23237fe32c34f4a298e52038e0a7a0074d541635b2b488b1a6098a42d8418a6cd8eb804406ea82b91e362be2b5d11a0915b0"},"tools":{"phpmd":{"version":"2.15.0","url":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar","requirements":{"php":{"php":">=5.3.9","ext-xml":"*"}},"checksum":null,"signature":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar.asc"}},"composerLock":null},"phpcpd":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcpd/phpcpd-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcpd":"^6.0"}},"checksum":{"type":"sha-512","value":"1189ce0bf3fade4cb4241f1d96f915ef8fc7651f4450dc79fdf464ee3d6be3009316f0d423ce2d4af9d76ad50807b7fdf4d77bfa6d9ee2c91d6eda32ea214433"},"tools":{"phpcpd":{"version":"6.0.3","url":"https://phar.phpunit.de/phpcpd-6.0.3.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*"}},"checksum":{"type":"sha-256","value":"2cbaea7cfda1bb4299d863eb075e977c3f49055dd16d88529fae5150d48a84cb"},"signature":"https://phar.phpunit.de/phpcpd-6.0.3.phar.asc"}},"composerLock":null},"phploc":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phploc/phploc-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*","ext-json":"*"},"tool":{"phploc":"^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"}},"checksum":{"type":"sha-512","value":"f67b02d494796adf553cb3dd13ec06c1cb8e53c799954061749424251379541637538199afb3afa3c7a01cabd1cb6f1c53eb621f015dff9644c6c7cbf10c56d1"},"tools":{"phploc":{"version":"7.0.2","url":"https://phar.phpunit.de/phploc-7.0.2.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*"}},"checksum":{"type":"sha-256","value":"3d59778ec86faf25fd00e3a329b2f9ad4a3c751ca91601ea7dab70f887b0bf46"},"signature":"https://phar.phpunit.de/phploc-7.0.2.phar.asc"}},"composerLock":null},"phpcs":{"api-version":"1.0.0","version":"1.2.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcs/phpcs-1.2.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcs":"^3.0 || ^2.0","phpcbf":"^3.0 || ^2.0"}},"checksum":{"type":"sha-512","value":"b6ed00306e76068a6af5e3b1dec837724f9e1900ef1049ce88e7ce195b0583524ca33a73613fba13244307a7ca853b6ddaa14ded69f651c3f184ac130bd1aaad"},"tools":{"phpcs":{"version":"3.11.2","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.11.2/phpcs.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.11.2/phpcs.phar.asc"},"phpcbf":{"version":"3.11.2","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.11.2/phpcbf.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.11.2/phpcbf.phar.asc"}},"composerLock":null},"composer-normalize":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-normalize/composer-normalize-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-json":"*"},"tool":{"composer-normalize":"^2.1"}},"checksum":{"type":"sha-512","value":"d9abda440b85d501c58abf9c81bf76f417594b397129215ffa8b777e9bb5e5eda37d7661d661db3c8d11c24f20345bc6fbe56f013b3b9435d459d2b94f086e0f"},"tools":{"composer-normalize":{"version":"2.45.0","url":"https://github.com/ergebnis/composer-normalize/releases/download/2.45.0/composer-normalize.phar","requirements":{"php":{"php":"~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0","ext-json":"*"}},"checksum":null,"signature":"https://github.com/ergebnis/composer-normalize/releases/download/2.45.0/composer-normalize.phar.asc"}},"composerLock":null}},"tools":[]}

.phpcq.yaml.dist

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
phpcq:
2+
repositories:
3+
- https://phpcq.github.io/repository/repository.json
4+
directories:
5+
- src
6+
- tests
7+
artifact: .phpcq/build
8+
composer:
9+
autodiscover: false
10+
11+
plugins:
12+
phpunit:
13+
version: ^1.0
14+
signed: false
15+
psalm:
16+
version: ^1.0
17+
signed: false
18+
composer-require-checker:
19+
version: ^1.0
20+
signed: false
21+
phpmd:
22+
version: ^1.0
23+
signed: false
24+
phpcpd:
25+
version: ^1.1
26+
signed: false
27+
phploc:
28+
version: ^1.0
29+
signed: false
30+
phpcs:
31+
version: ^1.0
32+
signed: false
33+
composer-normalize:
34+
version: ^1.0
35+
signed: false
36+
trusted-keys:
37+
# composer-require-checker
38+
- 033E5F8D801A2F8D
39+
# sb@sebastian-bergmann.de
40+
- 4AA394086372C20A
41+
# psalm
42+
- 8A03EA3B385DBAA1
43+
- 12CE0F1D262429A5
44+
# magl@magll.net
45+
- D2CCAC42F6295E7D
46+
# PHP_CodeSniffer
47+
- 31C7E470E2138192
48+
- 5E6DDE998AB73B8E
49+
- A978220305CD5C32
50+
# Composer normalize
51+
- C00543248C87FB13
52+
# phpmd
53+
- A4E55EA12C7C085C
54+
- 9093F8B32E4815AA
55+
56+
tasks:
57+
fix:
58+
- composer-normalize-fix
59+
- phpcbf
60+
61+
verify:
62+
- composer-require-checker
63+
- composer-normalize
64+
65+
analyze:
66+
- phploc
67+
- phpcpd
68+
- phpmd
69+
- phpcs
70+
- psalm
71+
- phpunit
72+
73+
default:
74+
- verify
75+
- analyze
76+
77+
phpcpd:
78+
plugin: phpcpd
79+
config:
80+
exclude:
81+
- tests
82+
- src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder
83+
- src/CoreBundle/Resources/contao/dca
84+
85+
phpmd:
86+
plugin: phpmd
87+
config:
88+
ruleset:
89+
- ./.phpmd.xml
90+
91+
composer-require-checker:
92+
plugin: composer-require-checker
93+
config:
94+
config_file: '.composer-require-checker.json'
95+
96+
phpcs:
97+
plugin: phpcs
98+
config: &phpcs-config
99+
standard: PSR12
100+
excluded:
101+
- '*/Resources/contao/dca/*'
102+
- '*/Resources/contao/languages/*'
103+
- '*/Resources/public/*'
104+
105+
phpcbf:
106+
plugin: phpcs
107+
config:
108+
<<: *phpcs-config
109+
fix: true
110+
111+
composer-normalize-fix:
112+
plugin: composer-normalize
113+
config:
114+
dry_run: false

.phpmd.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="PHPMD rule set"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>
8+
PHPMD rule set
9+
</description>
10+
11+
<rule ref="rulesets/codesize.xml"/>
12+
<rule ref="rulesets/controversial.xml">
13+
<exclude name="CamelCaseVariableName"/>
14+
</rule>
15+
<rule ref="rulesets/controversial.xml/CamelCaseVariableName">
16+
<properties>
17+
<property name="allow-underscore" value="true"/>
18+
</properties>
19+
</rule>
20+
<rule ref="rulesets/design.xml"/>
21+
<rule ref="rulesets/naming.xml">
22+
<exclude name="ShortVariable" />
23+
</rule>
24+
<rule ref="rulesets/naming.xml/ShortVariable">
25+
<properties>
26+
<property name="exceptions" value="id" />
27+
</properties>
28+
</rule>
29+
<rule ref="rulesets/unusedcode.xml">
30+
<exclude name="UnusedLocalVariable"/>
31+
</rule>
32+
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable">
33+
<properties>
34+
<property name="allow-unused-foreach-variables" value="true"/>
35+
</properties>
36+
</rule>
37+
</ruleset>

.tx/config

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[main]
2+
host = https://app.transifex.com
3+
4+
[o:metamodels:p:attribute-translatedcontentarticle:r:tl_metamodel_attribute]
5+
file_filter = src/Resources/translations/tl_metamodel_attribute.<lang>.xlf
6+
source_file = src/Resources/translations/tl_metamodel_attribute.en.xlf
7+
type = XLIFF
8+
minimum_perc = 0
9+
resource_name = tl_metamodel_attribute
10+
replace_edited_strings = false
11+
keep_translations = false

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
# The translated content article attribute
77

8-
The translated content article attribute for MetaModels. With this attribute it is possible to select and arrange standard content elements of Contao like in a Contao article.
8+
The translated content article attribute for MetaModels. With this attribute it is possible to select and arrange
9+
standard content elements of Contao like in a Contao article.
10+
11+
For members of a user group, the permissions apply to the content elements and fields released in the user group.
912

1013
## Original idea by Byteworks:
1114
- [Ronny Binder](mailto:rb@bytworks.ch)

build.default.properties

Lines changed: 0 additions & 18 deletions
This file was deleted.

build.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

composer.json

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"name": "metamodels/attribute_translatedcontentarticle",
33
"description": "MetaModels attribute for translated content article",
4+
"license": "LGPL-3.0-or-later",
5+
"type": "contao-bundle",
46
"keywords": [
57
"contao",
68
"metamodels",
79
"attribute",
810
"article",
911
"translatable"
1012
],
11-
"type": "contao-bundle",
12-
"homepage": "https://now.metamodel.me/",
13-
"license": "LGPL-3.0-or-later",
1413
"authors": [
1514
{
1615
"name": "Andreas Dziemba",
@@ -19,40 +18,51 @@
1918
"role": "Developer"
2019
}
2120
],
21+
"homepage": "https://now.metamodel.me/",
2222
"support": {
2323
"email": "mail@metamodel.me",
2424
"issues": "https://github.com/MetaModels/attribute_translatedcontentarticle/issues",
2525
"wiki": "https://de.contaowiki.org/MetaModels",
26-
"irc": "irc://irc.freenode.org/contao.mm",
2726
"source": "https://github.com/MetaModels/attribute_translatedcontentarticle"
2827
},
2928
"require": {
30-
"php": "^7.4",
29+
"php": "^8.1",
3130
"ext-pdo": "*",
32-
"contao-community-alliance/dc-general": "^2.2",
33-
"contao/core-bundle": "^4.9.0, <4.13.0",
34-
"metamodels/core": "^2.2",
35-
"symfony/dependency-injection": "^4.4.6",
36-
"symfony/http-kernel": "~4.4.13"
31+
"contao-community-alliance/dc-general": "^2.3",
32+
"contao/core-bundle": "^4.13.0 <5.0",
33+
"doctrine/dbal": "^3.3",
34+
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
35+
"metamodels/core": "^2.3",
36+
"symfony/config": "^5.4",
37+
"symfony/dependency-injection": "^5.4",
38+
"symfony/http-foundation": "^5.4",
39+
"symfony/http-kernel": "^5.4",
40+
"symfony/routing": "^5.4",
41+
"symfony/security-core": "^5.4",
42+
"symfony/translation-contracts": "^2.3"
3743
},
3844
"require-dev": {
3945
"contao/manager-plugin": "^2.1",
40-
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
41-
"phpcq/all-tasks": "^1.2"
46+
"inspiredminds/contao-file-usage": "^3.0.1",
47+
"phpcq/runner-bootstrap": "^1.0@dev"
4248
},
4349
"autoload": {
4450
"psr-4": {
4551
"MetaModels\\AttributeTranslatedContentArticleBundle\\": "src/"
4652
}
4753
},
48-
"extra": {
49-
"contao-manager-plugin": "MetaModels\\AttributeTranslatedContentArticleBundle\\ContaoManager\\Plugin"
50-
},
5154
"config": {
5255
"allow-plugins": {
5356
"contao-components/installer": false,
54-
"contao/manager-plugin": false
57+
"contao/manager-plugin": false,
58+
"php-http/discovery": true
5559
},
5660
"sort-packages": true
61+
},
62+
"extra": {
63+
"branch-alias": {
64+
"dev-feature/2.3.0": "2.3.x-dev"
65+
},
66+
"contao-manager-plugin": "MetaModels\\AttributeTranslatedContentArticleBundle\\ContaoManager\\Plugin"
5767
}
5868
}

psalm.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="3"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
>
9+
<projectFiles>
10+
<directory name="src" />
11+
<ignoreFiles>
12+
<directory name="src/Resources/contao/dca"/>
13+
<directory name="src/Resources/contao/languages"/>
14+
</ignoreFiles>
15+
</projectFiles>
16+
</psalm>

0 commit comments

Comments
 (0)