Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the default from web to public #1039

Closed
wants to merge 1 commit into from
Closed

Conversation

lsmith77
Copy link
Contributor

Q A
Branch? 2.0
Bug fix? depends :)
New feature? depends :)
BC breaks? yes
Deprecations? no
Tests pass?
Fixed tickets
License MIT
Doc PR included

default should now be public but wondering if it in fact should be "%kernel.project_dir%/public"

@lsmith77 lsmith77 added this to the 2.0.0 milestone Jan 20, 2018
@robfrawley robfrawley added Attn: Blocker This item blocks other issue(s) or PR(s) and therefore must be resolved prior. State: Confirmed This item has been confirmed by maintainers as legitimate. Type: Configuration This item pertains to configuration of this project. labels Jan 21, 2018
@robfrawley
Copy link
Collaborator

If we intend to support Symfony 3.4 (and future 3.x releases) we cannot make this change outright; web is still the correct directory for the 3.x series. Instead, we need to keep the current value and add the new one pointing to public.

In the context of the FileSystem loader this can be done easily as it already accepts an array, but for the WebPath resolver, we need to update the web_root configuration option to accept an array and update the class(es) that use/rely on that value to handle such a type. Alternatively, for the WebPath resolver, we can make the default value dynamic based on the Symfony kernel version, but I generally hate version checks within any non-test code, IMHO.

As for the new parameters available, assuming %kernel.project_dir% is included in 3.4 (which I believe it is if I'm not mistaken) I agree that we should use it moving forward instead of the current usage.

@lsmith77
Copy link
Contributor Author

well for 2.x we can choose to make a new default. where possible it would be best of course to automatically determine the default. but in this case I would do it inside the DI extension instead of setting multiple dirs which could affect performance.

@silverbackdan
Copy link
Contributor

Personally, I'd like the new default and as suggested, perhaps in the DI a simple directory check to determine this possibly, although it may not be necessary with the major version change.

@robfrawley
Copy link
Collaborator

How does #1044 look?

@lsmith77 lsmith77 closed this Jan 30, 2018
@lsmith77 lsmith77 deleted the default-to-public-dir branch January 30, 2018 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attn: Blocker This item blocks other issue(s) or PR(s) and therefore must be resolved prior. State: Confirmed This item has been confirmed by maintainers as legitimate. Type: Configuration This item pertains to configuration of this project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants