Compare commits

...

3 commits
v0.1.2 ... main

Author SHA1 Message Date
Snider
b96062b621 chore: sync go.mod dependencies
Some checks failed
Security Scan / security (push) Successful in 9s
Test / test (push) Failing after 22s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 15:22:47 +00:00
Snider
35d31be9cf chore: replace Taskfile with .core/build.yaml
Some checks failed
Security Scan / security (push) Successful in 7s
Test / test (push) Failing after 23s
Build config now in .core/build.yaml — `core build` handles
CGO=0 default builds. FrankenPHP (CGO=1) handled separately.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 14:46:04 +00:00
Snider
a36ae054c0 refactor: swap pkg/framework imports to pkg/core
Some checks failed
Security Scan / security (push) Successful in 6s
Test / test (push) Failing after 28s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 14:11:05 +00:00
5 changed files with 38 additions and 31 deletions

28
.core/build.yaml Normal file
View file

@ -0,0 +1,28 @@
# Core PHP build configuration
# Used by: core build
version: 1
project:
name: core-php
description: PHP development CLI with FrankenPHP integration
main: ./cmd/core-php
binary: core-php
build:
cgo: false
flags:
- -trimpath
ldflags:
- -s
- -w
targets:
- os: linux
arch: amd64
- os: linux
arch: arm64
- os: darwin
arch: arm64
- os: windows
arch: amd64

View file

@ -1,23 +0,0 @@
version: '3'
tasks:
build:
desc: Build core-php binary
cmds:
- CGO_ENABLED=0 go build -o ./bin/core-php ./cmd/core-php
build-frankenphp:
desc: Build with FrankenPHP support (needs PHP-ZTS)
cmds:
- go build -o ./bin/core-php ./cmd/core-php
test:
desc: Run tests
cmds:
- CGO_ENABLED=0 go test ./...
run:
desc: Build and run
cmds:
- task: build
- ./bin/core-php {{.CLI_ARGS}}

View file

@ -7,9 +7,9 @@ import (
"sync"
"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go/pkg/framework"
"forge.lthn.ai/core/go/pkg/core"
"forge.lthn.ai/core/go-i18n"
"forge.lthn.ai/core/go/pkg/process"
"forge.lthn.ai/core/go-process"
)
// QARunner orchestrates PHP QA checks using pkg/process.
@ -17,7 +17,7 @@ type QARunner struct {
dir string
fix bool
service *process.Service
core *framework.Core
core *core.Core
// Output tracking
outputMu sync.Mutex
@ -27,14 +27,14 @@ type QARunner struct {
// NewQARunner creates a QA runner for the given directory.
func NewQARunner(dir string, fix bool) (*QARunner, error) {
// Create a Core with process service for the QA session
core, err := framework.New(
framework.WithName("process", process.NewService(process.Options{})),
core, err := core.New(
core.WithName("process", process.NewService(process.Options{})),
)
if err != nil {
return nil, cli.WrapVerb(err, "create", "process service")
}
svc, err := framework.ServiceFor[*process.Service](core, "process")
svc, err := core.ServiceFor[*process.Service](core, "process")
if err != nil {
return nil, cli.WrapVerb(err, "get", "process service")
}
@ -238,7 +238,7 @@ func (r *QARunner) Run(ctx context.Context, stages []QAStage) (*QARunResult, err
}
// Register output handler
r.core.RegisterAction(func(c *framework.Core, msg framework.Message) error {
r.core.RegisterAction(func(c *core.Core, msg core.Message) error {
switch m := msg.(type) {
case process.ActionProcessOutput:
r.outputMu.Lock()

3
go.mod
View file

@ -4,15 +4,16 @@ go 1.26.0
require (
forge.lthn.ai/core/cli v0.1.0
forge.lthn.ai/core/go v0.1.0
forge.lthn.ai/core/go-i18n v0.1.0
forge.lthn.ai/core/go-io v0.0.1
forge.lthn.ai/core/go-process v0.1.0
github.com/dunglas/frankenphp v1.5.0
github.com/stretchr/testify v1.11.1
gopkg.in/yaml.v3 v3.0.1
)
require (
forge.lthn.ai/core/go v0.1.0 // indirect
forge.lthn.ai/core/go-crypt v0.0.3 // indirect
forge.lthn.ai/core/go-inference v0.0.2 // indirect
forge.lthn.ai/core/go-log v0.0.1 // indirect

1
go.sum
View file

@ -12,6 +12,7 @@ forge.lthn.ai/core/go-io v0.0.1 h1:N/GCl6Asusfr4gs53JZixJVtqcnerQ6GcxSN8F8iJXY=
forge.lthn.ai/core/go-io v0.0.1/go.mod h1:l+gG/G5TMIOTG8G7y0dg4fh1a7Suy8wCYVwsz4duV7M=
forge.lthn.ai/core/go-log v0.0.1 h1:x/E6EfF9vixzqiLHQOl2KT25HyBcMc9qiBkomqVlpPg=
forge.lthn.ai/core/go-log v0.0.1/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw=
forge.lthn.ai/core/go-process v0.1.0 h1:lRpliQuu/Omt+kAHMFoQYOb5PKEIKg8yTMchFhejpK8=
github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw=
github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=