sandstorm/neos-init-e2e-tests-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sandstorm/neos-init-e2e-tests-plugin

Composer 安装命令:

composer require sandstorm/neos-init-e2e-tests-plugin

包简介

A Composer plugin that scaffolds end-to-end (E2E) test infrastructure for Neos CMS packages.

README 文档

README

A Composer plugin that scaffolds end-to-end (E2E) test infrastructure for Neos CMS packages. Run one command and get a fully wired Playwright BDD test suite with Docker-based Neos environments for both Neos 8 and Neos 9.

What it does

When you run composer e2e:init inside a Neos package, the plugin copies a ready-to-use test scaffold into your project. The scaffold includes:

  • A Playwright + BDD test suite (TypeScript, Gherkin feature files)
  • Dockerised system-under-test (SUT) configurations for Neos 8 and Neos 9
  • A Makefile with shortcuts for setup, running tests, and managing containers
  • A GitHub Actions workflow for CI

Prerequisites

  • PHP >= 8.2
  • Composer >= 2.0
  • Docker (for the system-under-test containers)
  • Node.js >= 24 / nvm (for running Playwright tests)

Installation

Add the plugin to your package's dev dependencies:

composer require --dev sandstorm/neos-init-e2e-tests-plugin

Usage

Inside the root of your Neos package, run:

composer e2e:init

Without Composer (bash bootstrap)

If you don't want to add a dev dependency just for the one-shot scaffold, run the bundled bash script instead. It downloads the template directly from GitHub and applies the same logic. From the root of your Neos package:

curl -fsSL https://raw.githubusercontent.com/sandstorm/Sandstorm.NeosInitE2ETestsPlugin/main/init-e2e-tests.sh | bash

To pin a specific ref, set E2E_REF:

E2E_REF=v1.2.3 curl -fsSL https://raw.githubusercontent.com/sandstorm/Sandstorm.NeosInitE2ETestsPlugin/main/init-e2e-tests.sh | bash

Requires curl, tar, jq, and sed in PATH.

The plugin reads your composer.json to determine the package name and derives the Neos package key automatically (e.g. vendor/my-packageVendor.MyPackage). It then copies the template into your project, substituting those values wherever needed.

The operation is non-destructive — existing files are never overwritten. Pass -v to see which files are skipped:

composer e2e:init -v

Overriding the package key

If the derived package key doesn't match your Neos package, set it explicitly in your composer.json:

{
    "extra": {
        "neos": {
            "package-key": "Vendor.MyPackage"
        }
    }
}

Template variables

The following placeholders are replaced in all copied files:

Placeholder Example value Source
{{PackageName}} vendor/my-package name field in composer.json
{{PackageKey}} Vendor.MyPackage derived from {{PackageName}}, or extra.neos.package-key

Scaffolded structure

Tests/
├── Makefile                         # Developer shortcuts
├── README.md                        # How to run and write tests
├── E2E/                             # Playwright BDD test suite
│   ├── features/                    # Gherkin feature files
│   ├── steps/                       # TypeScript step implementations
│   ├── helpers/                     # Page objects and system utilities
│   ├── playwright.config.ts
│   └── package.json
└── system_under_test/               # Docker environments
    ├── Dockerfile
    ├── sut-base-docker-compose.yaml # Shared compose base
    ├── neos8/                       # Neos 8 + PHP 8.2 + MariaDB 10.11
    ├── neos9/                       # Neos 9 + PHP 8.5 + MariaDB 11.4
    └── sut_file_system_overrides/   # Neos/PHP/web server config

.github/
└── workflows/
    └── e2e.yml                      # GitHub Actions CI workflow

See Tests/README.md (created in your project) for instructions on running tests and writing new ones.

How the SUT works

Each Docker environment starts a full Neos stack (FrankenPHP web server, MariaDB, Redis). On startup the container:

  1. Registers your local package as a Composer path repository
  2. Requires it at @dev
  3. Runs database migrations
  4. Imports the Neos demo site
  5. Publishes static resources
  6. Starts the web server on port 8081

Playwright's webServer configuration starts the containers automatically before each test run and the global teardown stops them afterwards.

Development

Clone the repo and install dependencies:

composer install

The plugin source lives in src/ and the template that gets copied into projects lives in template/.

sandstorm/neos-init-e2e-tests-plugin 适用场景与选型建议

sandstorm/neos-init-e2e-tests-plugin 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sandstorm/neos-init-e2e-tests-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sandstorm/neos-init-e2e-tests-plugin 我们能提供哪些服务?
定制开发 / 二次开发

基于 sandstorm/neos-init-e2e-tests-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 30
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Shell

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-31