Add missing .md files. Author entity updated with github#21
Add missing .md files. Author entity updated with github#21OStefan2001 wants to merge 3 commits into
Conversation
…ent. New layout to 404 twig
alexmerlin
left a comment
There was a problem hiding this comment.
You did not comit the new migration file.
|
|
||
| #[ORM\Column(name: 'email', type: 'text', unique: true)] | ||
| private string $email; | ||
| #[ORM\Column(name: 'github', type: 'text', unique: true, nullable: true)] |
There was a problem hiding this comment.
| #[ORM\Column(name: 'github', type: 'text', unique: true, nullable: true)] | |
| #[ORM\Column(name: 'github', type: 'string', length: 191, unique: true, nullable: true)] |
https://github.com/orgs/community/discussions/133913#discussioncomment-10178406
The max length seems to be 39 characters for a GitHub username - but we can go above that, just in case...
But, text is defintely too much for this.
| * postDate: string, | ||
| * category: array{id: non-empty-string, name: string, slug: string}, | ||
| * author: array{id: non-empty-string, name: string, slug: string, bio: string|null} | ||
| * author: array{id: non-empty-string, name: string, slug: string, github: string|null} |
There was a problem hiding this comment.
To avoid such duplications, you can create a PHPStan type and the include it wherever you need it.
Example:
- define type: https://github.com/dotkernel/admin/blob/7.0/src/Core/src/App/src/Entity/RoleInterface.php
- import type: https://github.com/dotkernel/admin/blob/7.0/src/Core/src/Admin/src/Entity/Admin.php#L24
- use type: https://github.com/dotkernel/admin/blob/7.0/src/Core/src/Admin/src/Entity/Admin.php#L231
This way, if you need to change a property in an entity, you will need to update only the type.
There was a problem hiding this comment.
Missing empty line at the end of the file.
Rule
All files that contain code must end with an empty line.
Exception: auto-generated files (example: public/js/app.js).
| </svg> | ||
| </span> | ||
| <a href="mailto:{{ author.email }}">{{ author.email }}</a> | ||
| {% if author.github and author.github is not null %} |
There was a problem hiding this comment.
| {% if author.github and author.github is not null %} | |
| {% if author.github %} |
This should suffice.
As long as author.github is truthy, the logic inside the if statement will be executed.
No description provided.