You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our app has a custom root namespace. Let's say Foobar\ instead of App\. We have this configured in maker.yaml:
maker:
root_namespace: 'Foobar'
Now when we run make:twig-component we get:
bin/console make:twig-component
The name of your twig component (ie Notification):
> Button
Make this a live component? (yes/no) [no]:
> no
created: src/ar/Twig/Components/Button.php
created: templates/components/Button.html.twig
Success!
To render the component, use <twig:Button />.
The first 4 characters of Foobar are removed and a file is created in src/ar/Twig/... instead of src/Twig.
The text was updated successfully, but these errors were encountered:
It strips the first 4 characters, which works when you use App namespace because App\ is 4 chars. Shouldn't it be based on strlen($rootNamespace)+1?
dejagersh
changed the title
make:twig-component doesn't work well when using a custom namespacemake:twig-component doesn't work well when using a custom root namespace
Jan 4, 2025
marcriemer
added a commit
to marcriemer/maker-bundle
that referenced
this issue
Jan 5, 2025
Hi!
Our app has a custom root namespace. Let's say
Foobar\
instead ofApp\
. We have this configured inmaker.yaml
:maker: root_namespace: 'Foobar'
Now when we run
make:twig-component
we get:The first 4 characters of
Foobar
are removed and a file is created insrc/ar/Twig/...
instead ofsrc/Twig
.The text was updated successfully, but these errors were encountered: