12 Commits

Author SHA1 Message Date
Fabien Potencier 38341bbefd Merge branch '1.x' into 2.x
* 1.x:
  Handle opcache_invalidate() being disabled on shared hosting platforms
2019-08-21 07:13:01 +02:00
Rhys 349a5f26c3 Handle opcache_invalidate() being disabled on shared hosting platforms
This fix makes twig gracefully fail on opcache API being disabled on shared hosting platforms for security reasons.
Tested with Grav CMS.
2019-08-21 07:12:20 +02:00
Fabien Potencier 744af47848 Merge branch '1.x' into 2.x
* 1.x:
  updated CHANGELOG
  tweaked code
  Extend opcache check if it is enabled
2019-07-12 09:12:46 +03:00
Fabien Potencier 5c8c41853b tweaked code 2019-07-12 09:11:27 +03:00
vosco88 6e68bd0815 Extend opcache check if it is enabled
When trying to deploy October on shared hosting (www.websupport.sk) I received following error when accessing the frontend pages - ErrorException:> Zend OPcache API is restricted by "restrict_api" configuration directive.
Backend was working normally. 
I propose the following change to check not only if the opcache_invalidate exists but also if opcache is enabled.
The change was also needed in octobercms files, but to correspond I am also proposing to add it directly to twig.
2019-07-12 09:09:42 +03:00
Fabien Potencier 037ee67224 switched to namespace first, PSR-0 as a fallback 2019-03-05 08:14:45 +01:00
Fabien Potencier baa70287f5 switched to namespace first, PSR-0 as a fallback 2019-03-04 21:33:40 +01:00
Fabien Potencier e92a13aae9 replaced require with class_exists 2017-06-05 17:04:19 -07:00
Maxime Steinhausser 2c174e4015 Use class_exists instead of require 2017-06-05 23:42:50 +02:00
Nicolas Grekas c9a2f3db8b [1.x] Allow using namespaced aliases as extension names 2017-05-31 14:35:57 +02:00
Nicolas Grekas 5420a5e3f8 Add the aliases 2017-05-25 08:32:07 +02:00
Nicolas Grekas 71af32b306 Add namespaced aliases 2017-05-24 10:12:32 +02:00