Laravel spatie producing issue with lada-cache.
It seems it is taking wrong instance to execute query.
exception: "Symfony\Component\Debug\Exception\FatalThrowableError"
file: "/var/www/html/project-name/vendor/spiritix/lada-cache/src/Spiritix/LadaCache/Reflector.php"
line: 126
message: "Argument 1 passed to Spiritix\LadaCache\Reflector::getTablesFromWhere() must be an instance of Spiritix\LadaCache\Database\QueryBuilder, instance of Illuminate\Database\Query\Builder given, called in /var/www/html/project-name/vendor/spiritix/lada-cache/src/Spiritix/LadaCache/Reflector.php on line 145"
Package Information :
"php": ">=7.2",
"laravel/framework": "5.8.*",
"spatie/laravel-permission": "^2.9",
"spatie/laravel-server-side-rendering": "^1.1",
"spiritix/lada-cache": "^3.0".
Even I am getting the same result after updating the package.
Related
i am using Symfony Panther with Laravel framework. I got an error while using this
unknown error: cannot create temp dir for user data dir
{"exception":"[object]
(Facebook\WebDriver\Exception\UnknownErrorException(code: 0):
I have installed XAMPP for Windows 7.4.2.
PHP: 7.4.2, Apache: 2.4.41
composer.json
"require": {
"php": "^7.1.3",
"fabpot/goutte": "^3.2",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "~6.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"symfony/css-selector": "^4.4",
"symfony/http-client": "^4.4",
"symfony/panther": "^0.7.0"
}
Laravel Controller Class
namespace App\Http\Controllers;
include (base_path() .'/vendor/autoload.php');
use Illuminate\Http\Request;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\BrowserKit\HttpBrowser;
use Symfony\Component\HttpClient\HttpClient;
class PageController extends Controller
{
public function myFunction(Request $request)
{
$client = \Symfony\Component\Panther\Client::createChromeClient();
$client->request('GET', 'https://api-platform.com'); // Yes, this website is 100% written in JavaScript
$client->clickLink('Support');
// Wait for an element to be rendered
$crawler = $client->waitFor('.support');
echo $crawler->filter('.support')->text();
}
}
[2020-02-27 16:12:21] local.ERROR: unknown error: cannot create temp
dir for user data dir {"exception":"[object]
(Facebook\WebDriver\Exception\UnknownErrorException(code: 0):
unknown error: cannot create temp dir for user data dir at
D:\WWW\PHP\myproject\vendor\php-webdriver\webdriver\lib\Exception\WebDriverException.php:139)
Check that your disk is not running low on space.
Does XAMPP have the correct permissions? It may be required to run with elevated permissions.
Check the %TEMP% and %TMP% environment variables and ensure they exist. (To do this, run echo %TEMP% and echo %TMP% on the Windows' command line)
Related: "cannot create temp dir for user data dir" error when not running as admin
I upgraded symfony 3.3 to 3.4 and now having problem with datafixture bundle , trying to seed data for testing but got this error :
Attempted to call an undefined method named "addClass" of class
"Doctrine\ORM\Internal\CommitOrderCalculator"
this is part of my ccomposer.json file :
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.0",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
}
any help will be appreciated
You have to upgrade the data-fixtures manually in your composer.json file. Try to upgrade it to version 1.3 like this:
"doctrine/data-fixtures": "^1.3"
When running codecept run -vvv I get an error stating that the actor is undefined in the SuiteManager class (method is initialize).
Any guess on how to fix this?
I've set up two basic unit tests where I just want to assert some values, and they worked until I switched to the composer autoloader.
In the composer.json I have the following:
"autoload": {
"classmap": [
"app"
]
},
"require-dev": {
"codeception/codeception": "^2.3",
"phpstan/phpstan": "^0.8.0",
"symfony/console": "^3.3"
}
In the main _bootstrap file provided by Codeception I only have a require_once for the vendor autoloader file.
Using php 7.1 and latest versions of the packages.
here is my composer.json require snippet.
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.35",
"aws/aws-sdk-php-laravel": "~3.0",
"lucadegasperi/oauth2-server-laravel": "5.1.*",
"bosnadev/repositories": " 0.*",
"laravelcollective/html": "5.1.*",
"cartalyst/stripe-laravel": "3.0.*"
},
I ran composer update in order to add new AWS services. but then I noted that all the vendor files are updated because of composer update command. now I'm getting error when I ran php artisan commands.
This is the error message:-
PHP Catchable fatal error: Argument 2 passed to Illuminate\Routing\UrlGenerator
::__construct() must be an instance of Illuminate\Http\Request, null given, call
ed in C:\Users\User\projects\projectxyz\projectxyzweb\vendor\laravel\framework\
src\Illuminate\Routing\RoutingServiceProvider.php on line 62 and defined in C:\U
sers\User\projects\projectxyz\projectxyzweb\vendor\laravel\framework\src\Illumi
nate\Routing\UrlGenerator.php on line 102
How can I resolve this issue? is there any wayto revert composer update without loosing my code?
I finally manage to get rid of this error. I was not my composer update. I have added url() to set base url in my config files. After removing it php artisan worked.
After doing composer update my project starts to show this error in everywhere in my production environment. But in local is working perfectly.
Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in
.../src/Illuminate/Container/Container.php:736 Stack trace: #0
.../src/Illuminate/Container/Container.php(736): ReflectionClass->__construct('log') #1
.../src/Illuminate/Container/Container.php(626): Illuminate\Container\Container->build('log', Array) #2
.../src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array) #3
.../src/Illuminate/Container/Container.php(837): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...') #4
.../src/Illuminate/Container/Container.php(800): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter)) #5
.../src/Illuminate/Container/Container.php(771): Illuminate\Cont in
.../src/Illuminate/Container/Container.php on line 736
My local environment is OSX 10.10.5 and my production environment is Linux.
I made composer update again but don't fix the error.
My composer.json is look like this:
...
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"folklore/image": "0.2.*",
"illuminate/html": "5.*",
"cartalyst/sentry": "dev-feature/laravel-5"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"laracasts/generators": "~1.1",
"php-console/php-console": "~3.0",
"php-console/laravel-service-provider": "~5.0"
},
...
Thanks guys!
I found the problem.
I removed the packages of my composer.json and works.
"php-console/php-console": "~3.0",
"php-console/laravel-service-provider": "~5.0"
I think that the server does not support the packages because is necessary a .bat file for the packages work.
Most of the times, this error fixing is very simple. Just run
composer dump-autoload
and without any doubt, your error will be fixed.