Skip to content

Conversation

@aazsamir
Copy link
Contributor

@aazsamir aazsamir commented Oct 31, 2025

I want to pack my application as a PHAR file. However, using the realpath() function causes problems because phar files are located in a virtual file system, and tempest does not boot at all.
Therefore, I added the real_path() function, which is safe for phar files, and replaced all calls to realpath() with real_path().
In addition, tempest's internal storage is now configurable, as we cannot create files inside a PHAR file, so we need to specify an external location instead.

@aazsamir aazsamir marked this pull request as draft October 31, 2025 10:31
@aazsamir aazsamir force-pushed the feat/phar-compatible branch from 84af6a3 to b5b14d6 Compare November 3, 2025 16:51
@aazsamir aazsamir marked this pull request as ready for review November 3, 2025 16:52
@innocenzi innocenzi changed the title feat(phar): support booting in phar feat(core): support booting in phar Nov 3, 2025
Copy link
Member

@innocenzi innocenzi left a comment

Choose a reason for hiding this comment

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

Can you use the Filesystem\real_path syntax instead?

Also, have you considered more descriptive names? Maybe normalize_path?

@brendt
Copy link
Member

brendt commented Nov 6, 2025

Awesome. Do you think it would be possible to also PR a test for phars? I've never used them before so I'm not sure about it

@brendt brendt merged commit 536db47 into tempestphp:main Nov 6, 2025
74 checks passed
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.

3 participants