Fatal error: Uncaught Nette\DI\InvalidConfigurationException: Found section ‘php’ in configuration, but corres
- yakimov
- Member | 1
Hi!
I am using Nette Di in my app.
I configured App and have error if i add section PHP.
config.neon
php:
date.timezone: Europe/Moscow
parameters:
twig:
templates: 'templates'
cache: 'temp/cache/'
database:
driver: 'pdo'
dsn: 'mysql:host=127.0.0.1;dbname=feed_generator'
user: root
password:
debug: true
buffered: true
services:
pdo:
create: PDO(%database.dsn%, %database.user%, %database.password%)
setup:
- setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false)
database: Dibi\Connection([driver: %database.driver%, pdo: @pdo])
twig: Twig\Environment(Twig\Loader\FilesystemLoader(%twig.templates%), [cache: %twig.cache%])
FeedGenerator: Task\FeedGeneratorTask
Error
PHP Fatal error: Uncaught Nette\DI\InvalidConfigurationException: Found
section ‘php’ in configuration, but corresponding extension is missing. in
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/Compiler.php:244
Stack trace:
#0 /Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/Compiler.php(204):
Nette\DI\Compiler->processExtensions()
#1
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/ContainerLoader.php(119):
Nette\DI\Compiler->compile()
#2
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/ContainerLoader.php(79):
Nette\DI\ContainerLoader->generate(‘Container_dcca4…’,
Object(Closure))
#3
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/ContainerLoader.php(44):
Nette\DI\ContainerLoader->loadFile(‘Container_dcca4…’,
Object(Closure))
#4 /Users/yakimov/Dev/feed-generator/bootstrap.php(9):
Nette\DI\ContainerLoader->load(Object(Closure))
#5 /Users/yakimov/Dev/feed-generator/test.php(3):
require(‘/Users/yakimov/…’)
#6 {main}
throw in /Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/Compiler.php
on line 244
Fatal error: Uncaught Nette\DI\InvalidConfigurationException: Found section ‘php’ in configuration, but corresponding extension is missing. in /Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/Compiler.php on line 244
Nette\DI\InvalidConfigurationException: Found section ‘php’ in configuration, but corresponding extension is missing. in /Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/Compiler.php on line 244
Call Stack:
0.0003 390600 1. {main}() /Users/yakimov/Dev/feed-generator/test.php:0
0.0005 393768
2. require(‘/Users/yakimov/Dev/feed-generator/bootstrap.php’)
/Users/yakimov/Dev/feed-generator/test.php:3
0.0026 680008 3. Nette\DI\ContainerLoader->load()
/Users/yakimov/Dev/feed-generator/bootstrap.php:9
0.0027 680056 4. Nette\DI\ContainerLoader->loadFile()
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/ContainerLoader.php:44
0.0034 754528 5. Nette\DI\ContainerLoader->generate()
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/ContainerLoader.php:79
0.0085 1391200 6. Nette\DI\Compiler->compile()
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/ContainerLoader.php:119
0.0085 1391200 7. Nette\DI\Compiler->processExtensions()
/Users/yakimov/Dev/feed-generator/vendor/nette/di/src/DI/Compiler.php:204
Last edited by yakimov (2019-04-16 04:52)
- Milo
- Nette Core | 1283
The php
is a DI container extension. And is automatically
registered only when whole Nette Application is used.