Skip to content

Align default server port with Laravel#422

Merged
binaryfire merged 4 commits into
0.4from
align-server-port-with-laravel
Jul 7, 2026
Merged

Align default server port with Laravel#422
binaryfire merged 4 commits into
0.4from
align-server-port-with-laravel

Conversation

@binaryfire

@binaryfire binaryfire commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Context

Hypervel still carried the old Hyperf-era HTTP server default of 9501. For 0.4, the public surface is much closer to Laravel, and the development server should feel familiar when someone reaches for the default address.

Laravel's serve command defaults to port 8000, with SERVER_HOST / SERVER_PORT available as environment-backed defaults. This PR brings Hypervel's primary application server in line with that convention.

Changes

  • Change the default HTTP server port from 9501 to 8000.
  • Rename the primary application server env variables from HTTP_SERVER_HOST / HTTP_SERVER_PORT to SERVER_HOST / SERVER_PORT.
  • Update the low-level Hypervel\Server\Port fallback to 8000 so ad hoc port instances match the published default.
  • Update server, Testbench, routing, and socket tests that used the old default-like values.
  • Update current Boost docs to show 8000, 8001 for override examples, and the new env variable names.

I intentionally left historical material alone: docs/0.3, docs/plans, _archive, and the engine integration test ports such as 19501 / 19502 / 29501 are not part of the public application server default.

Why the env rename

SERVER_HOST and SERVER_PORT now describe the primary application server. If Hypervel grows additional listeners later, those can use explicit prefixes for their own domains, like Reverb already does with REVERB_SERVER_HOST / REVERB_SERVER_PORT.

This keeps the common path Laravel-familiar without preventing more specific server configuration names where they are actually needed.

Verification

Ran composer fix from the components repo root.

  • PHP CS Fixer: passed, fixed 0 files
  • PHPStan: passed
  • Main parallel suite: passed, 21434 tests / 60726 assertions / 643 skipped
  • Testbench suite: passed, 315 tests / 861 assertions / 3 skipped
  • Dogfood package suite: passed, 4 tests / 7 assertions
  • git diff --check: passed

I also searched the live surface for stale references:

  • No live HTTP_SERVER_HOST / HTTP_SERVER_PORT references remain in src, tests, current docs, .github, or bin.
  • No standalone live 9501 / 9502 references remain in those areas.
  • .github workflows only reference TEST_SERVER_HOST for opt-in engine/reverb integration servers, which is unrelated to the application server default.

Summary by CodeRabbit

  • Documentation

    • Updated setup, deployment, lifecycle, benchmark, starter kit, and testbench docs to reflect the new default server port.
    • Revised example URLs and command-line overrides to use 8000 and 8001.
  • Bug Fixes

    • Standardized the default HTTP server configuration to use port 8000.
    • Updated server host/port environment variable names to the new configuration format.

Change the primary HTTP server default port from the Hyperf-era 9501 value to Laravel's 8000 convention.\n\nRename the default application server environment variables from HTTP_SERVER_HOST and HTTP_SERVER_PORT to SERVER_HOST and SERVER_PORT. The unprefixed names now describe the primary application server, while future secondary listeners can use explicit prefixes such as REVERB_SERVER_* or METRICS_SERVER_*.\n\nUpdate the low-level Port fallback to 8000 as well so ad hoc server port instances match the published default configuration.
Move live test fixtures away from the old 9501 default and onto the new 8000 baseline.\n\nUse 8001 for command override examples so the tests continue to prove that serve --port mutates only the HTTP server entry.\n\nRefresh route-port and socket tests that used 9501 as arbitrary sample data so live tests no longer keep teaching the removed default.
Update the current Boost documentation to describe the new 8000 default server port and SERVER_HOST / SERVER_PORT environment variables.\n\nRefresh nginx proxy examples, starter-kit and installation URLs, lifecycle copy, benchmark snippets, and Testbench serve examples so user-facing 0.4 docs consistently show the Laravel-aligned default.\n\nHistorical 0.3 docs, archived tests, and dated planning notes are intentionally left unchanged.
@binaryfire binaryfire merged commit b87676c into 0.4 Jul 7, 2026
35 of 36 checks passed
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c153929b-1358-47ad-a20c-39d3dadaa645

📥 Commits

Reviewing files that changed from the base of the PR and between a30198a and 750274b.

⛔ Files ignored due to path filters (9)
  • docs/0.3/.vuepress/public/favicon.ico is excluded by !**/*.ico
  • docs/0.3/.vuepress/public/home.png is excluded by !**/*.png
  • docs/0.3/.vuepress/public/icon.png is excluded by !**/*.png
  • docs/0.3/.vuepress/public/icon.svg is excluded by !**/*.svg
  • docs/0.3/.vuepress/public/images/prompts-example.png is excluded by !**/*.png
  • docs/0.3/.vuepress/public/images/whoops.png is excluded by !**/*.png
  • docs/0.3/.vuepress/public/logo.png is excluded by !**/*.png
  • docs/0.3/.vuepress/public/logo.svg is excluded by !**/*.svg
  • docs/0.3/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (93)
  • docs/0.3/.vuepress/config.js
  • docs/0.3/.vuepress/sidebar.js
  • docs/0.3/.vuepress/styles/palette.scss
  • docs/0.3/README.md
  • docs/0.3/docs/artisan.md
  • docs/0.3/docs/authentication.md
  • docs/0.3/docs/authorization.md
  • docs/0.3/docs/blade.md
  • docs/0.3/docs/broadcasting.md
  • docs/0.3/docs/cache.md
  • docs/0.3/docs/collections.md
  • docs/0.3/docs/configuration.md
  • docs/0.3/docs/console-tests.md
  • docs/0.3/docs/container.md
  • docs/0.3/docs/context.md
  • docs/0.3/docs/contracts.md
  • docs/0.3/docs/contributions.md
  • docs/0.3/docs/controllers.md
  • docs/0.3/docs/coroutine.md
  • docs/0.3/docs/csrf.md
  • docs/0.3/docs/data-objects.md
  • docs/0.3/docs/database-testing.md
  • docs/0.3/docs/database.md
  • docs/0.3/docs/deployment.md
  • docs/0.3/docs/eloquent-collections.md
  • docs/0.3/docs/eloquent-factories.md
  • docs/0.3/docs/eloquent-mutators.md
  • docs/0.3/docs/eloquent-relationships.md
  • docs/0.3/docs/eloquent-resources.md
  • docs/0.3/docs/eloquent-serialization.md
  • docs/0.3/docs/eloquent.md
  • docs/0.3/docs/encryption.md
  • docs/0.3/docs/errors.md
  • docs/0.3/docs/events.md
  • docs/0.3/docs/facades.md
  • docs/0.3/docs/filesystem.md
  • docs/0.3/docs/hashing.md
  • docs/0.3/docs/helpers.md
  • docs/0.3/docs/horizon.md
  • docs/0.3/docs/http-client.md
  • docs/0.3/docs/http-tests.md
  • docs/0.3/docs/installation.md
  • docs/0.3/docs/introduction.md
  • docs/0.3/docs/lifecycle.md
  • docs/0.3/docs/localization.md
  • docs/0.3/docs/logging.md
  • docs/0.3/docs/mail.md
  • docs/0.3/docs/middleware.md
  • docs/0.3/docs/migrations.md
  • docs/0.3/docs/mocking.md
  • docs/0.3/docs/nested-set.md
  • docs/0.3/docs/notifications.md
  • docs/0.3/docs/packages-porting.md
  • docs/0.3/docs/packages.md
  • docs/0.3/docs/pagination.md
  • docs/0.3/docs/permission.md
  • docs/0.3/docs/processes.md
  • docs/0.3/docs/prompts.md
  • docs/0.3/docs/providers.md
  • docs/0.3/docs/queries.md
  • docs/0.3/docs/queues.md
  • docs/0.3/docs/rate-limiting.md
  • docs/0.3/docs/redis.md
  • docs/0.3/docs/requests.md
  • docs/0.3/docs/responses.md
  • docs/0.3/docs/routing.md
  • docs/0.3/docs/sanctum.md
  • docs/0.3/docs/scheduling.md
  • docs/0.3/docs/seeding.md
  • docs/0.3/docs/session.md
  • docs/0.3/docs/socialite.md
  • docs/0.3/docs/strings.md
  • docs/0.3/docs/structure.md
  • docs/0.3/docs/telescope.md
  • docs/0.3/docs/testbench.md
  • docs/0.3/docs/testing.md
  • docs/0.3/docs/urls.md
  • docs/0.3/docs/validation.md
  • docs/0.3/docs/views.md
  • docs/0.3/package.json
  • src/boost/docs/deployment.md
  • src/boost/docs/installation.md
  • src/boost/docs/introduction.md
  • src/boost/docs/lifecycle.md
  • src/boost/docs/starter-kits.md
  • src/boost/docs/testbench.md
  • src/foundation/config/server.php
  • src/server/src/Port.php
  • tests/Engine/SocketTest.php
  • tests/Integration/Routing/RoutePortTest.php
  • tests/Routing/RoutePortTest.php
  • tests/Server/ServerStartCommandTest.php
  • tests/Testbench/Foundation/Console/ServeCommandTest.php

📝 Walkthrough

Walkthrough

The default Hypervel HTTP server port is changed from 9501 to 8000 across config defaults, the Port class, and documentation, with override examples updated from 9502 to 8001. The HTTP_SERVER_HOST/HTTP_SERVER_PORT environment variables are renamed to SERVER_HOST/SERVER_PORT. Tests are updated to match new port values.

Changes

Default HTTP server port update

Layer / File(s) Summary
Core config and Port class default
src/foundation/config/server.php, src/server/src/Port.php
Server config switches to SERVER_HOST/SERVER_PORT env vars with defaults 0.0.0.0/8000 (int-cast), and Port class default port changes from 9501 to 8000.
Server start command and socket tests
tests/Server/ServerStartCommandTest.php, tests/Testbench/Foundation/Console/ServeCommandTest.php, tests/Engine/SocketTest.php
Test expectations for server startup config and socket connection updated from ports 9501/9502 to 8000/8001.
Routing port matching and URL generation tests
tests/Routing/RoutePortTest.php, tests/Integration/Routing/RoutePortTest.php
Route-scoping, dispatch, LogicException, and URL/signed-URL generation tests updated to use port 8000 (with route-explicit port 8080 retained for comparison).
Documentation updates
src/boost/docs/deployment.md, src/boost/docs/installation.md, src/boost/docs/introduction.md, src/boost/docs/lifecycle.md, src/boost/docs/starter-kits.md, src/boost/docs/testbench.md
Deployment, installation, benchmarking, lifecycle, starter-kit, and testbench docs updated to reference port 8000 (override examples to 8001) and renamed SERVER_HOST/SERVER_PORT variables.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

Not applicable — this change is a repetitive default-value substitution across config, tests, and docs without new control flow or multi-component interactions.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch align-server-port-with-laravel

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR aligns Hypervel's default HTTP server port with Laravel's convention by changing the default from 9501 to 8000 and renaming the application server environment variables from HTTP_SERVER_HOST/HTTP_SERVER_PORT to SERVER_HOST/SERVER_PORT. The change is consistent across configuration, source code, documentation, and the test suite.

  • src/foundation/config/server.php and src/server/src/Port.php updated to use SERVER_HOST/SERVER_PORT at default 8000; all current-docs, tests, and Boost docs updated correspondingly.
  • Historical docs (docs/0.3), archived material, and integration-test engine ports (19501/19502/29501) are intentionally left unchanged, which is appropriate.

Confidence Score: 5/5

Safe to merge — all changes are mechanical port/env-var renames applied consistently across config, source, tests, and docs.

The diff is a coherent rename of a default value and two env variable names. The config default, the Port fallback, all test fixtures, and all current documentation are updated in lockstep. Integration-test engine ports and historical 0.3 docs are intentionally left unchanged, which is correct. A grep for stale references in src/ and tests/ found none. No logic, security surface, or runtime behavior changed.

No files require special attention.

Important Files Changed

Filename Overview
src/foundation/config/server.php Correctly renames env vars from HTTP_SERVER_HOST/HTTP_SERVER_PORT to SERVER_HOST/SERVER_PORT and changes default port to 8000
src/server/src/Port.php Default fallback port updated from 9501 to 8000; no other logic changed
tests/Routing/RoutePortTest.php All occurrences of 9501 replaced with 8000 in request URLs and assertions; test logic unchanged and correct
tests/Server/ServerStartCommandTest.php Port defaults updated from 9501 to 8000 and override port from 9502 to 8001 in mock config and assertions
tests/Testbench/Foundation/Console/ServeCommandTest.php Mock config expectations updated from 9501 to 8000; no logic changes
src/boost/docs/deployment.md Prose, nginx proxy_pass target, and env var names updated consistently to 8000/SERVER_HOST/SERVER_PORT
src/boost/docs/installation.md localhost URL and example override port updated from 9501/9502 to 8000/8001

Reviews (1): Last reviewed commit: "Document Laravel-aligned server defaults" | Re-trigger Greptile

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.

1 participant