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

Fixes #225: PHAR package support (second try) #261

Closed
wants to merge 3 commits into from
Closed

Fixes #225: PHAR package support (second try) #261

wants to merge 3 commits into from

Conversation

resurtm
Copy link
Contributor

@resurtm resurtm commented May 14, 2013

#246 has been enhanced and improved.

Fixes #225.
Ready to be merged.

*/
public static function realpath($path, $checkPhar = false)
{
if ($checkPhar && \Phar::running() === '') {
Copy link
Member

Choose a reason for hiding this comment

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

if (!$checkPhar || \Phar::running() === '') {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

array_splice($path, $key - ($keyPosition * 2 + 1), 2);
}
$path = $scheme . str_replace('./', '', implode('/', $path));
return is_file($path) || is_dir($path) ? $path : false;
Copy link
Member

Choose a reason for hiding this comment

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

$path should use DIRECTORY_SEPARATOR rather than /. Otherwise you are changing the behavior of realpath() and will cause unexpected problems.

@qiangxue
Copy link
Member

Closed for now. We may revisit this after GA.

@qiangxue qiangxue closed this Dec 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pack Yii in a PHAR-archive
2 participants