Answer the question
In order to leave comments, you need to log in
Trouble running a symfony project on OSx?
Hello!
I'm new to OSx and having problems with php 7.1 and SPL interfaces (I think with them). Every 2 or 3 requests to the symphony project (I use Apache) there are errors described below.
Error when spl_autoloader tries to load ParameterBag class:
Warning: class_implements(): Class /\.[^.]+\.twig$/ does not exist and could not be loaded
1 in DebugClassLoader.php line 243
2 at ErrorHandler->handleError('2', 'class_implements(): Class /\.[^.]+\.twig$/ does not exist and could not be loaded', '/Users/mtertishniy/sites/dvsota/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php', '243', array('class' => 'Symfony\Component\HttpFoundation\ParameterBag', 'file' => '/Users/mtertishniy/sites/dvsota/vendor/composer/../symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php', 'exists' => true, 'refl' => object(ReflectionClass), 'name' => 'Symfony\Component\HttpFoundation\ParameterBag', 'notice' => array(), 'len' => '8', 'ns' => 'Symfony\', 'parent' => false, 'parentInterfaces' => array('/\.[^.]+\.twig$/' => '1'), 'deprecatedInterfaces' => array(), 'interface' => '/\.[^.]+\.twig$/'))
3 at class_implements('/\.[^.]+\.twig$/') in DebugClassLoader.php line 243
4 at DebugClassLoader->loadClass('Symfony\Component\HttpFoundation\ParameterBag')
5 at spl_autoload_call('Symfony\Component\HttpFoundation\ParameterBag') in Request.php line 247
OutOfMemoryException in DebugClassLoader.php line 243:
Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 140495632205216 bytes)
$ php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xdebug
xml
xmldiff
xmlreader
xmlrpc
xmlwriter
xsl
yaml
zip
zlib
[Zend Modules]
Xdebug
Answer the question
In order to leave comments, you need to log in
Finally I figured it out! The problem is in php itself. Here is a bug from the official php bug tracker https://bugs.php.net/bug.php?id=74015
In short, this behavior is present in all php versions older than 7.1 (inclusive) and will be fixed only in version 7.2
P.S. Many thanks to everyone who said that the problem is in memory_limit, I could not have done it without you
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question