-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does the installer copy c3.php into the project root? #40
Comments
Can we detect the Composer's folder from a PHP script? Especially if we inject c3 in the very first lines of |
Is it not "common" and expected to have composer folder inside
To me, the copying approach fails as my test setup expects composer to not put anything outside the I just feel that maybe changing the include path of Another possibility would be to use the composer autoloader by putting an empty class inside c3.php, so the file is executed when the class is referenced. Can you point me to a discussion about the reasons to drop the file into the root? Maybe there are some usecases connected to frameworks etc. that I don't take into account now. |
No, it's not. Users can have a different location of composer's folder.
This can be an option...
That was so long ago (I think January 2013)... https://github.com/Codeception/c3/blob/2.0/c3.php#L81 Looks like that's all... So yeah, I think it can be refactored to load the config file by specifying it explicitly |
The c3.php setup is really messed up. It woud be much better like this:
The init() argument is c3.php configuration -- the path to the config file, and the temp directory where c3 should place its outputs. This way there is no need to put c3.php into application root directory. Composer's autoloader will do the trick. Moreover, it will work when only the dedicated directory is writable by the web server. |
See #72 for a first step in improving this. |
I see no reason why it should not be included via composer autoloader or manually from within the vendor folder.
Is there any?
The text was updated successfully, but these errors were encountered: