PHPackages                             blackops/framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. blackops/framework

ActiveLibrary

blackops/framework
==================

BlackOps PHP Framework.

1.2.0(2w ago)015↓66.7%1MITPHPPHP &gt;=8.5CI passing

Since Jul 13Pushed 1w agoCompare

[ Source](https://github.com/kubotak-is/blackops)[ Packagist](https://packagist.org/packages/blackops/framework)[ RSS](/packages/blackops-framework/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (47)Versions (14)Used By (1)

BlackOps
========

[](#blackops)

[![CI](https://github.com/kubotak-is/blackops/actions/workflows/ci.yml/badge.svg)](https://github.com/kubotak-is/blackops/actions/workflows/ci.yml)[![Packagist Version](https://camo.githubusercontent.com/d38fb17f30f68b78dbf8f7ea05131598ca48f6abbd68e866a5ad5175b5ad5bf7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c61636b6f70732f6672616d65776f726b2e737667)](https://packagist.org/packages/blackops/framework)[![PHP](https://camo.githubusercontent.com/0bfc01a0ebfa561e6a8cbe1c46e0a5f1c37fecd74f2a4cb9134493ba6fad3d19/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e352d3737374242342e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

BlackOpsは、PHP 8.5向けのHeadless Operation Frameworkです。同期HTTP実行とPostgreSQLを使ったDeferred実行を同じOperation Modelで扱い、Lifecycle Journal、Retry、Outcome、Retention、BlackOps CLIを提供します。

Stable `1.2.0`ではNamed Doctrine DBAL Connection、Constructor Injection、`#[Transactional]`付きOperation／Service、Nested Required、`#[AfterCommit]`を利用できます。BlackOpsはExperimentalであり、1.x Minor間の互換性を保証しません。

Status
------

[](#status)

Latest Experimental StableはFramework／Skeleton `1.2.0`です。BlackOpsはExperimentalであり、1.x Minor間のBackward CompatibilityとProduction Readinessを保証しません。破壊的変更と移行手順は[CHANGELOG](CHANGELOG.md)と[Upgrade Guide](UPGRADE.md)で確認してください。

Framework／Skeleton `1.2.0`はannotated Tag、GitHub Release、Packagistへ公開済みです。Experimental Releaseのため、Production Readyや1.x Minor間のBackward Compatibilityは保証しません。

Documentation Websiteは[Cloudflare Pages](https://blackops-php.pages.dev)へ公開済みで、Local／CI Buildと公開Artifact境界を検証しています。

利用者向けの機能差と制約は[Current Status](docs/guide/mvp-status.md)を参照してください。

Installation
------------

[](#installation)

公開済みSkeletonからApplicationを作成します。

```
composer create-project blackops/skeleton my-app 1.2.0
cd my-app
```

`blackops new`専用Installerは提供していません。Composer標準の`create-project`が公式の作成方法です。

生成されたApplicationはFramework-owned `withEnvironmentFile()`と`BlackOps\Http\SapiRuntime`を利用するため、Dotenv／PSR-7／SAPI／UUIDv7 Runtime PackageをApplication Composerへ重複宣言しません。DBAL／MigrationsなどApplication Sourceが直接ImportするPackageだけを追加します。

このCommandが作成するのは公開済みExperimental Stable `1.2.0`のApplicationです。1.2.0のHeader Authentication、Database／Transaction、Deferred Worker Journeyを確認できます。

Stable 1.2.0 Quickstart
-----------------------

[](#stable-120-quickstart)

公開済みStable `1.2.0`で作成した`my-app`のQuickstartです。[利用者向けQuickstart](docs/guide/mvp-sample.md)で公開PackageのInstall、Docker Image、Artifact、Databaseを明示的に準備します。

```
docker compose build app http
docker compose run --rm app composer install
docker compose run --rm app php blackops operation:list
docker compose run --rm app php blackops database:migrate
docker compose run --rm app php blackops build:compile
docker compose run --rm app php blackops database:seed
docker compose up -d
```

確認用Endpoint:

```
curl -H 'X-Sample-Token: local-example' http://127.0.0.1:8080/welcome

curl -X POST -H 'Content-Type: application/json' \
  -H 'X-Sample-Token: local-example' \
  -d '{"reference":"order-001"}' \
  http://127.0.0.1:8080/orders

curl -X POST -H 'Content-Type: application/json' \
  -H 'X-Sample-Token: local-example' \
  -d '{"reportName":"weekly","recipientEmail":"reports@example.com"}' \
  http://127.0.0.1:8080/reports

curl -X POST -H 'Content-Type: application/json' \
  -H 'X-Sample-Token: local-example' \
  -d '{"reference":"incident-demo-001","sensitiveNote":"private diagnostic note"}' \
  http://127.0.0.1:8080/failures
```

`/failures`のSafe 500が返すOperation IDは、Docker-only Quickstartでは`docker compose run --rm app php blackops operation:inspect  [--json]`へ渡します。PostgreSQLはHostへPublishせず、ViewerはCLI ContainerのLoopback限定なので、このDocker構成からHost BrowserへViewerを公開できません。ViewerはConsumer E2EのようにViewerとHTTP Clientを同じCLI Container／Local Network Namespaceへ置いて検証します。

Browserで`php blackops operation:viewer`を使うには、Application／PHP CLI／PostgreSQL／Browserが同じLocal Network Namespaceから到達可能なNative Runtimeが必要です。Non-loopback Bindへ緩めません。Application／Framework相関Logは`var/log/application.jsonl`で同じIDを使い、Sensitive ValueとActor IDをSafe Projectionします。

Stable `1.2.0`の準備方法と利用可能なEndpointは[利用者向けQuickstart](docs/guide/mvp-sample.md)を参照してください。

Full-stack Reference Application
--------------------------------

[](#full-stack-reference-application)

[BlackOps Board](examples/community-board/README.md)は、Repository `main`だけで提供するLocal Full-stack Reference Applicationです。QuickstartがFrameworkの最短ContractをHTTPとWorkerで確認するのに対し、BlackOps BoardはApplication-owned Identity、Framework Session Core、Generated Ephemeral Auth Operation、SvelteKit Same-origin BFF、DBAL Domain Repository、Inline Post／Comment、Deferred Digest、Accessible Product UIまでを一つのBrowser Journeyで示します。

[Community Board Guide](docs/guide/community-board.md)は、空のLocal StateからSetup、Seed、通常Login、Inline／Deferred Journeyを再現し、BrowserからPostgreSQL／Workerまでの責任境界を説明します。公開Demo CredentialはLocal／Test Fixtureであり、Stable `1.2.0` Skeletonには含まれません。Community Boardは外部Hostingしていません。

[![BlackOps BoardのCredential-free Landing画面](docs/guide/assets/community-board/blackops-board.png)](docs/guide/community-board.md)

BlackOps CLI
------------

[](#blackops-cli)

Project Rootに置く薄い`blackops` EntrypointからFramework所有Generatorを利用できます。

```
php blackops make:operation Billing/CreateInvoice --type=billing.invoice.create
php blackops make:migration CreateOrdersTable
php blackops make:seeder Catalog/ProductSeeder
php blackops build:compile
php blackops database:migrate --dry-run
php blackops database:seed
```

Framework UpdateはProject Rootの`blackops`や生成済みSourceを書き換えません。更新後のCommandとStubは、その後に新規生成するFileへ反映されます。

Development
-----------

[](#development)

Frameworkの開発CommandはWSL2内のRepository Rootで、Docker Composeを通して実行します。

```
docker compose build app
docker compose run --rm app composer install

docker compose run --rm app mago format --check src tests examples
docker compose run --rm app mago lint
docker compose run --rm app mago analyze
docker compose run --rm app vendor/bin/phpunit
docker compose run --rm app vendor/bin/deptrac
```

同じ品質Gateは[GitHub Actions CI](.github/workflows/ci.yml)で`main`へのPushとPull Requestごとに実行されます。詳細な環境構築は[Development Setup](docs/internal/development-setup.md)を参照してください。

Documentation
-------------

[](#documentation)

- [Framework利用者向けDocumentation](docs/guide/README.md)
- [Installation](docs/guide/installation.md)
- [First Typed Self-handled Operation](docs/guide/first-operation.md)
- [Local Runtime](docs/guide/runtime-bootstrap.md)
- [Framework実装者向けInternals](docs/internal/README.md)
- [Documentation Website Delivery](docs/internal/documentation-website.md)
- [Application Bootstrap](docs/guide/application-bootstrap.md)
- [Project Generators and Framework Updates](docs/guide/project-generators.md)
- [Database Migrations](docs/guide/database-migrations.md)
- [Data Retention](docs/guide/retention.md)

License
-------

[](#license)

[MIT License](LICENSE)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance97

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

3

Last Release

17d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13742370?v=4)[KenjiroKubota](/maintainers/kubotak-is)[@kubotak-is](https://github.com/kubotak-is)

---

Top Contributors

[![kubotak-is](https://avatars.githubusercontent.com/u/13742370?v=4)](https://github.com/kubotak-is "kubotak-is (496 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/blackops-framework/health.svg)

```
[![Health](https://phpackages.com/badges/blackops-framework/health.svg)](https://phpackages.com/packages/blackops-framework)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

605.9M708](/packages/shopware-core)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86538.6k](/packages/flow-php-flow)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.3k42.4k21](/packages/tempest-framework)[typo3/cms-core

TYPO3 CMS Core

3714.0M5.8k](/packages/typo3-cms-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
