Download the PHP package stixx/openapi-command-bundle without Composer

On this page you can find all versions of the php package stixx/openapi-command-bundle. 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 openapi-command-bundle

OpenAPI Command Bundle

Latest Version on Packagist Total Downloads License

The OpenAPI Command Bundle is a Symfony bundle that allows you to build HTTP APIs around Command Bus messages (DTOs) without the need for manual controller creation or Symfony #[Route] attributes on your commands.

By using standard OpenAPI operation attributes (from zircote/swagger-php) directly on your command DTOs, this bundle automatically generates Symfony routes and handles the entire request-to-command lifecycle: deserialization, validation, dispatching to the messenger bus, and responding.

Key Features

Installation

1. Install via Composer

2. Enable the Bundle

If you are using Symfony Flex, the bundle will be automatically enabled. Otherwise, add it to your config/bundles.php:

Usage

1. Create a Command DTO

Annotate your command with OpenAPI attributes. No Symfony #[Route] is needed.

2. Create a Message Handler

Implement a standard Symfony Messenger handler for your command.

3. Call the API

The bundle automatically registers the route /api/projects (POST).

The bundle will:

  1. Detect the route and map it to CreateProjectCommand.
  2. Deserialize the JSON body into the command object.
  3. Validate the command using Symfony Validator.
  4. Dispatch the command to the Messenger bus.
  5. Return the handler's result as a JSON response with an appropriate status code (e.g., 201 Created).

Configuration

You can customize the bundle's behavior in config/packages/stixx_openapi_command.yaml:

Documentation

For more detailed information, please refer to the following documentation:

Stability & supported API

The bundle distinguishes a small public API surface from its internal implementation. Public surface is the contract you can safely depend on; internals can change in any release.

Public (@api) — guaranteed BC across minor releases:

Type What it is
Stixx\OpenApiCommandBundle\StixxOpenApiCommandBundle Bundle entry point
Stixx\OpenApiCommandBundle\Attribute\CommandObject Marker attribute for command arguments
Stixx\OpenApiCommandBundle\Exception\ApiProblemException Throw this from your code to express RFC 7807 problems
Stixx\OpenApiCommandBundle\Exception\ExceptionToApiProblemTransformerInterface Replace to customize how exceptions become problem responses
Stixx\OpenApiCommandBundle\Responder\ResponderInterface Implement to handle custom result shapes (CSV, XML, …)
Stixx\OpenApiCommandBundle\Response\StatusResolverInterface Replace to customize status code resolution
Stixx\OpenApiCommandBundle\Validator\ValidatorInterface Implement to add custom request-level validation
Stixx\OpenApiCommandBundle\Model\ProblemDetails OpenAPI schema model — reference from your annotations
Stixx\OpenApiCommandBundle\Model\ProblemDetailsInvalidRequestBody OpenAPI schema model — reference from your annotations
Stixx\OpenApiCommandBundle\Model\Violation OpenAPI schema model — reference from your annotations

Internal (@internal) — everything else, including default implementations like JsonResponder, DefaultExceptionToApiProblemTransformer, RequestValidator, the controllers, DI extension, compiler passes, route loaders, and event subscribers. Do not extend or rely on these directly; replace them through the @api interfaces above.

The bundle's configuration schema (the keys under stixx_openapi_command:) is also part of the supported API.

See Extension Points for a worked example of each extension interface.

Requirements

License

This bundle is released under the MIT License.


All versions of openapi-command-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-json Version *
league/openapi-psr7-validator Version ^0.22.0
nelmio/api-doc-bundle Version ^5.8
nyholm/psr7 Version ^1.8
symfony/dependency-injection Version ^7.3 || ^8.0
symfony/framework-bundle Version ^7.3 || ^8.0
symfony/messenger Version ^7.3 || ^8.0
symfony/property-access Version ^7.3 || ^8.0
symfony/psr-http-message-bridge Version ^7.3 || ^8.0
symfony/serializer Version ^7.3 || ^8.0
symfony/validator Version ^7.3 || ^8.0
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 stixx/openapi-command-bundle contains the following files

Loading the files please wait ...