Skip to content

Commit e12615e

Browse files
committed
Split dev server to separate package
1 parent 8acddf8 commit e12615e

File tree

18 files changed

+221
-30
lines changed

18 files changed

+221
-30
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"ext-mbstring": "*",
4040
"cboden/ratchet": "0.4.x@dev",
4141
"doctrine/deprecations": "^1.1",
42+
"phpdocumentor/dev-server": "^1.0 || ^1.0@dev",
4243
"phpdocumentor/filesystem": "^1.0 || ^1.0@dev",
4344
"phpdocumentor/flyfinder": "^1.1 || ^2.0",
4445
"phpdocumentor/guides": "^1.0 || ^1.0@dev",

composer.lock

Lines changed: 58 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/contributions/monorepository-layout.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ Consequences:
2525
not in the component repositories.
2626

2727
The components are located under the ``packages`` directory.
28+

packages/dev-server/.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.gitattributes export-ignore
2+
/docs export-ignore
3+
/tests export-ignore
4+
/.gitignore export-ignore
5+
.github export-ignore

packages/dev-server/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/*
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
======================================
2+
Contribute to the phpDocumentor Guides
3+
======================================
4+
5+
Go to the mono-repository
6+
=========================
7+
8+
This project is developed in the mono-repository `phpDocumentor Guides <https://github.com/phpDocumentor/guides>`__.
9+
The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute
10+
to this repository directly but always to the mono-repository linked above.
11+
12+
Create Issues
13+
=============
14+
15+
* If you find something missing or something is wrong in this library, you are welcome to write an issue
16+
describing the problem: `Issues on GitHub <https://github.com/phpDocumentor/guides/issues>`__.
17+
* If you can, please try to fix the problem yourself.
18+
19+
Make changes (create pull requests)
20+
===================================
21+
22+
See the `Contribution chapter <https://docs.phpdoc.org/components/guides/guides/contributions/index.html>`__ in the
23+
`Documentation` <https://docs.phpdoc.org/components/guides/guides/index.html>`__.

packages/dev-server/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Jaap van Otterdijk
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

packages/dev-server/README.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
.. image:: https://poser.pugx.org/phpdocumentor/dev-server/require/php
3+
:alt: PHP Version Require
4+
:target: https://packagist.org/packages/phpdocumentor/dev-server
5+
6+
.. image:: https://poser.pugx.org/phpdocumentor/dev-server/v/stable
7+
:alt: Latest Stable Version
8+
:target: https://packagist.org/packages/phpdocumentor/dev-server
9+
10+
.. image:: https://poser.pugx.org/phpdocumentor/dev-server/v/unstable
11+
:alt: Latest Unstable Version
12+
:target: https://packagist.org/packages/phpdocumentor/dev-server
13+
14+
.. image:: https://poser.pugx.org/phpdocumentor/dev-server/d/total
15+
:alt: Total Downloads
16+
:target: https://packagist.org/packages/phpdocumentor/dev-server
17+
18+
.. image:: https://poser.pugx.org/phpdocumentor/dev-server/d/monthly
19+
:alt: Monthly Downloads
20+
:target: https://packagist.org/packages/phpdocumentor/dev-server
21+
22+
====================
23+
phpDocumentor Guides
24+
====================
25+
26+
This repository is part of `phpDocumentor's Guides library <https://github.com/phpDocumentor/guides>`__, a framework
27+
designed to take hand-written documentation in code repositories and create an AST (abstract syntax tree) from it.
28+
This AST is then fed to a renderer, which produces the desired output, such as HTML.
29+
30+
The package `phpdocumentor/dev-server <https://packagist.org/packages/phpdocumentor/dev-server>`__ contains the
31+
application and Symfony Console Command used for standalone processing of documentation files.
32+
33+
:Mono-Repository: https://github.com/phpDocumentor/guides
34+
:Documentation: https://docs.phpdoc.org/components/guides/guides/index.html
35+
:Packagist: https://packagist.org/packages/phpdocumentor/dev-server
36+
:Contribution: https://github.com/phpDocumentor/guides/tree/main/CONTRIBUTING.rst

packages/dev-server/composer.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "phpdocumentor/dev-server",
3+
"description": "A php development server with live reloading to preview your documentation",
4+
"type": "project",
5+
"license": "MIT",
6+
"config": {
7+
"sort-packages": true
8+
},
9+
"autoload": {
10+
"psr-4": {
11+
"phpDocumentor\\DevServer\\": "src/"
12+
}
13+
},
14+
"autoload-dev": {
15+
"psr-4": {
16+
"phpDocumentor\\DevServer\\": [
17+
"tests/unit/"
18+
]
19+
}
20+
},
21+
"authors": [
22+
{
23+
"name": "jaapio",
24+
"email": "jaap@phpdoc.org"
25+
}
26+
],
27+
"require": {
28+
"php": "^8.1",
29+
"ext-inotify": "*",
30+
"ext-pcntl": "*",
31+
"monolog/monolog": "^3.0",
32+
"phpdocumentor/guides": "^1.0",
33+
"symfony/config": "^5.4 || ^6.3 || ^7.0",
34+
"symfony/console": "^5.4 || ^6.3 || ^7.0",
35+
"symfony/dependency-injection": "^5.4 || ^6.3 || ^7.0",
36+
"symfony/event-dispatcher": "^5.4 || ^6.3 || ^7.0",
37+
"cboden/ratchet": "0.4.x@dev",
38+
"react/http": "^v1.11",
39+
"react/socket": "^v1.16",
40+
"league/mime-type-detection": "^1.16"
41+
},
42+
"extra": {
43+
"branch-alias": {
44+
"dev-main": "1.x-dev"
45+
}
46+
}
47+
}

packages/guides-cli/src/Internal/HttpHandler.php renamed to packages/dev-server/src/Internal/HttpHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @link https://phpdoc.org
1212
*/
1313

14-
namespace phpDocumentor\Guides\Cli\Internal;
14+
namespace phpDocumentor\DevServer\Internal;
1515

1616
use GuzzleHttp\Psr7\Message;
1717
use GuzzleHttp\Psr7\Response;

0 commit comments

Comments
 (0)