Closed Branlute closed 3 years ago
I don't think that this change make sense. If application uses Runtime Component, autoload_runtime.php will be included by index.php.
It would make sense to create Runtime for c3 to avoid adding require_once 'c3.php';
line to index.php,
but recipe for codeception/c3 does not exit.
C3 does not work by including autoload.php when autoload_runtime.php is included in index.php.
In this case, can a compatibility be expected for the Runtime Component ?
I meant that your index.php must look like this:
<?php
require_once __DIR__ . '/vendor/autoload_runtime.php';
require __DIR__ . '/vendor/codeception/c3/c3.php';
// more code
or
<?php
require __DIR__ . '/vendor/codeception/c3/c3.php';
require_once __DIR__ . '/vendor/autoload_runtime.php';
// more code
Yes i known, my index.php look alrealdy like this.
My projet work fine with autoload.php and codeception since a long time if i load c3.php before or after autoload.php. But recently, i use autoload_runtime, and codeception C3 doesnt' work because c3.php load autoload.php before autoload_runtime.php
It's work only when c3.php is load after autoload_runtime.php. Maybe it should be indicated in the Readme.
Have you got the latest version of c3.php ? Similar issue was fixed a month ago.
Yes, i use the 2.6.4, and all latest versions of codeception's modules.
I just try with classic index.php with autloload.php and no problem.
And then with autoload_runtime.php, work only with require c3.php after :
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
You can find the two index.php (with autoload.php or autoload_runtime.php here : https://symfony.com/blog/new-in-symfony-5-3-runtime-component
Hello,
With Symfony 5.3, a new feature is available, the Runtime Component https://symfony.com/blog/new-in-symfony-5-3-runtime-component
This component generate an autoload_runtime.php which is load into the index.php instead of the autoload.php.
This PR add a condition into c3.php for load autoload_runtime.php instead of autoload.php if the file exist.