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

修复 Phar 下入口文件的 Autoloader #323

Merged
merged 1 commit into from
Mar 2, 2023
Merged

Conversation

sunxyw
Copy link
Member

@sunxyw sunxyw commented Feb 27, 2023

No description provided.

@sunxyw sunxyw added the bug 意外行为或意外问题 label Feb 27, 2023
@sunxyw sunxyw requested a review from crazywhalecc February 27, 2023 16:12
Copy link
Member

@crazywhalecc crazywhalecc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最早版本的 entry 就是这样,为什么又改成这样子呢?

@sunxyw
Copy link
Member Author

sunxyw commented Feb 28, 2023

最早版本的 entry 就是这样,为什么又改成这样子呢?

原来的 getcwd() 在 Phar 下存在兼容问题,取到的是主机真实路径,而非 Phar 的虚拟路径。

@crazywhalecc
Copy link
Member

最早版本的 entry 就是这样,为什么又改成这样子呢?

原来的 getcwd() 在 Phar 下存在兼容问题,取到的是主机真实路径,而非 Phar 的虚拟路径。

另外入口文件不建议使用任何循环,更何况循环只有 3 个。建议采用硬编码 List 进行。

@sunxyw sunxyw force-pushed the fix-phar-entry-autoloader branch from a984a00 to ada326c Compare March 2, 2023 10:47
@sunxyw sunxyw requested a review from crazywhalecc March 2, 2023 10:49
@sunxyw sunxyw merged commit a84d2d5 into main Mar 2, 2023
@sunxyw sunxyw deleted the fix-phar-entry-autoloader branch March 2, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 意外行为或意外问题
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants