Skip to content

Commit

Permalink
Merge branch 'release/1.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
abrain committed Nov 1, 2024
2 parents fd378f6 + 013e937 commit 96e10a9
Show file tree
Hide file tree
Showing 61 changed files with 1,410 additions and 694 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
with:
php-version: '8.3'
coverage: none
tools: cs2pr

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
Expand All @@ -38,7 +39,12 @@ jobs:
run: composer install --prefer-dist --no-progress

- name: Check style and compatibility
run: composer exec phpcs
id: phpcs
run: composer exec phpcs -- --report-full --report-checkstyle=./phpcs-report.xml

- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml

test-latest:
runs-on: ubuntu-latest
Expand All @@ -47,7 +53,7 @@ jobs:

services:
mysql:
image: mariadb:11.5.2@sha256:4b812bbd9a025569fbe5a7a70e4a3cd3af53aa36621fecb1c2e108af2113450a
image: mariadb:11.5.2@sha256:4a1de8fa2a929944373d7421105500ff6f889ce90dcb883fbb2fdb070e4d427e
env:
MARIADB_USER: wptestuser
MARIADB_PASSWORD: wptestpass
Expand All @@ -59,7 +65,7 @@ jobs:
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
Expand All @@ -70,7 +76,7 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -99,7 +105,7 @@ jobs:
${{github.workspace}}/build/logs/clover-integration.xml:clover
- name: Upload code coverage to Codecov (unit)
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -108,7 +114,7 @@ jobs:
flags: unit

- name: Upload code coverage to Codecov (integration)
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -124,7 +130,7 @@ jobs:

services:
mysql:
image: mariadb:11.5.2@sha256:4b812bbd9a025569fbe5a7a70e4a3cd3af53aa36621fecb1c2e108af2113450a
image: mariadb:11.5.2@sha256:4a1de8fa2a929944373d7421105500ff6f889ce90dcb883fbb2fdb070e4d427e
env:
MARIADB_USER: wptestuser
MARIADB_PASSWORD: wptestpass
Expand All @@ -136,7 +142,7 @@ jobs:
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup PHP
id: setup-minimum-php
Expand Down
67 changes: 67 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
<exclude name="Generic.Files.LineLength"/>
</rule>

<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<severity>5</severity>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<severity>5</severity>
</rule>
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>

<!-- For help in understanding these custom sniff properties:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_wp_version" value="5.6"/>
Expand All @@ -36,6 +44,12 @@
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
<type>error</type>
</rule>
<rule ref="WordPress.WP.I18n.TranslatorsCommentWrongStyle">
<type>error</type>
</rule>

<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<exclude-pattern>tests/</exclude-pattern>
Expand All @@ -46,4 +60,57 @@
</property>
</properties>
</rule>

<rule ref="Modernize.FunctionCalls.Dirname.Nested"/>

<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="Generic.PHP.Syntax"/>
<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat">
<properties>
<property name="allowMultiline" value="true"/>
</properties>
</rule>
<rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence"/>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<!-- Allow for callback functions which may not need all parameters passed. -->
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed"/>
<!-- Allow for functions in extended classes/implemented interfaces. -->
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassAfterLastUsed"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterface"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed"/>
</rule>

<rule ref="Squiz.Classes.SelfMemberReference.NotUsed"/>
<rule ref="Squiz.Functions.FunctionDuplicateArgument"/>
<rule ref="Squiz.Operators.IncrementDecrementUsage"/>
<rule ref="Squiz.Operators.ValidLogicalOperators"/>
<rule ref="Squiz.PHP.CommentedOutCode">
<properties>
<property name="maxPercentage" value="40"/>
</properties>
</rule>
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
<rule ref="Squiz.PHP.NonExecutableCode"/>

<rule ref="Universal.Arrays.DuplicateArrayKey"/>
<rule ref="Universal.CodeAnalysis.ConstructorDestructorReturn"/>
<rule ref="Universal.CodeAnalysis.ForeachUniqueAssignment"/>
<rule ref="Universal.CodeAnalysis.NoDoubleNegative"/>
<rule ref="Universal.CodeAnalysis.NoEchoSprintf"/>
<rule ref="Universal.CodeAnalysis.StaticInFinalClass"/>
<rule ref="Universal.ControlStructures.DisallowLonelyIf"/>
<rule ref="Universal.Files.SeparateFunctionsFromOO"/>
</ruleset>
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
![Wordpress Plugin: Tested WP Version](https://img.shields.io/wordpress/plugin/tested/einsatzverwaltung.svg)
![Wordpress Plugin Active Installs](https://img.shields.io/wordpress/plugin/installs/einsatzverwaltung.svg)
[![Wordpress Plugin Rating](https://img.shields.io/wordpress/plugin/rating/einsatzverwaltung.svg)](https://wordpress.org/support/plugin/einsatzverwaltung/reviews/)
[![Build Status](https://drone.abrain.dev/api/badges/abrain/einsatzverwaltung/status.svg?ref=refs/heads/develop)](https://drone.abrain.dev/abrain/einsatzverwaltung)
[![Continuous Integration](https://github.com/abrain/einsatzverwaltung/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/abrain/einsatzverwaltung/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/abrain/einsatzverwaltung/graph/badge.svg?token=JNX4H0TMQX)](https://codecov.io/gh/abrain/einsatzverwaltung)

Dieses Plugin f&uuml;gt WordPress eine neue Beitragsart "Einsatzbericht" hinzu. Diese Einsatzberichte werden wie gew&ouml;hnliche WordPress-Beitr&auml;ge erstellt, es k&ouml;nnen aber zus&auml;tzliche Informationen wie Alarmzeit, Art des Einsatzes, eingesetzte Fahrzeuge und vieles mehr angegeben werden. Zudem stellt das Plugin verschiedene M&ouml;glichkeiten zur Darstellung der Einsatzberichte zur Verf&uuml;gung.

Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@
"integration-test": "XDEBUG_MODE=coverage phpunit -c phpunit-integration.xml"
},
"require": {
"php": ">=7.1.0"
"php": ">=7.1.0",
"ext-json": "*"
},
"require-dev": {
"phpmd/phpmd": "2.15.0",
"brain/monkey": "2.6.1",
"friendsofphp/php-cs-fixer": "3.62.0",
"brain/monkey": "2.6.2",
"friendsofphp/php-cs-fixer": "3.64.0",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "1.5.0",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "1.5.0",
"phpcompatibility/php-compatibility": "9.3.5",
"yoast/phpunit-polyfills": "1.1.1",
"yoast/phpunit-polyfills": "2.0.2",
"phpcompatibility/phpcompatibility-wp": "2.1.5",
"wp-coding-standards/wpcs": "3.1.0",
"phpunit/phpunit": "9.6.20"
"phpunit/phpunit": "9.6.21"
}
}
Loading

0 comments on commit 96e10a9

Please sign in to comment.