Skip to content

illuminate/database exception #36050

@nbk-kolyan

Description

@nbk-kolyan

Description:

Im not using laravel, using lumen. But this problem related to package we all use
illuminate/database version 8.24

Illuminate\Database\Eloquent\Factories\Factory
Use
use Illuminate\Contracts\Application;
instead of
Illuminate\Contracts\Foundation\Application;

this exception in try catch block - but i don't see reason not to using correct namespace

Steps To Reproduce:

File: \vendor\illuminate\database\Eloquent\Factories\Factory.php

/**
 * Get the application namespace for the application.
 *
 * @return string
 */
protected static function appNamespace()
{
    try {
        return Container::getInstance()
                        ->make(Application::class)
                        ->getNamespace();
    } catch (Throwable $e) {
        dd($e->getMessage());
        return 'App\\';
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions