Download the PHP package php-collective/symfony-dto without Composer

On this page you can find all versions of the php package php-collective/symfony-dto. 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 symfony-dto

Symfony DTO Bundle

Symfony bundle integration for php-collective/dto.

Installation

The bundle will be auto-configured if you're using Symfony Flex.

Manual Registration

If not using Flex, add to config/bundles.php:

Configuration

Create config/packages/php_collective_dto.yaml:

Usage

1. Initialize DTO configuration

This creates a config/dto.php file with a sample DTO definition (PHP format is the default). You can also use --format=xml or --format=yaml.

The generated config looks like:

2. Generate DTOs

Options:

3. Generate TypeScript interfaces

4. Generate JSON Schema

5. Use your DTOs

DTO Mapping Helpers

JSON Response Helper

Controller DTO Resolution

When enable_value_resolver is enabled, you can use #[MapRequestDto] to map request data to DTOs:

The source option controls where data comes from: body, query, request, or auto.

Collections

The bundle automatically registers Doctrine's ArrayCollection for DTO collection fields. Define collection fields with the [] suffix:

After generating, collection fields use Doctrine's ArrayCollection class with its methods (filter, map, first, etc.).

Validation Bridge

Automatically convert DTO validation rules to Symfony Validator constraints:

See Usage docs for details.

AutoMapper Bridge

For automatic entity-to-DTO mapping without manual field assignment, install the optional AutoMapper integration:

Then use DtoAutoMapperInterface in your services:

See Usage docs for full documentation including bidirectional mapping.

Supported Config Formats

The bundle supports multiple config file formats:

License

MIT


All versions of symfony-dto with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
doctrine/collections Version ^2.0
php-collective/dto Version ^0.1.12
symfony/console Version ^7.0|^8.0
symfony/framework-bundle Version ^7.0|^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 php-collective/symfony-dto contains the following files

Loading the files please wait ...