Download the PHP package stateforge/scenario-core without Composer

On this page you can find all versions of the php package stateforge/scenario-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scenario-core

CI PHPStan Stability Latest Version PHP Version License


Scenario Core

Scenario Core is a declarative, attribute-driven framework for reproducible data states in PHP. It replaces manual test setup and fixture orchestration with structured, metadata-based scenario execution.

Requirements

Scenario Core requires the following:

Installation

This package is intended for test and development use only.

Install it via Composer as a development dependency.

PHPUnit Integration

It integrates seamlessly with PHPUnit-based test suites and console tooling. To enable scenario processing in your test suite, register the PHPUnit extension in your phpunit.xml:

The extension integrates with the PHPUnit lifecycle and ensures that all scenario-related attributes are processed before test execution.

Defining a Scenario

A scenario represents a reproducible application data state. Scenarios:

No manual registry interaction is required.

Applying a Scenario in a Unit Test

Scenarios can be applied declaratively using the attribute:

Multiple scenarios may be applied at class or method level. A scenario class can apply other scenarios.

Example Use Case

Resetting the Database

Use the attribute to reset the database before scenario execution:

This ensures clean and deterministic test state. This can be applied on class or method level and on Unit Tests or Scenario Classes.

The #[RefreshDatabase] attribute triggers a database reset hook. Scenario Core itself does not implement database logic, as it remains framework-agnostic. Instead, a custom PHP file can be configured to perform the reset according to your application's infrastructure.

Console Usage

Scenarios can also be executed directly from the console:

This allows:

Get all available CLI Commands:

Framework Integration

Scenario Core is framework-agnostic and can be integrated into any PHP application.

It works particularly well with:

Framework-specific integration layers may be provided separately.

Next Steps


All versions of scenario-core with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-dom Version *
phpunit/phpunit Version ^11.5.50 || ^12.5.22 || ^13.1.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stateforge/scenario-core contains the following files

Loading the files please wait ...