Skip to content

[Bug]: component namespace: extension only detects single colon, but throws error #418

@gabrieleolmi

Description

@gabrieleolmi

Extension Version

1.0.11

PHP Binary

Local PHP

Operating System

Linux

What happened?

I followed the documentation https://laravel.com/docs/12.x/blade#anonymous-component-paths for registering components with a namespace, but the extension only detects them if I use a single colon. However, when I use a single colon, Laravel throws this error: Unable to locate a class or view for component [namespace_test:button]. It works only if i use double colon.

class NamespaceTestServiceProvider extends ServiceProvider
{
    public function boot()
    {
        Blade::anonymousComponentPath(__DIR__ . '/components', 'namespace_test');
    }
}

colon: the component is detected by the extension but throws an error:
Image

double colon: the component is not detected by the extension but it works:
Image

Mimimal Code Sample

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions