-
Notifications
You must be signed in to change notification settings - Fork 132
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
Validity of some questions. #63
Comments
Hello @tinnerdxp, Thank you for your comment and I think also that some responses should be improved.
For more information: https://twig.symfony.com/doc/2.x/filters/spaceless.html Cheers |
@jockhip12 — yeah, but how the Twig could compress output itself? |
I didn't get your question, but you can find more details here : |
I know how the gzipping output works. The matter is how do you trigger gzipping within Twig because this is what is everything about question. Twig has no option on this because it's only templating engine, not a response handler. |
I got your point, and honestly I don't have an answer :/ |
I would like to add an answer that might be wrong in controller.yml. That's a small contribution, but hope it helps as well.
From the documentation of the v5.3, this JsonResponse exists : https://symfony.com/doc/current/components/http_foundation.html#creating-a-json-response |
Hello, I invite you to make a PR with your different proposals. Have a good day :) |
During the few weeks of usage I have noticed that some questions and answers could be improved.
I obviously appreciate the effort of having this in general and would like to thank the authors for their efforts - it is a great help indeed.
I wonder whether we should just submit PRs for either grammar / typos / validity of some questions?
I guess it's a massive topic to discuss so I would like to know your opinions first.
Example 1:
The correct answer (in my opinion) is "spaceless" even though the accepted answer is "gzip".
Twig doesn't have any capabilities to gzip the output... it's down to the framework underneath or the web-server returning the response.
Example 2:
As per: https://symfony.com/doc/current/testing.html the answer should be probably
./vendor/bin/simple-phpunit
but all the existing answers depend on how phpunit was installed as well as where the phpunit.xml file is located... (I think?)
Example 3: (from PHP pack though)
Even though ${0x0} is not considered a valid PHP variable - it actually works in all version of PHP from 4.x to 7.2 as long as one refers to it using the ${0x0} notation. so the correct answers should be ${0x0} and @$foo instead of @$foo and &$variable - which causes an error.
Example 4:
Accepted answers are: ETag, Last-Modified
I'm not sure what the "validation cache model" is - but if it is a method of controlling browser caching - then Cache-Control and Expires should probably be there as well. If it means "methods of validating the cache" then Expires is a probable candidate. Again - I might be wrong on this - but it's very "tricky" question...
Think 4 is enough to get your opinion on things.
Cheers
KP
The text was updated successfully, but these errors were encountered: