Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Class 'Illuminate\Foundation\Application' not found in file (When using Lumen) #1042

Closed
pataar opened this issue Sep 8, 2020 · 9 comments · Fixed by #1043
Closed

Comments

@pataar
Copy link
Contributor

pataar commented Sep 8, 2020

Versions:

  • ide-helper Version: 2.8.1
  • Lumen Version: 7.2.1
  • PHP Version: 7.2.24

Description:

It seems that a change broke the integration with Lumen. IlluminateFoundation\Application is not available there.

@pataar pataar added the bug label Sep 8, 2020
@DannyvdSluijs
Copy link
Contributor

I guess for anyone trying to reproduce this some additional info can be very helpful. Perhaps you have a stack trace or could you share your composer.lock and composer.json?

@pataar
Copy link
Contributor Author

pataar commented Sep 8, 2020

Due to company restrictions I can't share those files fully. But I can provide more information when needed

@mfn mfn added the lumen label Sep 8, 2020
@mfn
Copy link
Collaborator

mfn commented Sep 8, 2020

I stacktrace would be helpful but I can imagine a simple test with lumen and installing it will already expose it (don't have the time right now though)

@pataar
Copy link
Contributor Author

pataar commented Sep 8, 2020

  1. composer create-project --prefer-dist laravel/lumen sample && cd sample
  2. composer require --dev barryvdh/laravel-ide-helper
  3. composer require league/flysystem #otherwise it won't run
  4. Follow the "Usage with Lumen" steps from README.md
  5. php artisan ide-helper:generate

image

@mfn
Copy link
Collaborator

mfn commented Sep 8, 2020

Thanks!

The Laravel 8 comaptibility PR #1026 broke Lumen 😢

mfn added a commit to mfn/laravel-ide-helper that referenced this issue Sep 8, 2020
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.
@mfn mfn mentioned this issue Sep 8, 2020
9 tasks
mfn added a commit to mfn/laravel-ide-helper that referenced this issue Sep 8, 2020
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.
@mfn
Copy link
Collaborator

mfn commented Sep 8, 2020

@pataar can you give #1043 a try?

Applying the source change locally and see if generate works should be sufficient.

Thanks

@pataar
Copy link
Contributor Author

pataar commented Sep 8, 2020

Yes, I'll let you know tomorrow

@pataar
Copy link
Contributor Author

pataar commented Sep 8, 2020

Thanks in advance for the fix!

mfn added a commit to mfn/laravel-ide-helper that referenced this issue Sep 8, 2020
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.
@pataar
Copy link
Contributor Author

pataar commented Sep 9, 2020

@mfn I tested #1043 and the issue seems to be resolved after applying the fix.

mfn added a commit to mfn/laravel-ide-helper that referenced this issue Sep 9, 2020
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.
barryvdh pushed a commit that referenced this issue Sep 11, 2020
* Fix compatibility with Lumen

Fixes #1042

Got broken by #1026

TL;DR: can't use anything in the `Illuminate\Foundation` namespace
without safety check, as it doesn't exist in Lumen.

* Add helper to check for Laravel

* Use helper to check for Laravel
fatihdirikman added a commit to fatihdirikman/Laravel-IDE-Helper that referenced this issue Jan 7, 2022
* Fix compatibility with Lumen

Fixes barryvdh/laravel-ide-helper#1042

Got broken by barryvdh/laravel-ide-helper#1026

TL;DR: can't use anything in the `Illuminate\Foundation` namespace
without safety check, as it doesn't exist in Lumen.

* Add helper to check for Laravel

* Use helper to check for Laravel
renaforsberg824 added a commit to renaforsberg824/ide-helper-laravel-developer that referenced this issue Oct 5, 2022
* Fix compatibility with Lumen

Fixes barryvdh/laravel-ide-helper#1042

Got broken by barryvdh/laravel-ide-helper#1026

TL;DR: can't use anything in the `Illuminate\Foundation` namespace
without safety check, as it doesn't exist in Lumen.

* Add helper to check for Laravel

* Use helper to check for Laravel
lisadeloach63 added a commit to lisadeloach63/ide-helper-reso-laravel that referenced this issue Oct 7, 2022
* Fix compatibility with Lumen

Fixes barryvdh/laravel-ide-helper#1042

Got broken by barryvdh/laravel-ide-helper#1026

TL;DR: can't use anything in the `Illuminate\Foundation` namespace
without safety check, as it doesn't exist in Lumen.

* Add helper to check for Laravel

* Use helper to check for Laravel
sadafrangian3 pushed a commit to sadafrangian3/ide-helper-laravel that referenced this issue Oct 18, 2022
* Fix compatibility with Lumen

Fixes barryvdh/laravel-ide-helper#1042

Got broken by barryvdh/laravel-ide-helper#1026

TL;DR: can't use anything in the `Illuminate\Foundation` namespace
without safety check, as it doesn't exist in Lumen.

* Add helper to check for Laravel

* Use helper to check for Laravel
smile1130 added a commit to smile1130/laravel-IDE that referenced this issue Jun 16, 2023
* Fix compatibility with Lumen

Fixes barryvdh/laravel-ide-helper#1042

Got broken by barryvdh/laravel-ide-helper#1026

TL;DR: can't use anything in the `Illuminate\Foundation` namespace
without safety check, as it doesn't exist in Lumen.

* Add helper to check for Laravel

* Use helper to check for Laravel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants