Compare commits
No commits in common. "main" and "v0.1.2" have entirely different histories.
5 changed files with 31 additions and 38 deletions
|
|
@ -1,28 +0,0 @@
|
|||
# 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
|
||||
23
Taskfile.yml
Normal file
23
Taskfile.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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}}
|
||||
|
|
@ -7,9 +7,9 @@ import (
|
|||
"sync"
|
||||
|
||||
"forge.lthn.ai/core/cli/pkg/cli"
|
||||
"forge.lthn.ai/core/go/pkg/core"
|
||||
"forge.lthn.ai/core/go/pkg/framework"
|
||||
"forge.lthn.ai/core/go-i18n"
|
||||
"forge.lthn.ai/core/go-process"
|
||||
"forge.lthn.ai/core/go/pkg/process"
|
||||
)
|
||||
|
||||
// QARunner orchestrates PHP QA checks using pkg/process.
|
||||
|
|
@ -17,7 +17,7 @@ type QARunner struct {
|
|||
dir string
|
||||
fix bool
|
||||
service *process.Service
|
||||
core *core.Core
|
||||
core *framework.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 := core.New(
|
||||
core.WithName("process", process.NewService(process.Options{})),
|
||||
core, err := framework.New(
|
||||
framework.WithName("process", process.NewService(process.Options{})),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, cli.WrapVerb(err, "create", "process service")
|
||||
}
|
||||
|
||||
svc, err := core.ServiceFor[*process.Service](core, "process")
|
||||
svc, err := framework.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 *core.Core, msg core.Message) error {
|
||||
r.core.RegisterAction(func(c *framework.Core, msg framework.Message) error {
|
||||
switch m := msg.(type) {
|
||||
case process.ActionProcessOutput:
|
||||
r.outputMu.Lock()
|
||||
|
|
|
|||
3
go.mod
3
go.mod
|
|
@ -4,16 +4,15 @@ 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
1
go.sum
|
|
@ -12,7 +12,6 @@ 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=
|
||||
|
|
|
|||
Reference in a new issue