mcamara / laravel-localization

Easy localization for Laravel
MIT License
3.38k stars 515 forks source link

Class 'Illuminate\Support\Env' in older Laravel Versions #748

Closed Sacerdoss closed 4 years ago

Sacerdoss commented 4 years ago

Tested on Laravel 5.8 requiring "mcamara/laravel-localization": "^1.3" fails with the latest commit fdb68d2a1f09c852e557420a1688dec038311938

Writing lock file Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi In LaravelLocalization.php line 1040:

Class 'Illuminate\Support\Env' not found

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 ERROR: Job failed: command terminated with exit code 1

If anyone is having the same problem. You can temporarily use the version before the latest commit by specifying an explicit commit hash to composer.json like so:

"require": {
  "mcamara/laravel-localization": "dev-master#13f418e481ed06f482e4fca87ec5ff67c2949373"
}
Machecek commented 4 years ago

Same here @ Laravel 5.5

Machecek commented 4 years ago

This is only temporary solution or final one?

pikachujeff commented 4 years ago

It's happened by this commit #745 . Illuminate\Support\Env the class was added from Laravel 6.0, so in before version it cannot be found.

Laravel 8.0 still keep env() helper function, maybe laravel-localization next fix version make it back is better.

veneliniliev commented 4 years ago

plase fix this !!!

karnaukhm commented 4 years ago

we have fixed with just forcing version 1.3 instead of pattern ^1.3 in composer.json for laravel 5.6

veneliniliev commented 4 years ago

and future updates? :(

imagina commented 4 years ago

Same issue here!

oytuntez commented 4 years ago

Opened a PR: https://github.com/mcamara/laravel-localization/pull/750