From 53ee5690ae54a0661615ffeefe959d2c67b8616d Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Thu, 15 Oct 2026 12:55:28 -0500 Subject: [PATCH 1/2] chore(deps): bump webware-tools to 1.0.0-rc.6 Moves the dev dependency from ^1.0.0-rc.5 to ^1.0.0-rc.6. The rc.6 vendored mago.toml pins mago 1.57.0 instead of 1.55.0 and drops preserve-breaking-member-access-chain-first-method-on-same-line, so the formatter now starts a fluent chain on the receiver line. The resulting format pass lands in the next commit. --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 84ec4a8..e8ed257 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "roave/backward-compatibility-check": "^8.21.0", "roave/security-advisories": "dev-master", "webware/messagebus-event": "^2.0.0-beta.1", - "webware/webware-tools": "^1.0.0-rc.5" + "webware/webware-tools": "^1.0.0-rc.6" }, "suggest": { "laminas/laminas-view": "Required when the consuming application does not provide the HelperPluginManager service used by the SystemMessenger view helper" diff --git a/composer.lock b/composer.lock index dd1a322..8202ac7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0e58a9ab7f76169b2b153d0a872f1bfe", + "content-hash": "2356937aa013418a7232be0806f1a965", "packages": [ { "name": "dflydev/fig-cookies", @@ -10561,16 +10561,16 @@ }, { "name": "webware/webware-tools", - "version": "1.0.0-rc.5", + "version": "1.0.0-rc.6", "source": { "type": "git", "url": "https://github.com/webinertia/webware-tools.git", - "reference": "46caed444973f45ae81c27909d55ffc5602e3175" + "reference": "d005c08ff563a5086d50c2ea4a9cb36b9052192a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webinertia/webware-tools/zipball/46caed444973f45ae81c27909d55ffc5602e3175", - "reference": "46caed444973f45ae81c27909d55ffc5602e3175", + "url": "https://api.github.com/repos/webinertia/webware-tools/zipball/d005c08ff563a5086d50c2ea4a9cb36b9052192a", + "reference": "d005c08ff563a5086d50c2ea4a9cb36b9052192a", "shasum": "" }, "require": { @@ -10599,9 +10599,9 @@ ], "support": { "issues": "https://github.com/webinertia/webware-tools/issues", - "source": "https://github.com/webinertia/webware-tools/tree/1.0.0-rc.5" + "source": "https://github.com/webinertia/webware-tools/tree/1.0.0-rc.6" }, - "time": "2026-10-10T04:07:50+00:00" + "time": "2026-10-15T06:56:25+00:00" } ], "aliases": [], From 4dfdb6eddb596058b81050bea29f2ca59069ec33 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Thu, 15 Oct 2026 12:55:28 -0500 Subject: [PATCH 2/2] chore: apply mago 1.57.0 formatting Reformats the files mago 1.57.0 lays out differently from 1.55.0: a chain whose receiver is a variable now starts on the receiver's own line. Whitespace only, verified by comparing each file against HEAD with all whitespace stripped and by comparing PHP token streams for equality. --- .../MessageMiddlewareFactoryTest.php | 3 +- .../Http/Middleware/MessageMiddlewareTest.php | 3 +- .../Middleware/NotificationMiddlewareTest.php | 30 ++++++++++++------- test/unit/SystemMessengerTest.php | 12 +++++--- test/unit/View/Helper/SystemMessengerTest.php | 6 ++-- 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/test/unit/Http/Middleware/Container/MessageMiddlewareFactoryTest.php b/test/unit/Http/Middleware/Container/MessageMiddlewareFactoryTest.php index aeac123..c512a4f 100644 --- a/test/unit/Http/Middleware/Container/MessageMiddlewareFactoryTest.php +++ b/test/unit/Http/Middleware/Container/MessageMiddlewareFactoryTest.php @@ -50,7 +50,8 @@ public function factoryBuildsMiddlewareUsingHelperFromPluginManager(): void ); $container = $this->createStub(ContainerInterface::class); - $container->method('get') + $container + ->method('get') ->willReturnCallback( static fn(string $id): mixed => HelperPluginManager::class === $id ? $helperManager : null, ); diff --git a/test/unit/Http/Middleware/MessageMiddlewareTest.php b/test/unit/Http/Middleware/MessageMiddlewareTest.php index bebbc89..7504a5e 100644 --- a/test/unit/Http/Middleware/MessageMiddlewareTest.php +++ b/test/unit/Http/Middleware/MessageMiddlewareTest.php @@ -52,7 +52,8 @@ public function processInjectsMessengerIntoHelperAndRequestAttribute(): void $response = $this->createStub(ResponseInterface::class); $capturedMessenger = null; $handler = $this->createMock(RequestHandlerInterface::class); - $handler->expects($this->once()) + $handler + ->expects($this->once()) ->method('handle') ->willReturnCallback( static function (ServerRequestInterface $request) use ( diff --git a/test/unit/Http/Middleware/NotificationMiddlewareTest.php b/test/unit/Http/Middleware/NotificationMiddlewareTest.php index f09f99b..7985f06 100644 --- a/test/unit/Http/Middleware/NotificationMiddlewareTest.php +++ b/test/unit/Http/Middleware/NotificationMiddlewareTest.php @@ -44,11 +44,13 @@ public function processDoesNotNotifyWhenCommandIsNotNotificationCapable(): void $messenger->expects($this->never())->method('sendNow'); $handler = $this->createMock(RequestHandlerInterface::class); - $handler->expects($this->once()) + $handler + ->expects($this->once()) ->method('handle') ->willReturn($response); - $request = new ServerRequest()->withAttribute(SystemMessengerInterface::class, $messenger) + $request = new ServerRequest() + ->withAttribute(SystemMessengerInterface::class, $messenger) ->withAttribute( CommandResult::class, new CommandResult($this->createStub(CommandInterface::class), MessageStatus::Success, null), @@ -69,7 +71,8 @@ public function processPushesFailureNotification(): void $capturedMessage = null; $messenger = $this->createMock(SystemMessengerInterface::class); - $messenger->expects($this->once()) + $messenger + ->expects($this->once()) ->method('sendNow') ->willReturnCallback( static function (string $message, MessageLevel $key, ?int $hops = 0) use ( @@ -84,11 +87,13 @@ static function (string $message, MessageLevel $key, ?int $hops = 0) use ( ); $handler = $this->createMock(RequestHandlerInterface::class); - $handler->expects($this->once()) + $handler + ->expects($this->once()) ->method('handle') ->willReturn($response); - $request = new ServerRequest()->withAttribute(SystemMessengerInterface::class, $messenger) + $request = new ServerRequest() + ->withAttribute(SystemMessengerInterface::class, $messenger) ->withAttribute( CommandResult::class, new CommandResult($this->command('Role saved.', 'Role not saved.'), MessageStatus::Failure, null), @@ -112,7 +117,8 @@ public function processPushesSuccessNotification(): void $capturedMessage = null; $messenger = $this->createMock(SystemMessengerInterface::class); - $messenger->expects($this->once()) + $messenger + ->expects($this->once()) ->method('sendNow') ->willReturnCallback( static function (string $message, MessageLevel $key, ?int $hops = 0) use ( @@ -127,11 +133,13 @@ static function (string $message, MessageLevel $key, ?int $hops = 0) use ( ); $handler = $this->createMock(RequestHandlerInterface::class); - $handler->expects($this->once()) + $handler + ->expects($this->once()) ->method('handle') ->willReturn($response); - $request = new ServerRequest()->withAttribute(SystemMessengerInterface::class, $messenger) + $request = new ServerRequest() + ->withAttribute(SystemMessengerInterface::class, $messenger) ->withAttribute( CommandResult::class, new CommandResult($this->command('Role saved.', 'Role not saved.'), MessageStatus::Success, null), @@ -151,7 +159,8 @@ public function processReturnsHandlerResponseWhenMessengerAttributeIsMissing(): { $response = $this->createStub(ResponseInterface::class); $handler = $this->createMock(RequestHandlerInterface::class); - $handler->expects($this->once()) + $handler + ->expects($this->once()) ->method('handle') ->willReturn($response); @@ -171,7 +180,8 @@ public function processReturnsHandlerResponseWhenResultAttributeIsMissing(): voi { $response = $this->createStub(ResponseInterface::class); $handler = $this->createMock(RequestHandlerInterface::class); - $handler->expects($this->once()) + $handler + ->expects($this->once()) ->method('handle') ->willReturn($response); diff --git a/test/unit/SystemMessengerTest.php b/test/unit/SystemMessengerTest.php index 7e1d9e4..3475e31 100644 --- a/test/unit/SystemMessengerTest.php +++ b/test/unit/SystemMessengerTest.php @@ -600,21 +600,25 @@ protected function setUp(): void { $this->storage = []; $this->session = $this->createStub(SessionInterface::class); - $this->session->method('get') + $this->session + ->method('get') ->willReturnCallback( fn(string $name, mixed $default = null): mixed => $this->storage[$name] ?? $default, ); - $this->session->method('has') + $this->session + ->method('has') ->willReturnCallback( fn(string $name): bool => array_key_exists($name, $this->storage), ); - $this->session->method('set') + $this->session + ->method('set') ->willReturnCallback( function (string $name, mixed $value): void { $this->storage[$name] = $value; }, ); - $this->session->method('unset') + $this->session + ->method('unset') ->willReturnCallback( function (string $name): void { unset($this->storage[$name]); diff --git a/test/unit/View/Helper/SystemMessengerTest.php b/test/unit/View/Helper/SystemMessengerTest.php index 7eb43a4..33e8560 100644 --- a/test/unit/View/Helper/SystemMessengerTest.php +++ b/test/unit/View/Helper/SystemMessengerTest.php @@ -111,11 +111,13 @@ private function messengerWithMessages(array $messages): SystemMessenger { $storage = [SystemMessengerInterface::SESSION_KEY => $messages]; $session = $this->createStub(SessionInterface::class); - $session->method('get') + $session + ->method('get') ->willReturnCallback( static fn(string $name, mixed $default = null): mixed => $storage[$name] ?? $default, ); - $session->method('has') + $session + ->method('has') ->willReturnCallback( static fn(string $name): bool => array_key_exists($name, $storage), );