Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 470bdfc

Browse files
authored
Merge pull request #140 from netglue/dependency-refresh
Update Psalm to ^5.4 and Doctrine Coding Standard to ^11
2 parents 2018fac + 7057a7e commit 470bdfc

13 files changed

+493
-388
lines changed

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
}
3939
},
4040
"require-dev": {
41-
"doctrine/coding-standard": "^10.0",
42-
"laminas/laminas-config-aggregator": "^1.11",
43-
"laminas/laminas-servicemanager": "^3.19",
44-
"lctrs/psalm-psr-container-plugin": "^1.8",
45-
"phpunit/phpunit": "^9.5.26",
46-
"psalm/plugin-phpunit": "^0.17.0",
41+
"doctrine/coding-standard": "^11.0",
42+
"laminas/laminas-config-aggregator": "^1.13",
43+
"laminas/laminas-servicemanager": "^3.20",
44+
"lctrs/psalm-psr-container-plugin": "^1.9",
45+
"phpunit/phpunit": "^9.5.27",
46+
"psalm/plugin-phpunit": "^0.18.4",
4747
"roave/security-advisories": "dev-latest",
4848
"symfony/cache": "^5.4.15",
49-
"vimeo/psalm": "^4.29"
49+
"vimeo/psalm": "^5.4"
5050
},
5151
"conflict": {
5252
"guzzlehttp/guzzle": "^6.0"

composer.lock

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

src/Validator/MessageValidator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ final class MessageValidator extends ValidatorChain
2020
public function __construct(ValidatorPluginManager|null $pluginManager = null)
2121
{
2222
parent::__construct();
23+
2324
if ($pluginManager) {
2425
$this->setPluginManager($pluginManager);
2526
}

tests/Container/PermittedSendersFactoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class PermittedSendersFactoryTest extends TestCase
2020
protected function setUp(): void
2121
{
2222
parent::setUp();
23+
2324
$this->container = $this->createMock(ContainerInterface::class);
2425
}
2526

tests/Container/SuppressionListFactoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class SuppressionListFactoryTest extends TestCase
1919
protected function setUp(): void
2020
{
2121
parent::setUp();
22+
2223
$this->container = $this->createMock(ContainerInterface::class);
2324
}
2425

tests/PermittedSendersTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class PermittedSendersTest extends TestCase
2222
protected function setUp(): void
2323
{
2424
parent::setUp();
25+
2526
$this->client = $this->createMock(PostmarkAdminClient::class);
2627
$this->cache = new ArrayAdapter();
2728
}

tests/ServiceManagerIntegrationTest.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
use Psr\Cache\CacheItemPoolInterface;
2020
use Symfony\Component\Cache\Adapter\ArrayAdapter;
2121

22-
use function assert;
23-
use function is_array;
24-
22+
/** @psalm-import-type ServiceManagerConfiguration from ServiceManager */
2523
class ServiceManagerIntegrationTest extends TestCase
2624
{
2725
private ServiceManager $serviceManager;
@@ -44,11 +42,11 @@ protected function setUp(): void
4442
new ArrayProvider($config),
4543
]);
4644
$config = $aggregator->getMergedConfig();
47-
assert(is_array($config['dependencies']));
48-
/** @psalm-suppress MixedArrayAssignment */
49-
$config['dependencies']['services']['config'] = $config;
50-
/** @psalm-suppress MixedArgumentTypeCoercion */
51-
$this->serviceManager = new ServiceManager($config['dependencies']);
45+
/** @psalm-var ServiceManagerConfiguration $dependencies */
46+
$dependencies = $config['dependencies'] ?? [];
47+
unset($dependencies['services']['config']);
48+
$dependencies['services']['config'] = $config;
49+
$this->serviceManager = new ServiceManager($dependencies);
5250
$this->serviceManager->setService('cache', $this->setUpCache());
5351
}
5452

tests/SuppressionListTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class SuppressionListTest extends TestCase
2323
protected function setUp(): void
2424
{
2525
parent::setUp();
26+
2627
$this->client = $this->createMock(PostmarkClient::class);
2728
$this->cache = new ArrayAdapter();
2829
$this->list = new SuppressionList($this->client, $this->cache);

tests/Transport/PostmarkTransportTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class PostmarkTransportTest extends TestCase
3636
protected function setUp(): void
3737
{
3838
parent::setUp();
39+
3940
$this->client = $this->createMock(PostmarkClient::class);
4041
$this->validator = new MessageValidator();
4142
}

tests/Validator/FromAddressValidatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class FromAddressValidatorTest extends TestCase
1818
protected function setUp(): void
1919
{
2020
parent::setUp();
21+
2122
$this->permittedSenders = $this->createMock(PermittedSenders::class);
2223
}
2324

0 commit comments

Comments
 (0)