Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9a634f0
chore(php): partial audit cleanup — 9 findings cleared (Mantis #1321)
Snider May 1, 2026
a0be59f
Merge skeleton commit from origin/dev (Mantis #1260) — keep both
Snider May 1, 2026
ce5f38c
chore(php): convert extract.go + workspace.go to core wrappers (Manti…
Snider May 1, 2026
7de56e7
chore(php): clear 14 sonar bugs (Mantis #1295)
Snider May 1, 2026
c61c863
chore(php): convert cmd_dev.go + services_windows.go to core canon (M…
Snider May 1, 2026
21d0e17
chore(php): convert detect.go to core/go wrappers
Snider May 1, 2026
04b78c6
chore(php): convert env.go to core/go wrappers
Snider May 1, 2026
bb39665
chore(php): convert handler.go to core/go wrappers
Snider May 1, 2026
485bfef
chore(php): convert bridge.go to core/go wrappers
Snider May 1, 2026
af54dc6
chore(php): convert cmd_build.go to core/go wrappers
Snider May 1, 2026
f652277
chore(php): convert cmd_serve_frankenphp.go to core/go wrappers
Snider May 1, 2026
d02f4c8
chore(php): convert dockerfile.go to core/go wrappers
Snider May 1, 2026
1a1c4fc
chore(php): convert ssl.go path/home calls to core wrappers
Snider May 1, 2026
f7a6526
chore(php): convert testing.go to core/go wrappers
Snider May 1, 2026
767c885
chore(php): convert packages.go to core/go wrappers
Snider May 1, 2026
44467d7
chore(php): convert container.go to core/go wrappers
Snider May 1, 2026
7956ed9
chore(php): convert services.go path/strings calls to core wrappers
Snider May 1, 2026
3447a8a
chore(php): convert coolify.go to core/go wrappers + extract compat h…
Snider May 1, 2026
4f0d6a7
chore(php): convert quality.go to core/go wrappers
Snider May 1, 2026
acdca57
chore(php): convert cmd_ci.go to core/go wrappers + extend compat hel…
Snider May 1, 2026
daed28f
feat(php): add canonical CoreService for Core registration (Mantis #1…
Snider May 1, 2026
3e9abf5
fix(php): ax7 triplets + Example* gaps for service.go (Mantis #1336)
Snider May 1, 2026
6d93530
chore(deps): bump dappco.re/go to v0.10.3
Snider May 31, 2026
1ec071c
chore(deps): bump dappco.re/go v0.10.3 → v0.10.4
Snider Jun 13, 2026
96dcee2
chore: remove GEMINI/TODO/ROADMAP cruft from repo root
Snider Jun 27, 2026
14b01fb
chore: drop committed build binary bin/core-php-cgo + gitignore
Snider Jun 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ infection-summary.log
# Worktrees
.worktrees/
.core/

# committed build output — keep out of git
/bin/core-php-cgo
File renamed without changes.
214 changes: 0 additions & 214 deletions ROADMAP.md

This file was deleted.

15 changes: 0 additions & 15 deletions TODO.md

This file was deleted.

Binary file removed bin/core-php-cgo
Binary file not shown.
2 changes: 1 addition & 1 deletion go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module dappco.re/go/php
go 1.26.2

require (
dappco.re/go v0.9.0
dappco.re/go v0.10.4
dappco.re/go/cli v0.9.0
dappco.re/go/i18n v0.9.0
dappco.re/go/io v0.9.0
Expand Down
4 changes: 4 additions & 0 deletions go/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
dappco.re/go v0.9.0 h1:4ruZRNqKDDva8o6g65tYggjGVe42E6/lMZfVKXtr3p0=
dappco.re/go v0.9.0/go.mod h1:xapr7fLK4/9Pu2iSCr4qZuIuatmtx1j56zS/oPDbGyQ=
dappco.re/go v0.10.3 h1:aViRNxdg2jG84P6RsiD+aSta+GcFJwGXMNQPjFPbJ9g=
dappco.re/go v0.10.3/go.mod h1:xapr7fLK4/9Pu2iSCr4qZuIuatmtx1j56zS/oPDbGyQ=
dappco.re/go v0.10.4 h1:vir5AK8AkHbTxhPUT0et6Tc0P8i/i+gLInM0LRLt1EU=
dappco.re/go v0.10.4/go.mod h1:xapr7fLK4/9Pu2iSCr4qZuIuatmtx1j56zS/oPDbGyQ=
dappco.re/go/cli v0.9.0 h1:KY8V75vqi4HJtZwWEpY8QZT6ukpNJ4FSatphSOBmBJ8=
dappco.re/go/cli v0.9.0/go.mod h1:6PQIZtv319UKowolKG8tUIRdcZ6nkbFsRe+ZJi8KiQ4=
dappco.re/go/i18n v0.9.0 h1:ZZuFSBzCGYrQotXs/tOxxiPLB+NkhjYF+HrxYkWK6+U=
Expand Down
31 changes: 21 additions & 10 deletions go/pkg/php/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package php

import (
"context"
`encoding/json`
`fmt`
`log`
"encoding/json"
"io"
"net"
"net/http"

core "dappco.re/go"
)

// BridgeHandler is the interface that the host application implements to
Expand Down Expand Up @@ -45,10 +46,15 @@ func NewBridge(handler BridgeHandler) (*Bridge, error) { // Result boundary
Args json.RawMessage `json:"args"`
}
r.Body = http.MaxBytesReader(w, r.Body, 1<<20)
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
body, err := io.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
if r := core.JSONUnmarshal(body, &req); !r.OK {
http.Error(w, r.Error(), http.StatusBadRequest)
return
}

result, err := handler.HandleBridgeCall(req.Method, req.Args)
if err != nil {
Expand All @@ -61,19 +67,19 @@ func NewBridge(handler BridgeHandler) (*Bridge, error) { // Result boundary
// Listen on a random available port (localhost only)
listener, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
return nil, fmt.Errorf("listen: %w", err)
return nil, core.E("php.NewBridge", "listen", err)
}

bridge.port = listener.Addr().(*net.TCPAddr).Port
bridge.server = &http.Server{Handler: mux}

go func() {
if err := bridge.server.Serve(listener); err != nil && err != http.ErrServerClosed {
log.Printf("go-php: bridge error: %v", err)
core.Println(core.Sprintf("go-php: bridge error: %v", err))
}
}()

log.Printf("go-php: bridge listening on http://127.0.0.1:%d", bridge.port)
core.Println(core.Sprintf("go-php: bridge listening on http://127.0.0.1:%d", bridge.port))
return bridge, nil
}

Expand All @@ -84,7 +90,7 @@ func (b *Bridge) Port() int {

// URL returns the full base URL of the bridge.
func (b *Bridge) URL() string {
return fmt.Sprintf("http://127.0.0.1:%d", b.port)
return core.Sprintf("http://127.0.0.1:%d", b.port)
}

// Shutdown gracefully stops the bridge server.
Expand All @@ -94,7 +100,12 @@ func (b *Bridge) Shutdown(ctx context.Context) error { // Result boundary

func bridgeJSON(w http.ResponseWriter, v any) {
w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(v); err != nil {
log.Printf("go-php: bridge encode error: %v", err)
r := core.JSONMarshal(v)
if !r.OK {
core.Println(core.Sprintf("go-php: bridge encode error: %v", r.Error()))
return
}
if _, err := w.Write(r.Value.([]byte)); err != nil {
core.Println(core.Sprintf("go-php: bridge write error: %v", err))
}
}
12 changes: 5 additions & 7 deletions go/pkg/php/cmd.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package php

import (
`os`
`path/filepath`

core "dappco.re/go"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/io"
Expand Down Expand Up @@ -115,7 +112,8 @@ func activateWorkspacePackage() error { // Result boundary
return nil
}

if err := os.Chdir(targetDir); err != nil {
if r := core.Chdir(targetDir); !r.OK {
err, _ := r.Value.(error)
return core.E("php", "failed to change directory to active package", err)
}

Expand All @@ -142,9 +140,9 @@ func activeWorkspacePackageDir(wsRoot string, config *workspaceConfig) string {
if pkgDir == "" {
pkgDir = "./packages"
}
if !filepath.IsAbs(pkgDir) {
pkgDir = filepath.Join(wsRoot, pkgDir)
if !core.PathIsAbs(pkgDir) {
pkgDir = core.PathJoin(wsRoot, pkgDir)
}

return filepath.Join(pkgDir, config.Active)
return core.PathJoin(pkgDir, config.Active)
}
Loading
Loading