Skip to content

Commit 844d58a

Browse files
committed
Fix compatibility with Lumen
Fixes barryvdh#1042 Got broken by barryvdh#1026 TL;DR: can't use anything in the `Illuminate\Foundation` namespace without safety check, as it doesn't exist in Lumen.
1 parent 594534e commit 844d58a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ All notable changes to this project will be documented in this file.
99
- Fix phpdoc generate for custom cast with parameter [\#986 / artelkr](https://github.com/barryvdh/laravel-ide-helper/pull/986)
1010
- Created a possibility to add custom relation type [\#987 / efinder2](https://github.com/barryvdh/laravel-ide-helper/pull/987)
1111

12+
### Fixed
13+
- Compatibility with Lumen [\#1043 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1043)
14+
1215
2020-09-07, 2.8.1
1316
-----------------
1417
### Added

src/IdeHelperServiceProvider.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ private function createLocalViewFactory()
116116
{
117117
$resolver = new EngineResolver();
118118
$resolver->register('php', function () {
119-
if ((int) Application::VERSION < 8) {
119+
// version check is Laravel specific and doesn't work in Lumen
120+
if (class_exists(Application::class) && (int) Application::VERSION < 8) {
120121
return new PhpEngine();
121122
}
122123

0 commit comments

Comments
 (0)