From d9e43ac7f7217f251f89062c5e188e2f3c13f745 Mon Sep 17 00:00:00 2001 From: freek Date: Fri, 8 Jan 2021 09:27:15 +0100 Subject: [PATCH] wip --- CHANGELOG.md | 4 ++++ src/helpers.php | 10 +++++++++- .../subSubDirectory/{.placeholder => .gitkeep} | 0 3 files changed, 13 insertions(+), 1 deletion(-) rename tests/testSettings/subDirectory/subSubDirectory/{.placeholder => .gitkeep} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0137322b..66fe7288 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `ray` will be documented in this file +## 1.1.3 - 2020-01-08 + +- prevent exception when installing in an Orchestra powered testsuite + ## 1.1.2 - 2020-01-08 - enforce Composer 2 requirement diff --git a/src/helpers.php b/src/helpers.php index 45902c96..8e3bfa4b 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -1,5 +1,6 @@ send(...$args); + try { + return app(LaravelRay::class)->send(...$args); + } + catch(BindingResolutionException $exception) { + // this exception can occur when requiring spatie/ray in an Orchestra powered + // testsuite without spatie/laravel-ray's service provider being registered + // in `getPackageProviders` of the base test suite + } } $settings = SettingsFactory::createFromConfigFile(); diff --git a/tests/testSettings/subDirectory/subSubDirectory/.placeholder b/tests/testSettings/subDirectory/subSubDirectory/.gitkeep similarity index 100% rename from tests/testSettings/subDirectory/subSubDirectory/.placeholder rename to tests/testSettings/subDirectory/subSubDirectory/.gitkeep