-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,47 @@ | ||
# PHP extension development | ||
|
||
All the changes introduced by Fracker to Xdebug are self-contained in a single [patch file](./fracker.patch), to update it: | ||
All the changes introduced by Fracker to Xdebug are self-contained in a single [patch file](./fracker.patch), perform the following steps to to update it. | ||
|
||
1. first make sure to start from a fresh state with: | ||
1. Make sure to start from a fresh state with: | ||
|
||
``` | ||
make fetch-xdebug | ||
``` | ||
|
||
2. then load the existing patch with: | ||
2. Load the existing patch with: | ||
|
||
``` | ||
make apply-patch | ||
``` | ||
|
||
3. make the changes in the `./xdebug/` directory, each time building with: | ||
3. Make the changes in the `./xdebug/` directory, each time building with: | ||
|
||
``` | ||
make build | ||
``` | ||
|
||
4. try the extansion with: | ||
4. Try the extension with after starting Fracker as usual: | ||
|
||
``` | ||
php -d zend_extension=$PWD/xdebug/modules/xdebug.so -r 'var_dump("Hello Fracker!");' | ||
``` | ||
|
||
5. finally save the patch with: | ||
The expected Fracker output should be: | ||
|
||
``` | ||
001 │ PHP ["Standard input code"] | ||
001 │ {main}() Command line code +0 | ||
001 │ » var_dump(value="Hello Fracker!", values=null) Command line code +1 | ||
``` | ||
|
||
5. Save the patch with: | ||
|
||
``` | ||
make format-patch | ||
``` | ||
|
||
6. Run the test suite as described in the [test](/test/) folder. | ||
|
||
To update the Xdebug version, change the `XDEBUG_VERSION` variable in the `Makefile` then repeat the above steps, conflicts and other issues must be addressed manually. Same goes for downgrading Xdebug in order to support older PHP versions, refer to [this](https://xdebug.org/docs/compat) page to find the right version. | ||
|
||
After any update commit using the `Update Xdebug to <XDEBUG_VERSION>` message and tag with `xdebug-<XDEBUG_VERSION>`. |