I recently cloned my project from github to my local machine for development. I am using the Laravel framework and have been having issues getting my web service working because it cannot find Illuminate\Support\Facades\DB
My code looks like this
use Illuminate\Support\Facades\DB;
...(filler code)...
$results = DB::select(DB::raw('....'))
I end up getting this as an error:
Uncaught Error: Class 'Illuminate\Support\Facades\DB' not found in /Applications/XAMPP/xamppfiles/htdocs/plotly_dawgs/service_data.php:50
If anyone knows why this might be please let me know.
I've tried reupdating composer dependencies and checked alias => [] in app.php
Related
I am new in symfony framework. Getting the below error when download the full project in localhost but it works in server.
Fatal error: Class 'Symfony\Bridge\Doctrine\ManagerRegistry' not found
in D:\wamp\www\DOFE\edin\vendor\doctrine\doctrine-bundle\Registry.php
on line 28
Thanks in advance.
You probably want to execute composer dump-autoload to force composer to regenerate the autoload namespaces for your app.
Regarding your comment, if you are getting this message it means you are in prod and you should switch to the dev environment to have details about the error (access to the symfony profiler).
Just add app_dev.php after the host in the url.
I'm developping a package for Laravel 5.3+ ( My tests where developped in Laravel 5.3)
I have installed Laravel 5.4, downloaded laravel/browser-kit-testing, and follow upgrade guide.
Now, when I run my tests, I get :
PHP Fatal error: Trait 'Illuminate\Foundation\Testing\DatabaseTransactions' not found
I don't really understand why, because file exists.
In my BrowserKitTestCase.php, I have a reference to
$app = require __DIR__.'/../bootstrap/app.php';
But as I am in my package development folder, I don't think app.php exists, it might be the issue, but can't find out how to fix it...
I tried to change it to:
$app = require __DIR__.'/../../../../bootstrap/app.php';
where app can be found ( I am in /package/author/plugin/tests/ ) but it error remains the same...
Any idea what's happening???
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,
I have deployed a Symfony Application to a one.com server. I wrote a Mail service that sends my emails via SwiftMailer.
Now, since one.com has no phar-extensions allowed, composer cannot be updated via ssh. So I generated the classmap locally with
composer update -o
Whenever I try to get the Mail service, the application throws an error:
Fatal error: Class
'Stocksolutions\ShopBundle\DependencyInjection\Mail' not found in
/customers/4/b/b/stocksolutions.be/httpd.www/releases/20150204201140/app/cache/dev/appDevDebugProjectContainer.php
on line 3602
I have searched the composer classmap and the class that isn't found is inside it:
'StockSolutions\\ShopBundle\\DependencyInjection\\Mail' => $baseDir . '/src/StockSolutions/ShopBundle/DependencyInjection/Mail.php'
Furthermore, I can get other services in the container, f.e. those from the FOSUserBundle, but getting my custom services throws an error. Also, I don't get these errors when testing locally..
Any ideas?
It's case-sensitive problem.
Your error:
Fatal error: Class
'Stocksolutions\ShopBundle\DependencyInjection\Mail' not found
Small letter s in Stocksolutions namespace for PSR forces to search for the file /src/Stock**s**olutions/ShopBundle/DependencyInjection/Mail.php, but exist /src/Stock**S**olutions/ShopBundle/DependencyInjection/Mail.php.
On local system likely Windows, where the path/filenames case-insensitive, error does not occur.
P.S. Most likely a typo in class namespace is in the bundle service description (services.yml/services.xml).
I want to run Guzzle on Xampp server, but when I try to run it, I get message:
Fatal error: Class 'Guzzle\Http\Exception\BadResponseException' not found in D:\2 Workspace\5 Aptana\OpenTok\Guzzle\Http\Exception\ClientErrorResponseException.php on line 8
I need it as a part of PHP API for OpenTok project. I can't use composer, so I downloaded it manually, but it doesn't work. I think it can be something with namespace and use.
What should I do to get this working?