Skip to content

Commit 0d98435

Browse files
committed
Issue #44: Adapted for Headless Platform 7
Signed-off-by: alexmerlin <[email protected]>
1 parent 5693dfa commit 0d98435

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1870
-124
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Documentation is available at: https://docs.dotkernel.org/dot-maker/.
99
## Badges
1010

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

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

19-
[![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)
19+
[![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)
2020
[![codecov](https://codecov.io/gh/dotkernel/dot-maker/graph/badge.svg?token=KT9UA402B4)](https://codecov.io/gh/dotkernel/dot-maker)
21-
[![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)
21+
[![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)
2222

2323
## Installation
2424

SECURITY.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,28 @@
22

33
## Supported Versions
44

5-
65
| Version | Supported | PHP Version |
76
|---------|--------------------|-----------------------------------------------------------------------------------------------------------|
8-
| 1.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/1.0.0) |
9-
7+
| 2.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/2.0.0) |
8+
| 1.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/1.1.0) |
109

1110
## Reporting Potential Security Issues
1211

13-
If you have encountered a potential security vulnerability in this project,
14-
please report it to us at <[email protected]>. We will work with you to
15-
verify the vulnerability and patch it.
12+
If you have encountered a potential security vulnerability in this project, please report it to us at <[email protected]>.
13+
We will work with you to verify the vulnerability and patch it.
1614

1715
When reporting issues, please provide the following information:
1816

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

23-
We request that you contact us via the email address above and give the
24-
project contributors a chance to resolve the vulnerability and issue a new
25-
release prior to any public exposure; this helps protect the project's
26-
users, and provides them with a chance to upgrade and/or update in order to
27-
protect their applications.
28-
21+
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;
22+
this helps protect the project's users and provides them with a chance to upgrade and/or update to protect their applications.
2923

3024
## Policy
3125

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

34-
- We will patch the current release branch, as well as the immediate prior minor
35-
release branch.
36-
37-
- After patching the release branches, we will immediately issue new security
38-
fix releases for each patched release branch.
28+
- We will patch the current release branch, as well as the immediate prior minor release branch.
29+
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
"require-dev": {
3434
"laminas/laminas-coding-standard": "^3.1.0",
3535
"mikey179/vfsstream": "^1.6.12",
36-
"phpstan/phpstan": "^2.1.17",
37-
"phpstan/phpstan-phpunit": "^2.0.6",
38-
"phpunit/phpunit": "^10.5.47"
36+
"phpstan/phpstan": "^2.1.33",
37+
"phpstan/phpstan-phpunit": "^2.0.10",
38+
"phpunit/phpunit": "^10.5.60"
3939
},
4040
"scripts": {
4141
"check": [
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Create Collection
2+
3+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#add-dot-maker-to-composerjson).
4+
5+
> Collections can be created only in APIs.
6+
7+
## Run the command
8+
9+
To create a Collection, use either of the following commands:
10+
11+
```shell
12+
composer make collection
13+
```
14+
15+
OR
16+
17+
```shell
18+
./vendor/bin/dot-maker collection
19+
```
20+
21+
## Identify the target module
22+
23+
`dot-maker` needs to know in which module you want to create the new Collection.
24+
To determine this, it will prompt you to enter the name of an existing module:
25+
26+
> Existing module name:
27+
28+
If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown:
29+
30+
> Module "NonExistentModule" not found
31+
32+
and will keep prompting for a valid module name until you provide one.
33+
34+
Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:
35+
36+
> Found Module "ExistingModule"
37+
38+
## Name the Collection
39+
40+
Once the target module has been identified, you will be prompted to input a name for the Collection:
41+
42+
> Collection name:
43+
44+
**The name must contain only letters and numbers.**
45+
46+
> You don't have to append "Collection" to the name.
47+
> It is automatically appended when necessary.
48+
> See our [Naming Standards](../naming-standards.md) page for more information.
49+
50+
If you leave the name blank, the process will exit.
51+
52+
If you input an invalid name (like, "."), an error will be thrown:
53+
54+
> Invalid Collection name: "."
55+
56+
If you input the name of an existing Collection (like, "ExistingCollection"), an error will be thrown:
57+
58+
> Class "ExistingCollection" already exists at /path/to/project/src/ExistingModule/src/Collection/ExistingCollection.php
59+
60+
If you input a valid name (like, "NewCollection"), `dot-maker` will create the Collection and output a success message:
61+
62+
> Created Collection: /path/to/project/src/ExistingModule/src/Collection/NewCollection.php
63+
64+
## Create multiple Collections
65+
66+
To allow the creation of multiple Collections, the process will loop until you leave the name blank.
67+
Each iteration creates a new Collection under the same module.

docs/book/v2/component/command.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Create Command
2+
3+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#add-dot-maker-to-composerjson).
4+
5+
> `dot-maker` will look for a matching ServiceInterface in the module (e.g.: BookServiceInterface — BookCommand).
6+
> If it finds one, it will automatically inject it into the Command.
7+
8+
To create a Command, use either of the following commands:
9+
10+
## Run the command
11+
12+
```shell
13+
composer make command
14+
```
15+
16+
OR
17+
18+
```shell
19+
./vendor/bin/dot-maker command
20+
```
21+
22+
## Identify the target module
23+
24+
`dot-maker` needs to know in which module you want to create the new Command.
25+
To determine this, it will prompt you to enter the name of an existing module:
26+
27+
> Existing module name:
28+
29+
If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown:
30+
31+
> Module "NonExistentModule" not found
32+
33+
and will keep prompting for a valid module name until you provide one.
34+
35+
Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:
36+
37+
> Found Module "ExistingModule"
38+
39+
## Name the Command
40+
41+
Once the target module has been identified, you will be prompted to input a name for the Command:
42+
43+
> Command name:
44+
45+
**The name must contain only letters and numbers.**
46+
47+
> You don't have to append "Command" to the name.
48+
> It is automatically appended when necessary.
49+
> See our [Naming Standards](../naming-standards.md) page for more information.
50+
51+
If you leave the name blank, the process will exit.
52+
53+
If you input an invalid name (like, "."), an error will be thrown:
54+
55+
> Invalid Command name: "."
56+
57+
If you input the name of an existing Command (like, "ExistingCommand"), an error will be thrown:
58+
59+
> Class "ExistingCommand" already exists at /path/to/project/src/ExistingModule/src/Command/ExistingCommand.php
60+
61+
If you input a valid name (like, "NewCommand"), `dot-maker` will create the Command and output a success message:
62+
63+
> Created Command: /path/to/project/src/ExistingModule/src/Command/NewCommand.php
64+
65+
## Create multiple Commands
66+
67+
To allow the creation of multiple Commands, the process will loop until you leave the name blank.
68+
Each iteration creates a new Command under the same module.

docs/book/v2/component/entity.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Create Entity
2+
3+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#add-dot-maker-to-composerjson).
4+
5+
## Run the command
6+
7+
To create an Entity, use either of the following commands:
8+
9+
```shell
10+
composer make entity
11+
```
12+
13+
OR
14+
15+
```shell
16+
./vendor/bin/dot-maker entity
17+
```
18+
19+
## Identify the target module
20+
21+
`dot-maker` needs to know in which module you want to create the new Entity.
22+
To determine this, it will prompt you to enter the name of an existing module:
23+
24+
> Existing module name:
25+
26+
If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown:
27+
28+
> Module "NonExistentModule" not found
29+
30+
and will keep prompting for a valid module name until you provide one.
31+
32+
Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:
33+
34+
> Found Module "ExistingModule"
35+
36+
## Name the Entity
37+
38+
Once the target module has been identified, you will be prompted to input a name for the Entity:
39+
40+
> Entity name:
41+
42+
**The name must contain only letters and numbers.**
43+
44+
> You don't have to append "Entity" to the name.
45+
> It is automatically appended when necessary.
46+
> See our [Naming Standards](../naming-standards.md) page for more information.
47+
48+
If you leave the name blank, the process will exit.
49+
50+
If you input an invalid name (like, "."), an error will be thrown:
51+
52+
> Invalid Entity name: "."
53+
54+
If you input the name of an existing Entity (like, "ExistingEntity"), an error will be thrown:
55+
56+
- for projects compatible with the Core architecture:
57+
58+
> Class "ExistingEntity" already exists at /path/to/project/src/Core/src/ExistingModule/src/Entity/ExistingEntity.php
59+
60+
- for projects which are NOT compatible with the Core architecture:
61+
62+
> Class "ExistingEntity" already exists at /path/to/project/src/ExistingModule/src/Entity/ExistingEntity.php
63+
64+
If you input a valid name (like, "NewEntity"), `dot-maker` will create the Entity and output a success message:
65+
66+
- for projects compatible with the Core architecture:
67+
68+
> Created Entity: /path/to/project/src/Core/src/ExistingModule/src/Entity/NewEntity.php
69+
> Created Repository: /path/to/project/src/Core/src/ExistingModule/src/Repository/NewEntityRepository.php
70+
71+
- for projects which are NOT compatible with the Core architecture:
72+
73+
> Created Entity: /path/to/project/src/ExistingModule/src/Entity/NewEntity.php
74+
> Created Repository: /path/to/project/src/ExistingModule/src/Repository/NewEntityRepository.php
75+
76+
## Create multiple Entities
77+
78+
To allow the creation of multiple Entities, the process will loop until you leave the name blank.
79+
Each iteration creates a new pair of Entity and Repository under the same module.

0 commit comments

Comments
 (0)