Skip to content

Commit 8a550d9

Browse files
committed
Merge branch 'feature/require-and-use-http-message-util'
2 parents b6f79ec + fc33762 commit 8a550d9

File tree

8 files changed

+34
-1
lines changed

8 files changed

+34
-1
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1111

1212
## [Unreleased]
1313

14+
## [3.21.2] 2025-01-07
15+
16+
- Adds missing `http-message-util` requirement and use statement.
17+
- Runs code-analysis on `os2forms_fbs_handler` module.
18+
1419
## [3.21.1] 2025-01-06
1520

1621
- Updated Maestro notification handler assignment message format.
@@ -328,7 +333,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa
328333
- Security in case of vulnerabilities.
329334
```
330335

331-
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.21.1...HEAD
336+
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.21.2...HEAD
337+
[3.21.2]: https://github.com/OS2Forms/os2forms/compare/3.21.1...3.21.2
332338
[3.21.1]: https://github.com/OS2Forms/os2forms/compare/3.21.0...3.21.1
333339
[3.21.0]: https://github.com/OS2Forms/os2forms/compare/3.20.1...3.21.0
334340
[3.20.1]: https://github.com/OS2Forms/os2forms/compare/3.20.0...3.20.1

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"drupal/webform_validation": "^2.0",
6666
"drupal/webform_views": "^5.0@alpha",
6767
"drupal/workflow_participants": "^3.0@RC",
68+
"fig/http-message-util": "^1.1",
6869
"http-interop/http-factory-guzzle": "^1.0.0",
6970
"itk-dev/beskedfordeler-drupal": "^1.0",
7071
"itk-dev/serviceplatformen": "^1.5",

modules/os2forms_fbs_handler/src/Client/FBS.php

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Drupal\os2forms_fbs_handler\Client\Model\Guardian;
66
use Drupal\os2forms_fbs_handler\Client\Model\Patron;
7+
use Fig\Http\Message\RequestMethodInterface;
78
use GuzzleHttp\Client;
89
use Symfony\Component\HttpFoundation\Request;
910

@@ -242,6 +243,8 @@ public function createGuardian(Patron $patron, Guardian $guardian): int {
242243
*
243244
* @throws \GuzzleHttp\Exception\GuzzleException
244245
* @throws \JsonException
246+
*
247+
* @phpstan-param array<mixed>|string $data
245248
*/
246249
private function request(string $uri, array|string $data, string $method = Request::METHOD_POST): mixed {
247250
$url = rtrim($this->endpoint, '/\\');

modules/os2forms_fbs_handler/src/Client/Model/Guardian.php

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public function __construct(
2222
*
2323
* @return array
2424
* Array with field required by FBS calls.
25+
*
26+
* @phpstan-return array<string, string>
2527
*/
2628
public function toArray(): array {
2729
return [

modules/os2forms_fbs_handler/src/Client/Model/Patron.php

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ final class Patron {
99

1010
/**
1111
* Default constructor.
12+
*
13+
* @phpstan-param array<mixed>|null $notificationProtocols
14+
* @phpstan-param array<mixed>|null $onHold
15+
* @phpstan-param array<mixed>|null $emailAddresses
1216
*/
1317
public function __construct(
1418
public readonly ?string $patronId = NULL,
@@ -35,6 +39,8 @@ public function __construct(
3539
*
3640
* @return array
3741
* Array with field required by FBS calls.
42+
*
43+
* @phpstan-return array<string, string>
3844
*/
3945
public function toArray(): array {
4046
return [

modules/os2forms_fbs_handler/src/Plugin/AdvancedQueue/JobType/FbsCreateUser.php

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ final class FbsCreateUser extends JobTypeBase implements ContainerFactoryPluginI
3535

3636
/**
3737
* {@inheritdoc}
38+
*
39+
* @phpstan-param array<mixed> $configuration
3840
*/
3941
public function __construct(
4042
array $configuration,
@@ -50,6 +52,8 @@ public function __construct(
5052

5153
/**
5254
* {@inheritdoc}
55+
*
56+
* @phpstan-param array<mixed> $configuration
5357
*/
5458
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
5559
return new static(

modules/os2forms_fbs_handler/src/Plugin/WebformHandler/FbsWebformHandler.php

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ final class FbsWebformHandler extends WebformHandlerBase {
4545

4646
/**
4747
* Constructs an FbsWebformHandler object.
48+
*
49+
* @phpstan-param array<mixed> $configuration
4850
*/
4951
public function __construct(
5052
array $configuration,
@@ -70,6 +72,8 @@ public function __construct(
7072

7173
/**
7274
* {@inheritdoc}
75+
*
76+
* @phpstan-param array<mixed> $configuration
7377
*/
7478
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
7579
return new static(
@@ -87,6 +91,10 @@ public static function create(ContainerInterface $container, array $configuratio
8791

8892
/**
8993
* {@inheritdoc}
94+
*
95+
* @phpstan-param array<mixed> $form
96+
*
97+
* @phpstan-return array<mixed>
9098
*/
9199
public function buildConfigurationForm(array $form, FormStateInterface $form_state): array {
92100
if (is_null($this->getQueue())) {
@@ -143,6 +151,8 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
143151

144152
/**
145153
* {@inheritdoc}
154+
*
155+
* @phpstan-param array<mixed> $form
146156
*/
147157
public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void {
148158
parent::submitConfigurationForm($form, $form_state);

phpstan.neon

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
level: 6
33
paths:
44
- modules/os2forms_digital_post/
5+
- modules/os2forms_fbs_handler/
56
excludePaths:
67
# @see https://github.com/mglaman/drupal-check/issues/261#issuecomment-1030141772/
78
- vendor

0 commit comments

Comments
 (0)