Skip to content

Conversation

jaapio
Copy link
Member

@jaapio jaapio commented Aug 20, 2025

With this change we provide an internal webserver in the application. And introduce a watch on changes. This introduces a new way of working with guides, allowing users to edit documentation without caring about rerendering.

Optimizations are possible like parsing and rendering a single file to make rerendering faster.

To test this you can run the following steps:

cd app
docker build -t phpdocumentor/guides:local .
cd -
docker run --rm -it -v $(pwd):/project -w /project -p 1337:1337 phpdocumentor/guides:local php -dmemory_limit=4G /project/vendor/bin/guides serve --output=./output docs

We need to build a local docker image because we need some extra php extension to watch file changes.

@garvinhicking
Copy link
Contributor

When editing a file on my macOS (Orbstack) I only get this:

string(24) "Unhandled event mask: 10"

and the file is not re-rendered.

@garvinhicking
Copy link
Contributor

On macOS with the recent change and some deprecation messages in the Ratchet lib / interface, the files do get re-rendered. Looking forward for more :)

@jaapio jaapio force-pushed the feature/change-serve branch from e176065 to dcbe320 Compare September 10, 2025 21:14
@jaapio jaapio marked this pull request as ready for review September 10, 2025 21:16
@jaapio jaapio force-pushed the feature/change-serve branch from dcbe320 to de29766 Compare September 10, 2025 21:23
@jaapio jaapio merged commit a380e47 into main Sep 10, 2025
49 checks passed
@jaapio jaapio deleted the feature/change-serve branch September 10, 2025 21:30
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.

2 participants