Skip to content

Commit b5998e6

Browse files
author
Sebastian Fix
committed
Remvoed Azure Event Logs
1 parent 8fd553d commit b5998e6

20 files changed

Lines changed: 206 additions & 95 deletions

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
max-parallel: 1
1515
matrix:
1616
os: [ ubuntu-latest ]
17-
php: [ 8.3, 8.5 ]
17+
php: [ 8.3, 8.4, 8.5 ]
1818
laravel: [ 13.* ]
1919
stability: [ prefer-lowest, prefer-stable ]
2020

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ composer require codebar-ag/laravel-m-files
2020

2121
### Requirements
2222

23-
- PHP **8.3+**
24-
- Laravel **13.x** (the package targets `illuminate/contracts` and `illuminate/support` **^13**)
23+
#### PHP and Laravel compatibility
24+
25+
| Package release | PHP (Composer constraint) | Laravel |
26+
|-----------------|---------------------------|---------|
27+
| **v13.x** | `8.3.*\|8.4.*\|8.5.*` | **^13.0** |
28+
| **v12.x** | `8.2.*\|8.3.*\|8.4.*` | **^12.0** |
29+
30+
Install a package version whose row matches your application’s PHP and Laravel versions. The **current** major release is **v13.x** (see [Packagist](https://packagist.org/packages/codebar-ag/laravel-m-files) for the exact tag).
2531

2632
## Configuration
2733

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^8.3",
23+
"php": "8.3.*|8.4.*|8.5.*",
2424
"guzzlehttp/guzzle": "^7.9.2",
2525
"illuminate/contracts": "^13.0",
2626
"illuminate/support": "^13.0",

phpstan-baseline.neon

Lines changed: 54 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,55 @@
11
parameters:
2-
ignoreErrors:
3-
-
4-
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\|Pest\\Support\\HigherOrderTapProxy\:\:expect\(\)\.$#'
5-
identifier: method.notFound
6-
count: 1
7-
path: tests/Core/ArchTest.php
8-
9-
-
10-
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$config\.$#'
11-
identifier: property.notFound
12-
count: 1
13-
path: tests/Feature/Requests/DownloadFileRequestTest.php
14-
15-
-
16-
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$connector\.$#'
17-
identifier: property.notFound
18-
count: 1
19-
path: tests/Feature/Requests/DownloadFileRequestTest.php
20-
21-
-
22-
message: '#^Assign to protected\(set\) property CodebarAg\\MFiles\\DTO\\DownloadedFile\:\:\$content\.$#'
23-
identifier: assign.propertyProtectedSet
24-
count: 1
25-
path: tests/Unit/DTO/DownloadedFileTest.php
26-
27-
-
28-
message: '#^Assign to protected\(set\) property CodebarAg\\MFiles\\DTO\\File\:\:\$id\.$#'
29-
identifier: assign.propertyProtectedSet
30-
count: 1
31-
path: tests/Unit/DTO/FileTest.php
32-
33-
-
34-
message: '#^Assign to protected\(set\) property CodebarAg\\MFiles\\DTO\\ObjectProperties\:\:\$classId\.$#'
35-
identifier: assign.propertyProtectedSet
36-
count: 1
37-
path: tests/Unit/DTO/ObjectPropertiesTest.php
38-
39-
-
40-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Carbon\\\\CarbonImmutable'' and Carbon\\CarbonImmutable will always evaluate to true\.$#'
41-
identifier: method.alreadyNarrowedType
42-
count: 3
43-
path: tests/Unit/DTO/ObjectPropertiesTest.php
44-
45-
-
46-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Illuminate\\\\Support\\\\Collection'' and Illuminate\\Support\\Collection will always evaluate to true\.$#'
47-
identifier: method.alreadyNarrowedType
48-
count: 6
49-
path: tests/Unit/DTO/ObjectPropertiesTest.php
50-
51-
-
52-
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$cacheManager\.$#'
53-
identifier: property.notFound
54-
count: 9
55-
path: tests/Unit/Helpers/CacheKeyManagerTest.php
56-
57-
-
58-
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$config\.$#'
59-
identifier: property.notFound
60-
count: 1
61-
path: tests/Unit/Helpers/CacheKeyManagerTest.php
2+
ignoreErrors:
3+
-
4+
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\|Pest\\Support\\HigherOrderTapProxy\:\:expect\(\)\.$#'
5+
identifier: method.notFound
6+
count: 1
7+
path: tests/Core/ArchTest.php
8+
9+
-
10+
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$config\.$#'
11+
identifier: property.notFound
12+
count: 1
13+
path: tests/Feature/Requests/DownloadFileRequestTest.php
14+
15+
-
16+
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$connector\.$#'
17+
identifier: property.notFound
18+
count: 1
19+
path: tests/Feature/Requests/DownloadFileRequestTest.php
20+
21+
-
22+
message: '#^Assign to protected\(set\) property CodebarAg\\MFiles\\DTO\\DownloadedFile\:\:\$content\.$#'
23+
identifier: assign.propertyProtectedSet
24+
count: 1
25+
path: tests/Unit/DTO/DownloadedFileTest.php
26+
27+
-
28+
message: '#^Assign to protected\(set\) property CodebarAg\\MFiles\\DTO\\File\:\:\$id\.$#'
29+
identifier: assign.propertyProtectedSet
30+
count: 1
31+
path: tests/Unit/DTO/FileTest.php
32+
33+
-
34+
message: '#^Assign to protected\(set\) property CodebarAg\\MFiles\\DTO\\ObjectProperties\:\:\$classId\.$#'
35+
identifier: assign.propertyProtectedSet
36+
count: 1
37+
path: tests/Unit/DTO/ObjectPropertiesTest.php
38+
39+
-
40+
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Carbon\\\\CarbonImmutable'' and Carbon\\CarbonImmutable will always evaluate to true\.$#'
41+
identifier: method.alreadyNarrowedType
42+
count: 3
43+
path: tests/Unit/DTO/ObjectPropertiesTest.php
44+
45+
-
46+
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$cacheManager\.$#'
47+
identifier: property.notFound
48+
count: 9
49+
path: tests/Unit/Helpers/CacheKeyManagerTest.php
50+
51+
-
52+
message: '#^Access to an undefined property PHPUnit\\Framework\\TestCase\:\:\$config\.$#'
53+
identifier: property.notFound
54+
count: 1
55+
path: tests/Unit/Helpers/CacheKeyManagerTest.php

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 5
5+
level: 6
66
paths:
77
- config
88
- src

src/DTO/ConfigWithCredentials.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ public function __construct(
1616
public string $password,
1717
public ?string $cacheDriver = null,
1818
public int $tokenTtlSeconds = 3600,
19-
) {}
19+
) {
20+
if ($this->tokenTtlSeconds < 1) {
21+
throw new InvalidArgumentException('Config [tokenTtlSeconds] must be at least 1 second.');
22+
}
23+
}
2024

25+
/**
26+
* @param array<string, mixed> $data
27+
*/
2128
public static function fromArray(array $data): self
2229
{
2330
return new self(
@@ -34,6 +41,9 @@ public static function fromArray(array $data): self
3441
);
3542
}
3643

44+
/**
45+
* @return array<string, mixed>
46+
*/
3747
public function toArray(): array
3848
{
3949
return [
@@ -79,6 +89,10 @@ private static function optionalString(array $data, string $key, ?string $defaul
7989
throw new InvalidArgumentException("Config [{$key}] must be a string or null.");
8090
}
8191

92+
if ($value === '') {
93+
return null;
94+
}
95+
8296
return $value;
8397
}
8498

src/DTO/DownloadedFile.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public function __construct(
1616
public readonly string $content,
1717
) {}
1818

19+
/**
20+
* @param array<string, mixed> $data
21+
*/
1922
public static function fromArray(array $data): self
2023
{
2124
return new self(
@@ -27,6 +30,9 @@ public static function fromArray(array $data): self
2730
);
2831
}
2932

33+
/**
34+
* @return array<string, mixed>
35+
*/
3036
public function toArray(): array
3137
{
3238
return [

src/DTO/File.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public function __construct(
1616
public readonly ?int $size
1717
) {}
1818

19+
/**
20+
* @param array<string, mixed> $data
21+
*/
1922
public static function fromArray(array $data): self
2023
{
2124
return new self(
@@ -27,6 +30,9 @@ public static function fromArray(array $data): self
2730
);
2831
}
2932

33+
/**
34+
* @return array<string, mixed>
35+
*/
3036
public function toArray(): array
3137
{
3238
return [

src/DTO/GetProperty.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public function __construct(
1616
public readonly mixed $displayValue,
1717
) {}
1818

19+
/**
20+
* @param array<string, mixed> $data
21+
*/
1922
public static function fromArray(array $data): self
2023
{
2124
$dataTypeValue = Arr::get($data, 'Value.DataType');
@@ -49,6 +52,9 @@ private static function getValues(MFDataTypeEnum $dataType, mixed $value): mixed
4952
};
5053
}
5154

55+
/**
56+
* @return array<string, mixed>
57+
*/
5258
public function toArray(): array
5359
{
5460
return [

src/DTO/MFilesError.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public function __construct(
1818
public readonly ?string $stack,
1919
) {}
2020

21+
/**
22+
* @param array<string, mixed> $data
23+
*/
2124
public static function fromArray(array $data): self
2225
{
2326
$exceptionData = Arr::get($data, 'Exception', []);
@@ -33,6 +36,9 @@ public static function fromArray(array $data): self
3336
);
3437
}
3538

39+
/**
40+
* @return array<string, mixed>
41+
*/
3642
public function toArray(): array
3743
{
3844
return [

0 commit comments

Comments
 (0)