-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BR-11210] – Sugar shadow extension does not work properly after Rect…
…or scan PHPStan uses custom 'file' stream wrapper to capture loaded code, this unregisters shadow wrapper and breaks everything. To handle this, an option has been added to force the wrapper reinitialization
- Loading branch information
1 parent
5cc8f8f
commit 2f983df
Showing
6 changed files
with
59 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--TEST-- | ||
Check reading from files | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("shadow")) print "skip"; ?> | ||
--FILE-- | ||
<?php | ||
require_once('setup.inc'); | ||
echo file_get_contents("$template/txt/override.txt"); | ||
|
||
unlink("$instance/txt/override.txt"); | ||
|
||
stream_wrapper_unregister('file'); | ||
stream_wrapper_restore('file'); | ||
|
||
shadow($template, $instance, array("cache", "custom", "custom/some/long/directory/name"), true) || die("failed to setup shadow"); | ||
|
||
echo file_get_contents("$instance/txt/override.txt"); | ||
?> | ||
--EXPECT-- | ||
Instance data | ||
Template data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters