B
B
BonBon Slick2020-12-03 10:50:53
symfony
BonBon Slick, 2020-12-03 10:50:53

Symfony container preload.php for .env?

https://github.com/symfony/demo/blob/main/config/p...
https://github.com/symfony/demo/search?q=preload

Not sure what and why?
In my composer lock file, as well as in the whole project, there is no use of preload.php, and where should I put it? What will it give?

After all, under the hood, the cache itself must be loaded regardless of the environment, right?

<?php
declare(strict_types=1);

if (file_exists(dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php')) {
    opcache_compile_file(dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php');
}

This is how my upload file looks like, note that there is such a file in the cache!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antony Tkachenko, 2020-12-04
@BonBonSlick

Php 7.4+ opcache.preload
https://www.php.net/manual/ru/opcache.preloading.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question