Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ Documentation is available at: https://docs.dotkernel.org/dot-maker/.
## Badges

![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-maker)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/1.1.0)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/2.0.0)

[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/issues)
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/network)
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/stargazers)
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/blob/1.0/LICENSE)
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/blob/2.0/LICENSE)

[![Build Static](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml)
[![Build Static](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml/badge.svg?branch=2.0)](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/dot-maker/graph/badge.svg?token=KT9UA402B4)](https://codecov.io/gh/dotkernel/dot-maker)
[![PHPStan](https://github.com/dotkernel/dot-maker/actions/workflows/static-analysis.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-maker/actions/workflows/static-analysis.yml)
[![PHPStan](https://github.com/dotkernel/dot-maker/actions/workflows/static-analysis.yml/badge.svg?branch=2.0)](https://github.com/dotkernel/dot-maker/actions/workflows/static-analysis.yml)

## Installation

Expand Down
25 changes: 8 additions & 17 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,28 @@

## Supported Versions


| Version | Supported | PHP Version |
|---------|--------------------|-----------------------------------------------------------------------------------------------------------|
| 1.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/1.0.0) |

| 2.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/2.0.0) |
| 1.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/1.1.0) |

## Reporting Potential Security Issues

If you have encountered a potential security vulnerability in this project,
please report it to us at <security@dotkernel.com>. We will work with you to
verify the vulnerability and patch it.
If you have encountered a potential security vulnerability in this project, please report it to us at <security@dotkernel.com>.
We will work with you to verify the vulnerability and patch it.

When reporting issues, please provide the following information:

- Component(s) affected
- A description indicating how to reproduce the issue
- A summary of the security vulnerability and impact

We request that you contact us via the email address above and give the
project contributors a chance to resolve the vulnerability and issue a new
release prior to any public exposure; this helps protect the project's
users, and provides them with a chance to upgrade and/or update in order to
protect their applications.

We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure;
this helps protect the project's users and provides them with a chance to upgrade and/or update to protect their applications.

## Policy

If we verify a reported security vulnerability, our policy is:

- We will patch the current release branch, as well as the immediate prior minor
release branch.

- After patching the release branches, we will immediately issue new security
fix releases for each patched release branch.
- We will patch the current release branch, as well as the immediate prior minor release branch.
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"require-dev": {
"laminas/laminas-coding-standard": "^3.1.0",
"mikey179/vfsstream": "^1.6.12",
"phpstan/phpstan": "^2.1.17",
"phpstan/phpstan-phpunit": "^2.0.6",
"phpunit/phpunit": "^10.5.47"
"phpstan/phpstan": "^2.1.33",
"phpstan/phpstan-phpunit": "^2.0.10",
"phpunit/phpunit": "^10.5.60"
},
"scripts": {
"check": [
Expand Down
67 changes: 67 additions & 0 deletions docs/book/v2/component/collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Create Collection

> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#add-dot-maker-to-composerjson).

> Collections can be created only in APIs.

## Run the command

To create a Collection, use either of the following commands:

```shell
composer make collection
```

OR

```shell
./vendor/bin/dot-maker collection
```

## Identify the target module

`dot-maker` needs to know in which module you want to create the new Collection.
To determine this, it will prompt you to enter the name of an existing module:

> Existing module name:

If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown:

> Module "NonExistentModule" not found

and will keep prompting for a valid module name until you provide one.

Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:

> Found Module "ExistingModule"

## Name the Collection

Once the target module has been identified, you will be prompted to input a name for the Collection:

> Collection name:

**The name must contain only letters and numbers.**

> You don't have to append "Collection" to the name.
> It is automatically appended when necessary.
> See our [Naming Standards](../naming-standards.md) page for more information.

If you leave the name blank, the process will exit.

If you input an invalid name (like, "."), an error will be thrown:

> Invalid Collection name: "."

If you input the name of an existing Collection (like, "ExistingCollection"), an error will be thrown:

> Class "ExistingCollection" already exists at /path/to/project/src/ExistingModule/src/Collection/ExistingCollection.php

If you input a valid name (like, "NewCollection"), `dot-maker` will create the Collection and output a success message:

> Created Collection: /path/to/project/src/ExistingModule/src/Collection/NewCollection.php

## Create multiple Collections

To allow the creation of multiple Collections, the process will loop until you leave the name blank.
Each iteration creates a new Collection under the same module.
68 changes: 68 additions & 0 deletions docs/book/v2/component/command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Create Command

> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#add-dot-maker-to-composerjson).

> `dot-maker` will look for a matching ServiceInterface in the module (e.g.: BookServiceInterface — BookCommand).
> If it finds one, it will automatically inject it into the Command.

To create a Command, use either of the following commands:

## Run the command

```shell
composer make command
```

OR

```shell
./vendor/bin/dot-maker command
```

## Identify the target module

`dot-maker` needs to know in which module you want to create the new Command.
To determine this, it will prompt you to enter the name of an existing module:

> Existing module name:

If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown:

> Module "NonExistentModule" not found

and will keep prompting for a valid module name until you provide one.

Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:

> Found Module "ExistingModule"

## Name the Command

Once the target module has been identified, you will be prompted to input a name for the Command:

> Command name:

**The name must contain only letters and numbers.**

> You don't have to append "Command" to the name.
> It is automatically appended when necessary.
> See our [Naming Standards](../naming-standards.md) page for more information.

If you leave the name blank, the process will exit.

If you input an invalid name (like, "."), an error will be thrown:

> Invalid Command name: "."

If you input the name of an existing Command (like, "ExistingCommand"), an error will be thrown:

> Class "ExistingCommand" already exists at /path/to/project/src/ExistingModule/src/Command/ExistingCommand.php

If you input a valid name (like, "NewCommand"), `dot-maker` will create the Command and output a success message:

> Created Command: /path/to/project/src/ExistingModule/src/Command/NewCommand.php

## Create multiple Commands

To allow the creation of multiple Commands, the process will loop until you leave the name blank.
Each iteration creates a new Command under the same module.
79 changes: 79 additions & 0 deletions docs/book/v2/component/entity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Create Entity

> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#add-dot-maker-to-composerjson).

## Run the command

To create an Entity, use either of the following commands:

```shell
composer make entity
```

OR

```shell
./vendor/bin/dot-maker entity
```

## Identify the target module

`dot-maker` needs to know in which module you want to create the new Entity.
To determine this, it will prompt you to enter the name of an existing module:

> Existing module name:

If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown:

> Module "NonExistentModule" not found

and will keep prompting for a valid module name until you provide one.

Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:

> Found Module "ExistingModule"

## Name the Entity

Once the target module has been identified, you will be prompted to input a name for the Entity:

> Entity name:

**The name must contain only letters and numbers.**

> You don't have to append "Entity" to the name.
> It is automatically appended when necessary.
> See our [Naming Standards](../naming-standards.md) page for more information.

If you leave the name blank, the process will exit.

If you input an invalid name (like, "."), an error will be thrown:

> Invalid Entity name: "."

If you input the name of an existing Entity (like, "ExistingEntity"), an error will be thrown:

- for projects compatible with the Core architecture:

> Class "ExistingEntity" already exists at /path/to/project/src/Core/src/ExistingModule/src/Entity/ExistingEntity.php

- for projects which are NOT compatible with the Core architecture:

> Class "ExistingEntity" already exists at /path/to/project/src/ExistingModule/src/Entity/ExistingEntity.php

If you input a valid name (like, "NewEntity"), `dot-maker` will create the Entity and output a success message:

- for projects compatible with the Core architecture:

> Created Entity: /path/to/project/src/Core/src/ExistingModule/src/Entity/NewEntity.php
> Created Repository: /path/to/project/src/Core/src/ExistingModule/src/Repository/NewEntityRepository.php

- for projects which are NOT compatible with the Core architecture:

> Created Entity: /path/to/project/src/ExistingModule/src/Entity/NewEntity.php
> Created Repository: /path/to/project/src/ExistingModule/src/Repository/NewEntityRepository.php

## Create multiple Entities

To allow the creation of multiple Entities, the process will loop until you leave the name blank.
Each iteration creates a new pair of Entity and Repository under the same module.
Loading