From 59f389ef74130b4720604a16dc1aba7148603e64 Mon Sep 17 00:00:00 2001 From: Anton Ukhanev Date: Thu, 2 Jul 2020 15:16:59 +0200 Subject: [PATCH] `run()` now returns `void` Fixes #19. BC Breaking!!! --- CHANGELOG.md | 4 ++++ src/ModuleInterface.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc72536..f42b8e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [[*next-version*]] - YYYY-MM-DD +### Changed +- **BC Breaking** - The return type of `ModuleInterface#run()` is now `void`. + This will break any subtypes that did not declare a return type, + because `void` is more specific than `mixed`. ## [0.2.0-alpha1] - 2020-04-10 ### Changed diff --git a/src/ModuleInterface.php b/src/ModuleInterface.php index 1ad5c25..3e97c6e 100644 --- a/src/ModuleInterface.php +++ b/src/ModuleInterface.php @@ -48,5 +48,5 @@ public function setup() : ServiceProviderInterface; * * @throws ModuleExceptionInterface If the module failed to run. */ - public function run(ContainerInterface $c); + public function run(ContainerInterface $c): void; }