Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

deadorchid's avatar

deadorchid liked a comment+100 XP

5mos ago

I know this is a bit old. But If anyone comes across the same problem and doesn't want to install a fresh version of Laravel, this might help.

If you're working in a project that started in a previous version of Laravel and was then updated, the test files in your project might be outdated when you decide to start running some tests.

If your TestCase class doesn't have a namespace then you probably have the same problem I did.

Add namespace Tests; to tests\TestCase.php.

If the file contains any reference to a class in another namespace, make sure it starts with a leading slash.

Then you want to check your composer.json autoload configuration. It should contain this:

"autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    }

Instead of "classmap": ["tests/TestCase.php"]

Run composer dump-autoload and It should be fixed.

deadorchid's avatar

deadorchid wrote a comment+100 XP

5mos ago

Will it be free? I can't buy subscription from my country. I can, but it'll be difficult for maintain

deadorchid's avatar

deadorchid liked a comment+100 XP

5mos ago

Actually @JeffreyWay, in a cluster of servers, it is useful to set the session save path to a single location which all servers can access. It can be the file system of one of the servers, or, I am not sure, maybe even some S3 bucket.

To answer your question @chahine, it is possible to change where sessions files are stored by using the function session_save_path():

session_save_path(?string $path = null): string|false

https://www.php.net/manual/en/function.session-save-path.php

I hope that this is useful to someone. :-)

deadorchid's avatar

deadorchid wrote a comment+100 XP

5mos ago

for forms plugin use v3 tailwind cdn, so uri just like in video

deadorchid's avatar

deadorchid wrote a comment+100 XP

5mos ago

@tinker i found hyperui.dev website very brilliant for free tailwind templates

deadorchid's avatar

deadorchid wrote a comment+100 XP

5mos ago

Also want to mention, i'm using php cli server, nor apache or nginx or something like that.

deadorchid's avatar

deadorchid wrote a comment+100 XP

5mos ago

I don't know why, but when i using code from video from Database.php, i'm getting NULL $statement. But then i initialize the statement in a new variable and only after give it to class $statement, it works.

Before(just like in video):

public function query($value, $params = [])
    {
        $this->$statement = $this->connection->prepare($value);
        $this->$statement->execute($params);

        return $this;
    }

After:

public function query($value, $params = [])
    {
        $statement = $this->connection->prepare($value);
        $statement->execute($params);

        $this->statement = $statement;

        return $this;
    }

PHP 8.4.14 (cli) (built: Nov 6 2025 16:39:08) (NTS) Copyright (c) The PHP Group Zend Engine v4.4.14, Copyright (c) Zend Technologies

deadorchid's avatar

deadorchid wrote a comment+100 XP

5mos ago

@we0ut bro why u asking a questions without even an error text from compiler or whatava

deadorchid's avatar

deadorchid wrote a comment+100 XP

5mos ago

@Kladdelic hey, how you going