Skip to content
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

Bug: Problem when compiled vendor as PHAR file #2623

Closed
enix-app opened this issue Feb 25, 2020 · 1 comment
Closed

Bug: Problem when compiled vendor as PHAR file #2623

enix-app opened this issue Feb 25, 2020 · 1 comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@enix-app
Copy link
Contributor

Describe the bug
I tried to compile all vendor dir into PHAR file as vendor.phar for example.
The problem, codeigniter4/framework package shown errors because in codeigniter/framework/system/bootstrap.php use realpath() function and PHAR file doesn't support it.
PHP docs says:

The function realpath() will not work for a file which is inside a Phar as such path would be a virtual path, not a real one.

CodeIgniter 4 version
Target version 4.1.x

Affected module(s)
vendor/codeigniter4/framework/system/bootstrap.php

Expected behavior, and steps to reproduce if appropriate
I believe most of packages/vendor of composer doesn't use this function.
I think, move system/bootstrap.php to app directory (app/Config/Boot/bootstrap.php) can solve this.

@enix-app enix-app added the bug Verified issues on the current code behavior or pull requests that will fix them label Feb 25, 2020
@MGatner
Copy link
Member

MGatner commented Feb 26, 2020

Support for compiling the framework files is not a give. I am not opposed to looking into this but would consider it a feature and an addition, and I would like to see it brought up on the forums first. Alternatively you could submit a PR for review, but I would recommend ways around using realpath rather than moving bootstrap which, IMO, should not normally be modified be developers.

@MGatner MGatner closed this as completed Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

2 participants