Skip to content

Commit 1ea090d

Browse files
authored
v2.2.6 (#230)
2 parents c8e498c + f789a05 commit 1ea090d

File tree

18 files changed

+124
-130
lines changed

18 files changed

+124
-130
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.5
1+
2.2.6

composer.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config-sample.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ church_suite:
2323
api_application: ''
2424
api_key: ''
2525
org: ''
26+
service_ids: []
2627
tag_id_adults: 1
2728
tag_id_children: 2
2829

src/classes/config/config-churchsuite.class.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ class Config_ChurchSuite extends Config_Section
3030
*/
3131
public readonly string $org;
3232

33+
/**
34+
* Church Suite service IDs, to exclude non-service rotas from imports.
35+
*
36+
* @var int[]
37+
*/
38+
public readonly array $service_ids;
39+
3340
/**
3441
* Church Suite Tag ID for adults who have consented to be in the Prayer Calendar.
3542
*
@@ -55,6 +62,7 @@ public function __construct(array $config)
5562
$this->api_application = Arr::get($config, "api_application", "");
5663
$this->api_key = Arr::get($config, "api_key", "");
5764
$this->org = Arr::get($config, "org", "");
65+
$this->service_ids = Arr::get($config, "service_ids", []);
5866
$this->tag_id_adults = Arr::get_integer($config, "tag_id_adults", 0);
5967
$this->tag_id_children = Arr::get_integer($config, "tag_id_children", 0);
6068
}
@@ -65,6 +73,7 @@ public function as_array(): array
6573
"api_application" => $this->api_application,
6674
"api_key" => $this->api_key,
6775
"org" => $this->org,
76+
"service_ids" => $this->service_ids,
6877
"tag_id_adults" => $this->tag_id_adults,
6978
"tag_id_children" => $this->tag_id_children,
7079
];

src/pages/upload/rota-period.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public static function create(DateTimeImmutable $first_day, DateTimeImmutable $l
4343
"group_by" => "time",
4444
"date_start" => $first_day->format("Y-m-d"),
4545
"date_end" => $last_day->format("Y-m-d"),
46-
"show_empty_dates" => "1"
46+
"show_empty_dates" => "1",
47+
"service_ids" => C::$churchsuite->service_ids
4748
);
4849
$href = sprintf(self::ROTA_HREF, C::$churchsuite->org, http_build_query($query_values));
4950

vendor/autoload.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
echo $err;
1515
}
1616
}
17-
throw new RuntimeException($err);
17+
trigger_error(
18+
$err,
19+
E_USER_ERROR
20+
);
1821
}
1922

2023
require_once __DIR__ . '/composer/autoload_real.php';

vendor/bin/phpstan

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ if (PHP_VERSION_ID < 80000) {
112112
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
113113
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
114114
) {
115-
return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan');
115+
include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan');
116+
exit(0);
116117
}
117118
}
118119

119-
return include __DIR__ . '/..'.'/phpstan/phpstan/phpstan';
120+
include __DIR__ . '/..'.'/phpstan/phpstan/phpstan';

vendor/bin/phpstan.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@ECHO OFF
2+
setlocal DISABLEDELAYEDEXPANSION
3+
SET BIN_TARGET=%~dp0/phpstan
4+
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
5+
php "%BIN_TARGET%" %*

vendor/bin/phpstan.phar

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ if (PHP_VERSION_ID < 80000) {
112112
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
113113
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
114114
) {
115-
return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar');
115+
include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar');
116+
exit(0);
116117
}
117118
}
118119

119-
return include __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar';
120+
include __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar';

vendor/bin/phpstan.phar.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@ECHO OFF
2+
setlocal DISABLEDELAYEDEXPANSION
3+
SET BIN_TARGET=%~dp0/phpstan.phar
4+
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
5+
php "%BIN_TARGET%" %*

0 commit comments

Comments
 (0)