Laravel 5 Sitemap: not found - php

exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Watson\Sitemap\SitemapServiceProvider' not found' in
I'm trying to apply Watson Package for generating sitemap. But I saw that error. I cannot understand why that class is not found.
Vendor\watson\sitemap... everything seems there.
The problem is increased with every new package and could not explain to myself..
I tried composer dump-autoload... php artisan optimized...
Thank you...

In Laravel 5.1 the way you add service providers to your app/config/app.php file has changed slightly.
Instead of using:
'Watson\Sitemap\SitemapServiceProvider'
Try using:
Watson\Sitemap\SitemapServiceProvider::class,

Related

trying to run php artisan tinker returns error "file_exists(): Unable to find the wrapper "hoa" "

I'm trying to open tinker in a Laravel project, but when I run php artisan tinker I get this error:
ErrorException
file_exists(): Unable to find the wrapper "hoa" - did you forget to enable it when you configured PHP?
I can't find everything similar error online, I found only similar errors but with 'wrapper http' .
Does anyone have any suggestions? Thanks
Could this be due to custom code or a library you've imported?
I often find that if I add things to the ServiceProvider or Kernel, they run before many of the artisan commands, and if I've failed to perform the proper "if" checks first, it fails.
I suppose the question I would have in return would be; Is this a fresh Laravel install or have you got custom code and libraries running? I would check there, try removing libraries you've added, HOA from my searching doesn't appear to default to Laravel.
— Happy to revise my answer should more detail be provided
Solved with this command founded on github:
composer require psy/psysh:0.11.2 --dev

Logger does not work anymore after upgrade from Laravel 5.5

Since I've upgraded to Laravel version 5.6 from Laravel version 5.5 my Logger doesn't work properly anymore.
At first I got the following error stack :
laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /home/vagrant/Code/grotesmurf/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)
which was solved by simply adding the new config/logging.php file that is provided by Laravel 5.6.
But now I'm getting no output from the Logger! I'm simply running \Log::info('hello!') as a tinker command, but it doesn't generate any log output anymore (same for scripts calling the \Log() method).
I've tried different LOG_CHANNEL settings (daily, single, stack), but none of these work.
Hope anyone has ran into this error already and is able to provide me with some suggestions. I have followed the upgrade guide and it doesn't help unfortunately.
Thanks in advance.
P.S. I'm running php version 7.1 & am on ubuntu.
P.P.S. I have cleared all cached config using artisan.
Well I have found the actual problem, we use an adjusted storage_path() method in our application and the new Logger is now using the storage_path() method to generate its path - this caused the log file to be created in a different directory than storage/logs.
i had the same issue, deleting the files in bootstrap/cache solved it.

A trouble with orchestral imagine for laravel

I have a problem with orchestral imagine for laravel (https://github.com/orchestral/imagine). It's a wripper for imagine component, so I had been caught an error:
Class 'Orchestra\Imagine\ImagineServiceProvider' not found
what I doing wrong?!
I had been added nesseccary lines to config/app.php including this line.
So, solution is a right version of the extension. For Laravel 5.2 It's 3.2

Using pingpong sky module in laravel 5

i wonder why i'm get something like this when add pingpong sky module to project
i think, i already follow all instruction in pingpong sky installation
when i create module Auth in cmd i got message success
but when i try to access Auth module in browser by this url
http://localhost/skypp/public/auth
i got message error
FatalErrorException in Application.php line 575:
Class 'Modules\Auth\Providers\AuthServiceProvider' not found
i think some problem occur when create that module
so i tried again make new module,
but it's failed this time like in pict
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Modules\Auth\Providers\AuthServiceProvider' not found
where i'm missing?
It's actually quite simple and I don't know why the module:make command doesn't integrate it...
Please run a composer dump-autoload so that it rescans the PSR-4 folder and you should be good to go :)

Configuring MongoDB + doctrine in Symfony

I was trying to install MongoDB doctrine bundle as written in here
But when I ran the command
$ php bin/vendors install
It throws up the following error:
Fatal error: Call to undefined method
Doctrine\ODM\MongoDB\Configuration::setLoggerCallable()in
C:\wamp\www\Symfony\app\cache\dev\appDevDebugProjectContainer.php on line 245
I have followed the installation instructions to the word (which has not been much anyways...) and i have also double checked my installation... Is there something I am missing here?
Update : A similar problem is mentioned here, but even after following the answer there, i could not successfully configure DoctrineMongoDBBundle.
The latest changes in the Doctrine MongoDB repo have introduces this problem. To stick to a version before this happened, add this line to deps.lock:
doctrine-mongodb 5ccb18231218ce92c9d72295f69bebfe172ef5fb
Well, finally I managed to solve it by adding this to the deps file:
[DoctrineMongoDBBundle]
git=http://github.com/symfony/DoctrineMongoDBBundle.git
target=/bundles/Symfony/Bundle/DoctrineMongoDBBundle
version=origin/2.0
** note the
version=**origin**/2.0
which is different from the previously suggested simple
version=2.0.0 or something similar...
I have a hunch that this problem occurs only on Windows, I hope someone could kindly confirm this.

Categories