Skip to content

Commit 3ca2b94

Browse files
committed
bug #344 Made the application work when PHP's intl is not available (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Made the application work when PHP's intl is not available This fixes #329. Commits ------- 8497d2d Made the application work when PHP's intl is not available
2 parents ef1ba29 + 8497d2d commit 3ca2b94

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

app/Resources/views/base.html.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@
148148
<script src="{{ asset('js/app.js') }}"></script>
149149
{% endblock %}
150150

151-
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long') }} -->
151+
{# it's not mandatory to set the timezone in localizeddate(). This is done to
152+
avoid errors when the 'intl' PHP extension is not available and the application
153+
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
154+
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->
152155
</body>
153156
</html>

app/Resources/views/blog/about.html.twig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@
88
</p>
99
</div>
1010
</div>
11-
<!-- Fragment rendered on {{ 'now'|localizeddate('long', 'long') }} -->
11+
12+
{# it's not mandatory to set the timezone in localizeddate(). This is done to
13+
avoid errors when the 'intl' PHP extension is not available and the application
14+
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
15+
<!-- Fragment rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"sensio/framework-extra-bundle" : "~3.0",
2424
"symfony/assetic-bundle" : "~2.6",
2525
"symfony/monolog-bundle" : "~2.7",
26+
"symfony/polyfill-intl-icu" : "^1.2",
2627
"symfony/swiftmailer-bundle" : "~2.3",
2728
"symfony/symfony" : "~2.8",
2829
"twig/extensions" : "~1.2",

composer.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)