Skip to content

Commit 7caeb86

Browse files
authored
Merge branch 'master' into datengraben/phpstan-level-2
2 parents 766cf3d + 64cb512 commit 7caeb86

11 files changed

Lines changed: 120 additions & 56 deletions

File tree

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ f8bdfd6d5d595f22d7c0345a2eb35571343ed134
1010

1111
# Apply after wrong merge
1212
2deacd97716f5a1128b8e5b7cf6bb9bdd161b4f8
13+
14+
# Apply last time before automatic action
15+
102673ed5e3e2969090ce754aa97dde88bc7377d

.github/workflows/phpcbf-check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: PHP Code Beautifier Check
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/*.php'
7+
pull_request:
8+
paths:
9+
- '**/*.php'
10+
workflow_dispatch:
11+
12+
13+
jobs:
14+
phpcbf-check:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Set up PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: '8.1' # Adjust this to your PHP version
25+
extensions: uopz
26+
27+
28+
- name: Install dependencies
29+
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
30+
31+
- name: Run phpcbf
32+
run: ./vendor/bin/phpcbf -q --parallel=1 src templates includes tests commonsbooking.php
33+
34+
- name: Verify code style is unchanged
35+
run: |
36+
if [[ -n "$(git status --porcelain)" ]]; then
37+
echo "ERROR: phpcbf made changes. Please run phpcbf locally and commit the fixes."
38+
exit 1
39+
else
40+
echo "Code style is compliant."
41+
fi

.wp-env.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"phpVersion" : "7.4",
3-
"core" : "Wordpress/Wordpress#6.7",
3+
"core" : "Wordpress/Wordpress#6.8",
44
"plugins" : [
55
".",
66
"https://downloads.wordpress.org/plugin/wp-crontrol.zip",

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CommonsBooking is a plugin for the management and booking of common goods. This
1919
* [View Changelog](https://wordpress.org/plugins/commonsbooking/#developers)
2020
* [Official Website](https://commonsbooking.org)
2121
* For users read the [documentation](https://commonsbooking.org/dokumentation) or get [Support](https://commonsbooking.org/kontakt/)
22-
* For developers use the [Bug-Tracker](https://github.com/wielebenwir/commonsbooking/issues)
22+
* For developers use the [Bug-Tracker](https://github.com/wielebenwir/commonsbooking/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug)
2323

2424
## Installation
2525

TECHNICAL.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
### Formatter
22

3+
We adhere to [PHPCS](https://github.com/PHPCSStandards/PHP_CodeSniffer) rules defined in the [phpcs.xml](https://github.com/wielebenwir/commonsbooking/blob/master/.phpcs.xml.dist) rules file, as it is a mature tool and well established in the Wordpress-Plugin development scene.
4+
A program to apply auto-formattable rules of PHPCS is `phpcbf` and we encourage everyone
5+
to configure this tool in their IDE so that contribution commits consist of properly formatted code.
6+
Both are already in the dev dependencies of the repository code.
7+
8+
We have an automatic check [as Github Action](https://github.com/wielebenwir/commonsbooking/tree/master/.github/workflows/phpcbf-check.yml) in our CI/CD-Pipeline, which prevents code contributions that not adhere to the rules.
9+
10+
#### Ignore formatter revisions
11+
312
We use .git-blame-ignore-revs to track repo-wide cosmetic refactorings by auto format tools like prettier/phpcbf.
413
See [Github Documentation](https://docs.github.com/de/repositories/working-with-files/using-files/viewing-and-understanding-files#ignore-commits-in-the-blame-view)
514

commonsbooking.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Plugin Name: Commons Booking
5-
* Version: 2.10.3
5+
* Version: 2.10.4
66
* Requires at least: 5.2
77
* Requires PHP: 7.4
88
* Plugin URI: https://commonsbooking.org
@@ -16,7 +16,7 @@
1616
*/
1717

1818
defined( 'ABSPATH' ) || die( 'Thanks for visiting' );
19-
define( 'COMMONSBOOKING_VERSION', '2.10.3' );
19+
define( 'COMMONSBOOKING_VERSION', '2.10.4' );
2020
define( 'COMMONSBOOKING_VERSION_COMMENT', '' ); // Empty for release - Used to mark development versions
2121
define( 'COMMONSBOOKING_PLUGIN_SLUG', 'commonsbooking' );
2222
define( 'COMMONSBOOKING_MENU_SLUG', COMMONSBOOKING_PLUGIN_SLUG . '-menu' );

languages/commonsbooking-de_DE.po

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,43 +1312,43 @@ msgstr "Bitte kontaktiere die Kontaktpersonen vor Ort direkt, wenn du Fragen zur
13121312
msgid "Not set"
13131313
msgstr "Nicht gesetzt"
13141314

1315-
#: src/Model/Timeframe.php:261
1315+
#: src/Model/Timeframe.php:259
13161316
msgid "Available here"
13171317
msgstr "Hier verfügbar"
13181318

13191319
#. translators: %s = date in WordPress defined format
1320-
#: src/Model/Timeframe.php:266
1320+
#: src/Model/Timeframe.php:264
13211321
msgid "on %s"
13221322
msgstr "am %s"
13231323

13241324
#. translators: %s = date in WordPress defined format
1325-
#: src/Model/Timeframe.php:271
1325+
#: src/Model/Timeframe.php:269
13261326
msgid "from %s"
13271327
msgstr "von %s"
13281328

1329-
#: src/Model/Timeframe.php:275
1329+
#: src/Model/Timeframe.php:273
13301330
msgid "permanently"
13311331
msgstr "dauerhaft"
13321332

13331333
#. translators: %1$s = startdate, second %2$s = enddate in WordPress defined format
1334-
#: src/Model/Timeframe.php:281
1334+
#: src/Model/Timeframe.php:279
13351335
msgid "from %1$s until %2$s"
13361336
msgstr "von %1$s bis %2$s"
13371337

13381338
#. translators: %s = enddate in WordPress defined format
1339-
#: src/Model/Timeframe.php:288
1339+
#: src/Model/Timeframe.php:286
13401340
msgid "until %s"
13411341
msgstr "bis %s"
13421342

1343-
#: src/Model/Timeframe.php:616
1343+
#: src/Model/Timeframe.php:614
13441344
msgid "A pickup time but no return time has been set. Please set the return time."
13451345
msgstr "Eine Abholzeit, aber keine Rückgabezeit wurde festgelegt. Lege bitte eine Rückgabezeit fest."
13461346

1347-
#: src/Model/Timeframe.php:626
1347+
#: src/Model/Timeframe.php:624
13481348
msgid "End date is before start date. Please set a valid end date."
13491349
msgstr "Enddatum liegt vor dem Startdatum. Bitte setze ein gültiges Enddatum."
13501350

1351-
#: src/Model/Timeframe.php:661
1351+
#: src/Model/Timeframe.php:659
13521352
msgid "Item is already bookable at another location within the same date range. See other timeframe ID: %1$s: %2$s"
13531353
msgstr "Artikel ist bereits an einem anderen Ort innerhalb desselben Datumsbereichs buchbar. Siehe andere Zeitrahmen ID: %1$s: %2$s"
13541354

@@ -3196,7 +3196,7 @@ msgstr "Es ist nicht möglich, diesen Zeitrahmen im Frontend abzurufen. Bitte be
31963196
msgid "Cancelled"
31973197
msgstr "Storniert"
31983198

3199-
#: src/Model/Timeframe.php:636
3199+
#: src/Model/Timeframe.php:634
32003200
msgid "The start- and end-time of the timeframe can not be the same. Please check the full-day checkbox if you want users to be able to book the full day."
32013201
msgstr "Die Start- und Endzeit des Zeitrahmens dürfen nicht gleich sein. Wenn der gesamte Tag buchbar sein soll muss die Option \"Ganzer Tag\" angewählt sein."
32023202

@@ -3283,24 +3283,24 @@ msgid "If selected, days that are overbooked will be counted towards the maximum
32833283
msgstr "Ist diese Option aktiviert, werden überbuchte Tage auf die maximale Anzahl buchbarer Tage angerechnet. Wenn diese Option deaktiviert ist, dann werden überbuchte Tage nicht zusätzlich gezählt und ermöglichen Buchungszeiträume die länger sind als die im Zeitrahmen konfigurierte maximale Anzahl an gebuchten Tagen."
32843284

32853285
#. translators: first %s = timeframe-ID, second %s is timeframe post_title
3286-
#: src/Model/Timeframe.php:697
3286+
#: src/Model/Timeframe.php:695
32873287
msgid "See overlapping timeframe ID: %1$s %2$s"
32883288
msgstr "Sich überschneidende Zeitrahmen ID: %1$s %2$s"
32893289

3290-
#: src/Model/Timeframe.php:796
3290+
#: src/Model/Timeframe.php:794
32913291
msgid "Overlapping bookable timeframes are only allowed to have the same grid."
32923292
msgstr "Sich überschneidende buchbare Zeiträume müssen das gleiche Raster haben."
32933293

3294-
#: src/Model/Timeframe.php:826
3294+
#: src/Model/Timeframe.php:824
32953295
msgid "Overlapping bookable timeframes are not allowed to have the same weekdays."
32963296
msgstr "Mehrere buchbare Zeiträume überschneiden sich in den definierten Wochentagen."
32973297

3298-
#: src/Model/Timeframe.php:838
3298+
#: src/Model/Timeframe.php:836
32993299
msgid "Overlapping bookable timeframes are not allowed to have the same dates."
33003300
msgstr "Mehrere buchbare Zeiträume überschneiden sich in dem definierten Datumsbereich."
33013301

3302-
#: src/Model/Timeframe.php:845
3303-
#: src/Model/Timeframe.php:852
3302+
#: src/Model/Timeframe.php:843
3303+
#: src/Model/Timeframe.php:850
33043304
msgid "The other timeframe is overlapping with your weekly configuration."
33053305
msgstr "Der andere Zeitrahmen überschneidet sich mit einer wöchentlichen Konfiguration."
33063306

@@ -3340,7 +3340,7 @@ msgstr "Feiertage importieren"
33403340
msgid "Select the year and state to import holidays for (as of now only German holidays are supported)"
33413341
msgstr "Wählen Sie das Jahr und das Bundesland, für das Sie Feiertage importieren möchten (derzeit werden Feiertage in Deutschland unterstützt)"
33423342

3343-
#: src/Model/Timeframe.php:812
3343+
#: src/Model/Timeframe.php:810
33443344
msgid "Daily repeated time periods are not allowed to overlap."
33453345
msgstr "Täglich wiederholende Zeiträume dürfen sich nicht überschneiden."
33463346

@@ -4072,23 +4072,23 @@ msgstr "Bitte passe das Start- oder Enddatum an."
40724072
msgid "Affected Bookings: %s"
40734073
msgstr "Betroffene Buchungen: %s"
40744074

4075-
#: src/Model/Timeframe.php:561
4075+
#: src/Model/Timeframe.php:559
40764076
msgid "Could not get item or location. Please set a valid item and location."
40774077
msgstr "Artikel oder Standort konnte nicht gefunden werden. Bitte wähle einen gültigen Artikel oder Standort."
40784078

4079-
#: src/Model/Timeframe.php:570
4079+
#: src/Model/Timeframe.php:568
40804080
msgid "Item or location is missing. Please set item and location."
40814081
msgstr "Artikel oder Standort fehlen. Bitte Artikel und Standort festlegen."
40824082

4083-
#: src/Model/Timeframe.php:583
4083+
#: src/Model/Timeframe.php:581
40844084
msgid "No dates selected. Please select at least one date."
40854085
msgstr "Kein Datum ausgewählt. Bitte mindestens ein Datum auswählen."
40864086

4087-
#: src/Model/Timeframe.php:593
4087+
#: src/Model/Timeframe.php:591
40884088
msgid "The same date was selected multiple times. Please select each date only once."
40894089
msgstr "Das gleiche Datum wurde mehrere Male ausgewählt. Bitte ein Datum nur einmal auswählen."
40904090

4091-
#: src/Model/Timeframe.php:602
4091+
#: src/Model/Timeframe.php:600
40924092
msgid "Startdate is missing. Please enter a start date to publish this timeframe."
40934093
msgstr "Das Startdatum fehlt. Ein Startdatum muss eingegeben werden, damit der Zeitrahmen veröffentlicht werden kann."
40944094

languages/commonsbooking.pot

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GPL v2 or later.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Commons Booking 2.10.3\n"
5+
"Project-Id-Version: Commons Booking 2.10.4\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/commonsbooking\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2025-04-15T14:54:40+00:00\n"
12+
"POT-Creation-Date: 2025-04-24T10:11:01+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.11.0\n"
1515
"X-Domain: commonsbooking\n"
@@ -1506,93 +1506,93 @@ msgstr ""
15061506
msgid "Not set"
15071507
msgstr ""
15081508

1509-
#: src/Model/Timeframe.php:261
1509+
#: src/Model/Timeframe.php:259
15101510
msgid "Available here"
15111511
msgstr ""
15121512

15131513
#. translators: %s = date in WordPress defined format
1514-
#: src/Model/Timeframe.php:266
1514+
#: src/Model/Timeframe.php:264
15151515
msgid "on %s"
15161516
msgstr ""
15171517

15181518
#. translators: %s = date in WordPress defined format
1519-
#: src/Model/Timeframe.php:271
1519+
#: src/Model/Timeframe.php:269
15201520
msgid "from %s"
15211521
msgstr ""
15221522

1523-
#: src/Model/Timeframe.php:275
1523+
#: src/Model/Timeframe.php:273
15241524
msgid "permanently"
15251525
msgstr ""
15261526

15271527
#. translators: %1$s = startdate, second %2$s = enddate in WordPress defined format
1528-
#: src/Model/Timeframe.php:281
1528+
#: src/Model/Timeframe.php:279
15291529
msgid "from %1$s until %2$s"
15301530
msgstr ""
15311531

15321532
#. translators: %s = enddate in WordPress defined format
1533-
#: src/Model/Timeframe.php:288
1533+
#: src/Model/Timeframe.php:286
15341534
msgid "until %s"
15351535
msgstr ""
15361536

1537-
#: src/Model/Timeframe.php:561
1537+
#: src/Model/Timeframe.php:559
15381538
msgid "Could not get item or location. Please set a valid item and location."
15391539
msgstr ""
15401540

1541-
#: src/Model/Timeframe.php:570
1541+
#: src/Model/Timeframe.php:568
15421542
msgid "Item or location is missing. Please set item and location."
15431543
msgstr ""
15441544

1545-
#: src/Model/Timeframe.php:583
1545+
#: src/Model/Timeframe.php:581
15461546
msgid "No dates selected. Please select at least one date."
15471547
msgstr ""
15481548

1549-
#: src/Model/Timeframe.php:593
1549+
#: src/Model/Timeframe.php:591
15501550
msgid "The same date was selected multiple times. Please select each date only once."
15511551
msgstr ""
15521552

1553-
#: src/Model/Timeframe.php:602
1553+
#: src/Model/Timeframe.php:600
15541554
msgid "Startdate is missing. Please enter a start date to publish this timeframe."
15551555
msgstr ""
15561556

1557-
#: src/Model/Timeframe.php:616
1557+
#: src/Model/Timeframe.php:614
15581558
msgid "A pickup time but no return time has been set. Please set the return time."
15591559
msgstr ""
15601560

1561-
#: src/Model/Timeframe.php:626
1561+
#: src/Model/Timeframe.php:624
15621562
msgid "End date is before start date. Please set a valid end date."
15631563
msgstr ""
15641564

1565-
#: src/Model/Timeframe.php:636
1565+
#: src/Model/Timeframe.php:634
15661566
msgid "The start- and end-time of the timeframe can not be the same. Please check the full-day checkbox if you want users to be able to book the full day."
15671567
msgstr ""
15681568

1569-
#: src/Model/Timeframe.php:661
1569+
#: src/Model/Timeframe.php:659
15701570
msgid "Item is already bookable at another location within the same date range. See other timeframe ID: %1$s: %2$s"
15711571
msgstr ""
15721572

15731573
#. translators: first %s = timeframe-ID, second %s is timeframe post_title
1574-
#: src/Model/Timeframe.php:697
1574+
#: src/Model/Timeframe.php:695
15751575
msgid "See overlapping timeframe ID: %1$s %2$s"
15761576
msgstr ""
15771577

1578-
#: src/Model/Timeframe.php:796
1578+
#: src/Model/Timeframe.php:794
15791579
msgid "Overlapping bookable timeframes are only allowed to have the same grid."
15801580
msgstr ""
15811581

1582-
#: src/Model/Timeframe.php:812
1582+
#: src/Model/Timeframe.php:810
15831583
msgid "Daily repeated time periods are not allowed to overlap."
15841584
msgstr ""
15851585

1586-
#: src/Model/Timeframe.php:826
1586+
#: src/Model/Timeframe.php:824
15871587
msgid "Overlapping bookable timeframes are not allowed to have the same weekdays."
15881588
msgstr ""
15891589

1590-
#: src/Model/Timeframe.php:838
1590+
#: src/Model/Timeframe.php:836
15911591
msgid "Overlapping bookable timeframes are not allowed to have the same dates."
15921592
msgstr ""
15931593

1594-
#: src/Model/Timeframe.php:845
1595-
#: src/Model/Timeframe.php:852
1594+
#: src/Model/Timeframe.php:843
1595+
#: src/Model/Timeframe.php:850
15961596
msgid "The other timeframe is overlapping with your weekly configuration."
15971597
msgstr ""
15981598

readme.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributors: wielebenwirteam, m0rb, flegfleg, chriwen, hansmorb, datengraben
33
Donate link: https://www.wielebenwir.de/verein/unterstutzen
44
Tags: booking, calendar, sharing, commoning, open-source
55
Requires at least: 5.9
6-
Tested up to: 6.7
7-
Stable Tag: 2.10.3
6+
Tested up to: 6.8
7+
Stable Tag: 2.10.4
88
Requires PHP: 7.4
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -35,7 +35,7 @@ CommonsBooking was developed for the ["Commons Cargobike" movement](http://commo
3535

3636
* [Official Website](https://commonsbooking.org)
3737
* [Official Documentation](https://commonsbooking.org/dokumentation)
38-
* [Bug-Tracker](https://github.com/wielebenwir/commonsbooking/issues)
38+
* [Bug-Tracker](https://github.com/wielebenwir/commonsbooking/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug)
3939

4040

4141
## Installation
@@ -80,6 +80,11 @@ CommonsBooking was developed for the ["Commons Cargobike" movement](http://commo
8080

8181
## Changelog
8282

83+
### 2.10.4 (25.04.2025)
84+
FIXED: cb_bookings shortcode crashing when location was deleted
85+
FIXED: CB Manager can no longer create holiday timeframe for all items in instance
86+
FIXED: HTML field attributes (thx @janschoenherr)
87+
8388
### 2.10.3 (19.03.2025)
8489
FIXED: Cache not warming up correctly (thx @nelarsen)
8590
FIXED: Backend booking list crashing when user was deleted

0 commit comments

Comments
 (0)