Giter Club home page Giter Club logo

Comments (9)

fabpot avatar fabpot commented on July 22, 2024 1

Of course... and we thought about that as well... see symfony/symfony#23339

from flex.

fabpot avatar fabpot commented on July 22, 2024

For now, it works if you put Resources/ under src/. That's because the directory is determined based on the location of Kernel.php. I want to introduce a new getProjectDir() that would be the directory where composer.json is stored to avoid issues, but I didn't had time for 3.3. I might try to submit a PR today though.

from flex.

fabpot avatar fabpot commented on July 22, 2024

See symfony/symfony#22315

from flex.

yakobe avatar yakobe commented on July 22, 2024

@javiereguiluz Sorry for picking up on a closed Question but could you share where app/Resources/TwigBundle/views/Exception/ templates should be using the flex structure? I cannot get the override working and i've tried several configurations.
Many thanks.

from flex.

fabpot avatar fabpot commented on July 22, 2024

@yakobe Try src/Resources/TwigBundle/views/Exception/, that should work.

from flex.

javiereguiluz avatar javiereguiluz commented on July 22, 2024

Just saying: I would expect this to live in templates/TwigBundle/Exception/...

(and if I want to overwrite a translation file: translations/TwigBundle/messages... and overwrite an asset: assets/TwigBundle/scss/..., etc.)

from flex.

Pierstoval avatar Pierstoval commented on July 22, 2024

Just saying: I would expect this to live in templates/TwigBundle/Exception/...

Yep, maybe the TwigBundle's extension can be updated to be able to change kernel.root_dir into a configurable parameter?

(and if I want to overwrite a translation file: translations/TwigBundle/messages... and overwrite an asset: assets/TwigBundle/scss/..., etc.)

Overriding translations is possible by adding a file in the translations directory with the same translation domain name as the bundle's one, the latest translation will be used in the translator, so no need for directories if the bundle defines translation domains different than the bundle itself.

For assets, it's more an Encore problem, and I'm not sure that it would be easily solvable...

from flex.

BPScott avatar BPScott commented on July 22, 2024

At risk of reopening old discussions: following #56, it seems Flex is moving towards a skeleton style structure with renaming web->public and etc->config.

Skeleton also suggests making a resources/ folder at the root for rather than storing things in src/Resources/. Is it also worth following that convention?

from flex.

yakobe avatar yakobe commented on July 22, 2024

@fabpot Thanks, that works 👍

I also agree with @javiereguiluz 's expectation that they would be in templates/TwigBundle/Exception/.... It looks a little bit funky to have them in src now that we have a templates/ directory.

from flex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.