Comments (15)
Hi, I found this thread by googling "Class 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class' not found". It was my real problem which I was unable to solve. I checked my composer.json file twice, it was ok, but error still occured. Right before uninstalling this package I decided to try to remove "::class" from provider definition in app.php. And it works!
Documentation says:
After updating composer, add the service provider to the providers array in config/app.php
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
And it didn't work for me. When I replaced it to
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider
it works fine. And IDE recognizes all classes correctly now.
I hope it helps to somebody with similar problem.
from laravel-ide-helper.
my case had APP_ENV=prod instead of APP_ENV=production
from laravel-ide-helper.
In my case was because the package was in require-dev and in my AppServiceProvider i had
if ($this->app->isLocal()) { $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); }
And in composer.json i had
"post-update-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "@php artisan ide-helper:generate", "@php artisan ide-helper:meta" ]
So when i run any deploy, the post-update-cmd was triggering, and raising a error
from laravel-ide-helper.
zahraMHD
Class 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' is used to enable PHPStorm to find classes. When you have “use \Request;” in your php file, PHPStorm cannot find the source file this refers to. Google/search Laravel Ide Helper in github and you will see how 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' can be used.
Before you try to deploy your code, comment out 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' in composer.json.
Hope this helps
Paul
From: zahraMHD [mailto:[email protected]]
Sent: June-08-16 6:28 PM
To: barryvdh/laravel-ide-helper
Cc: Paul Neal; Comment
Subject: Re: [barryvdh/laravel-ide-helper] Class 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' not found (#55)
I have this problem I update my composer.json and add Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, in my app.php in providers array but when run php artisan ide-helper:generate command I got this error " Class 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' not found " is any thing that I did not check?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub #55 (comment) , or mute the thread https://github.com/notifications/unsubscribe/AJApOE4dEwz0uRTmd8YS1IUn2cuwitV7ks5qJ0HVgaJpZM4Be-Y_ . https://github.com/notifications/beacon/AJApOLHak1Jl_LBwyg7gx25HdwsS7Frhks5qJ0HVgaJpZM4Be-Y_.gif
from laravel-ide-helper.
Did you add it to composer.json and have you run composer update? Do you have a folder vendor/barryvdh/laravel-ide-helper?
from laravel-ide-helper.
Yes, I added "barryvdh/laravel-ide-helper": "1.*" into my composer.json.
{
"require": {
"monolog/monolog": "1.2.*",
"barryvdh/laravel-ide-helper": "1.*"
}
}
I've not run the composer update yet. Here's the output from it:
php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing doctrine/collections (v1.1)
- Installing doctrine/collections (v1.2)
Downloading: 100%
- Removing illuminate/console (v4.1.20)
- Installing illuminate/console (v4.1.21)
Loading from cache
- Removing illuminate/support (v4.1.20)
- Installing illuminate/support (v4.1.21)
Loading from cache
- Removing illuminate/filesystem (v4.1.20)
- Installing illuminate/filesystem (v4.1.21)
Loading from cache
Writing lock file
Generating autoload files
Yes, I have a folder in the root of all my project with that location (where composer also have a vendor folder i guess).
Location: Sites/laravel/vendor/barryvdh/laravel-ide-helper
There is not any folders named it in my laravel project vendor folder:
Location: Sites/laravel/todo/vendor
Not sure if this is the problem or not.
from laravel-ide-helper.
I'm not 100% clear, is that you entire composer.json file? Where is the laravel/laravel line etc?
from laravel-ide-helper.
It was my composer.json with in the same folder as composer.phar I posted. Not the one in my project. The one in the project looks like this:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"barryvdh/laravel-ide-helper": "1.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
I found this, and it help me to update the project: http://stackoverflow.com/questions/17564641/composer-phar-and-json-file-locations-symfony2
My problem was that I only updated the vendor folder with composer.phar (one folder out from the project root) and not the project. http://stackoverflow.com/questions/17564641/composer-phar-and-json-file-locations-symfony2
Here is the new output from the update:
michael$ php composer.phar --working-dir=todo/ update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing patchwork/utf8 (v1.1.17)
- Installing patchwork/utf8 (v1.1.18)
Loading from cache
- Installing doctrine/lexer (v1.0)
Loading from cache
- Installing doctrine/annotations (v1.1.2)
Loading from cache
- Installing doctrine/collections (v1.2)
Loading from cache
- Installing doctrine/cache (v1.3.0)
Loading from cache
- Installing doctrine/inflector (v1.0)
Loading from cache
- Installing doctrine/common (v2.4.1)
Loading from cache
- Installing doctrine/dbal (v2.4.2)
Loading from cache
- Installing symfony/class-loader (v2.4.1)
Loading from cache
- Installing dflydev/markdown (v1.0.3)
Loading from cache
- Installing phpdocumentor/reflection-docblock (2.0.0)
Loading from cache
- Removing laravel/framework (v4.1.18)
- Installing laravel/framework (v4.1.21)
Loading from cache
- Installing barryvdh/laravel-ide-helper (v1.8.1)
Loading from cache
Writing lock file
Generating autoload files
Generating optimized class loader
Thanks for getting me on the right track.
from laravel-ide-helper.
Did you put quotes around Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class
? That would break it.
from laravel-ide-helper.
Hmm, I didn't even thought that it may work without quotes, so I wrapped it without hesitation. Thank you for hint.
from laravel-ide-helper.
::class
is a Scope Resolution Operator. http://php.net/manual/en/language.oop5.paamayim-nekudotayim.php It returns the class which returns the same string as the quoted part.
from laravel-ide-helper.
Yes, I know about ::
, but combination with class
keyword confuses me.
from laravel-ide-helper.
Well done, thanks guys
from laravel-ide-helper.
I have this problem I update my composer.json and add Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, in my app.php in providers array but when run php artisan ide-helper:generate command I got this error " Class 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' not found " is any thing that I did not check?
from laravel-ide-helper.
Hi, I am new in Laravel. I am using Netbeans 10 on Windows 10 and xampp. I dont have a folder vendor/barryvdh/laravel-ide-helper, from where could I download it or ...
from laravel-ide-helper.
Related Issues (20)
- The command "ide-helper:models" is not working correctly. HOT 1
- Exception: No query results for model inside on mutator or accessor HOT 5
- ide-helper not showing all suggested methods while use PHP Intelephense v1.10.4
- VsCode Go to definition not working
- ReflectionException in Alias::getMacroFunction HOT 1
- Phpstorm Redis Can you identify
- Unknown Column HOT 5
- Incorrect type for nullable morph HOT 3
- Two blank docblock lines in model HOT 1
- Thread docs bloks as primary source of type
- Nullable timestamps HOT 5
- Defining database in $table no longer works? HOT 2
- Support for casts AsEnumCollection HOT 1
- php artisan ide-helper:meta throws error PHP Warning: Trying to access array offset on value of type null HOT 2
- Expected type 'iterable'. Found 'Illuminate\Database\Query\iterable'. HOT 3
- newQuery and newModelQuery are not static methods
- MySqlGrammar: : compileColumns function for mariadb and mysql information_schema. The columns structure difference is an error HOT 1
- Json mysql column is translated as mixed instead of string
- As a Developer working on Windows I want the Line-Endings inside the generated PHP Doc to be CRLF HOT 3
- Exception: Method MongoDB\Laravel\Schema\Grammar::compileColumns does not exist. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-ide-helper.