Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
59 changes: 59 additions & 0 deletions .github/workflows/lint-corelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: core-lint pilot

on:
push:
branches: [main, develop, dev]
pull_request:
branches: [main, develop, dev]

# Pilot workflow that runs the core-lint orchestrator (PHPStan + Psalm via the
# code/core/lint adapters) ALONGSIDE the existing native phpstan/psalm jobs in
# .github/workflows/static-analysis.yml. Both must continue to run for at least
# one merge cycle so the parity between native and core-lint outputs can be
# diffed before native jobs are removed.
#
# Spec: plans/code/core/lint/RFC.md §5 (Adapter), §5.4 (Built-in Adapters)

jobs:
core-lint:
name: core-lint (pilot)
runs-on: ubuntu-latest
continue-on-error: true # Pilot — failures here MUST NOT block PRs.

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none

- name: Install PHP dependencies
run: composer install --prefer-dist --no-interaction --no-progress

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.26'

- name: Install core-lint
run: |
go install dappco.re/go/lint/cmd/core-lint@latest || \
go install github.com/dappcore/lint/cmd/core-lint@latest
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"

- name: Run core-lint (PHP, JSON for diffing)
run: |
core-lint run --lang php --ci --output json > core-lint-report.json || true
core-lint run --lang php --output text || true

- name: Upload core-lint report
if: always()
uses: actions/upload-artifact@v4
with:
name: core-lint-report
path: core-lint-report.json
if-no-files-found: ignore
1 change: 0 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ src/Core/Lang/ # Translation system with ICU + locale fallback chains
src/Core/Media/ # Media handling with thumbnail helpers
src/Core/Search/ # Search functionality
src/Core/Seo/ # SEO utilities
src/Core/Service/ # Service discovery and dependency resolution
src/Core/Storage/ # Storage with Redis circuit breaker + fallback
src/Core/Webhook/ # Webhook system + CronTrigger scheduled action
```
Expand Down
4 changes: 2 additions & 2 deletions cmd/core-php/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
package main

import (
php "forge.lthn.ai/core/php/pkg/php"
php "dappco.re/go/php/pkg/php"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
Comment thread
Snider marked this conversation as resolved.
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"require": {
"php": "^8.2",
"laravel/framework": "^11.0|^12.0",
"laravel/framework": "^11.0|^12.0|^13.0",
Comment thread
Snider marked this conversation as resolved.
"laravel/pennant": "^1.0",
"livewire/livewire": "^3.0|^4.0"
},
Expand Down
4 changes: 3 additions & 1 deletion config/core.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Core\Activity\Models\Activity;

return [

/*
Expand Down Expand Up @@ -449,7 +451,7 @@
// Custom Activity model class (optional).
// Set this to use a custom Activity model with additional scopes.
// Default: Core\Activity\Models\Activity::class
'activity_model' => env('CORE_ACTIVITY_MODEL', \Core\Activity\Models\Activity::class),
'activity_model' => env('CORE_ACTIVITY_MODEL', Activity::class),
],

];
23 changes: 16 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
module forge.lthn.ai/core/php
module dappco.re/go/php

go 1.26.0

require (
forge.lthn.ai/core/cli v0.3.7
forge.lthn.ai/core/go-i18n v0.1.7
forge.lthn.ai/core/go-io v0.1.7
dappco.re/go/cli v0.8.0-alpha.1
dappco.re/go/i18n v0.8.0-alpha.1
dappco.re/go/io v0.8.0-alpha.1
github.com/dunglas/frankenphp v1.12.1
github.com/stretchr/testify v1.11.1
gopkg.in/yaml.v3 v3.0.1
)

require (
forge.lthn.ai/core/go v0.3.3 // indirect
forge.lthn.ai/core/go-inference v0.1.6 // indirect
forge.lthn.ai/core/go-log v0.0.4 // indirect
dappco.re/go/core v0.8.0-alpha.1
dappco.re/go/api v0.8.0-alpha.1
dappco.re/go/i18n v0.8.0-alpha.1
dappco.re/go/io v0.8.0-alpha.1
dappco.re/go/log v0.8.0-alpha.1
dappco.re/go/process v0.8.0-alpha.1
dappco.re/go/scm v0.8.0-alpha.1
dappco.re/go/store v0.8.0-alpha.1
dappco.re/go/ws v0.8.0-alpha.1
dappco.re/go/core v0.8.0-alpha.1 // indirect
dappco.re/go/inference v0.8.0-alpha.1 // indirect
dappco.re/go/log v0.8.0-alpha.1 // indirect
github.com/MauriceGit/skiplist v0.0.0-20211105230623-77f5c8d3e145 // indirect
Comment thread
Snider marked this conversation as resolved.
github.com/RoaringBitmap/roaring/v2 v2.15.0 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ parameters:
- src/Core/Tests
- src/Core/Bouncer/Tests
- src/Core/Bouncer/Gate/Tests
- src/Core/Service/Tests
- src/Core/Front/Tests
- src/Mod/Trees
# Pending Core\Service module — see plans/code/core/lint/RFC.md migration
- src/Core/Cdn/Services/BunnyStorageService.php
reportUnmatchedIgnoredErrors: false
6 changes: 3 additions & 3 deletions pkg/php/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"os"
"path/filepath"

"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"forge.lthn.ai/core/go-io"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/i18n"
"dappco.re/go/io"
)

// DefaultMedium is the default filesystem medium used by the php package.
Expand Down
4 changes: 2 additions & 2 deletions pkg/php/cmd_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/i18n"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/php/cmd_ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"strings"
"time"

"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/i18n"
)

// CI command flags
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/cmd_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// - deploy:list: List recent deployments
package php

import "forge.lthn.ai/core/cli/pkg/cli"
import "dappco.re/go/cli/pkg/cli"

// AddCommands registers the 'php' command and all subcommands.
func AddCommands(root *cli.Command) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/php/cmd_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"time"

"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/i18n"
)

// Deploy command styles (aliases to shared)
Expand Down
4 changes: 2 additions & 2 deletions pkg/php/cmd_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"syscall"
"time"

"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/i18n"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/php/cmd_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package php
import (
"os"

"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/i18n"
)

func addPHPPackagesCommands(parent *cli.Command) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/cmd_serve_frankenphp.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os/signal"
"syscall"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// DockerBuildOptions configures Docker image building for PHP projects.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/coolify.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// CoolifyClient is an HTTP client for the Coolify API.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// Environment represents a deployment environment.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sort"
"strings"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// DockerfileConfig holds configuration for generating a Dockerfile.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package php
import (
"embed"

"forge.lthn.ai/core/go-i18n"
"dappco.re/go/i18n"
)

//go:embed locales/*.json
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os/exec"
"path/filepath"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// LinkedPackage represents a linked local package.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/php.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// Options configures the development server.
Expand Down
4 changes: 2 additions & 2 deletions pkg/php/quality.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"path/filepath"
"strings"

"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/go-i18n"
"dappco.re/go/cli/pkg/cli"
"dappco.re/go/i18n"
)

// FormatOptions configures PHP code formatting.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sync"
"time"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// Service represents a managed development service.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os/exec"
"path/filepath"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os/exec"
"path/filepath"

"forge.lthn.ai/core/cli/pkg/cli"
"dappco.re/go/cli/pkg/cli"
)

// TestOptions configures PHP test execution.
Expand Down
2 changes: 1 addition & 1 deletion pkg/php/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path/filepath"

"forge.lthn.ai/core/go-io"
"dappco.re/go/io"
"gopkg.in/yaml.v3"
)

Expand Down
24 changes: 23 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
</errorLevel>
</MissingOverrideAttribute>

<!-- Laravel plugin (Psalm) flags env() calls outside config/. PHPStan
ignores the equivalent identifier (larastan.noEnvCallsOutsideOfConfig).
Plugin-registered issues use <PluginIssue name="..."> form. -->
<PluginIssue name="NoEnvOutsideConfig">
<errorLevel type="suppress">
<directory name="src" />
</errorLevel>
</PluginIssue>
Comment thread
Snider marked this conversation as resolved.

<!-- Suppress optional dependency errors -->
<UndefinedClass>
<errorLevel type="suppress">
Expand Down Expand Up @@ -55,9 +64,23 @@
<referencedClass name="Core\Tenant\Models\User" />
<referencedClass name="Core\Tenant\Services\EntitlementService" />
<referencedClass name="Core\Config\Workspace" />
<!-- Pending Core\Service module (see plans/code/core/lint/RFC.md) -->
<referencedClass name="Core\Service\Contracts\HealthCheckable" />
<referencedClass name="Core\Service\HealthCheckResult" />
<!-- Pending Front\Client frontage subpackage -->
<referencedClass name="Core\Front\Client\Boot" />
<!-- Laravel framework classes Psalm CI doesn't always resolve -->
<referencedClass name="Illuminate\Foundation\Auth\User" />
</errorLevel>
</UndefinedClass>

<!-- Pending Core\Service module — referenced by Cdn BunnyStorageService and app variant -->
<MissingDependency>
<errorLevel type="suppress">
<directory name="src/Core/Cdn" />
</errorLevel>
</MissingDependency>
Comment thread
Snider marked this conversation as resolved.

<!-- Suppress false positives from strict type analysis -->
<NoValue>
<errorLevel type="suppress">
Expand All @@ -82,7 +105,6 @@
<directory name="src/Core/Input/Tests" />
<directory name="src/Core/Bouncer/Tests" />
<directory name="src/Core/Bouncer/Gate/Tests" />
<directory name="src/Core/Service/Tests" />
<directory name="src/Core/Front/Tests" />
<directory name="src/Mod/Trees" />
</ignoreFiles>
Expand Down
Loading
Loading