Skip to content

Conversation

@alies-dev
Copy link
Contributor

@alies-dev alies-dev commented Mar 26, 2025

It's possible to customize a path to cached view files via config and VIEW_COMPILED_PATH env var. But AboutCommand uses a hardcoded storagePath('framework/views') path. This PR aims to fix this issue.

BTW: it's the only occurrence of the framework/views and framework.views in code codebase (except some tests), so, no need to worry about other similar issues.

@alies-dev alies-dev changed the title [11.x] Respect custom view path by AboutCommand [11.x] Respect custom path for cached views by the AboutCommand Mar 26, 2025
@shaedrich
Copy link
Contributor

You might want to add a test to tests/Foundation/Console/AboutCommandTest.php

});
}

#[WithEnv('VIEW_COMPILED_PATH', __DIR__.'/../../View/templates')]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like making this test depend on templates from other tests, but also I'm not sure about adding custom fixtures here as compiled views is the main concern of this about console command. I would be glad if you could help with the testing approach here.

@taylorotwell taylorotwell merged commit e65c9b7 into laravel:11.x Mar 27, 2025
44 checks passed
@alies-dev alies-dev deleted the about-command-respect-custom-view-path branch September 1, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants