Skip to content

Commit

Permalink
Merge pull request #615 from eerison/bug/remove-entity-data
Browse files Browse the repository at this point in the history
Bug/Remove entity data
  • Loading branch information
eerison authored Jun 15, 2022
2 parents 4efb424 + e784db4 commit 5d47be7
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"@db:migration:apply"
],
"lint": [
"@lint:phpstan",
"@lint:ecs",
"@lint:rector",
"@lint:twig",
Expand Down
1 change: 0 additions & 1 deletion config/packages/prod/monolog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ monolog:
type: fingers_crossed
action_level: error
handler: sentry
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
sentry:
type: service
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ parameters:
level: 1
paths:
- src
ignoreErrors:
- "#has an uninitialized readonly property \\$id. Assign it in the constructor.#"
2 changes: 1 addition & 1 deletion src/Controller/Profile/CertificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function editAction(Request $request, Certification $certification): Resp
*
* @IsGranted("ROLE_USER", subject="certification")
*/
#[Route(path: '/{id}', name: 'delete', methods: ['DELETE'])]
#[Route(path: '/{id}/del', name: 'delete', methods: ['POST'])]
public function deleteAction(Request $request, Certification $certification): Response
{
return $this->delete($request, $certification);
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Profile/EducationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function editAction(Request $request, Education $education): Response
*
* @Security("user == education.getUser()")
*/
#[Route(path: '/{id}', name: 'delete', methods: ['DELETE'])]
#[Route(path: '/{id}/del', name: 'delete', methods: ['POST'])]
public function deleteAction(Request $request, Education $education): Response
{
return $this->delete($request, $education);
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Profile/ExperienceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function editAction(Request $request, Experience $experience): Response
/**
* @Security("user == experience.getUser()")
*/
#[Route(path: '/{id}', name: 'delete', methods: ['DELETE'])]
#[Route(path: '/{id}/del', name: 'delete', methods: ['POST'])]
public function deleteAction(Request $request, Experience $experience): Response
{
if ($this->isCsrfTokenValid('delete' . $experience->getId(), $request->request->get('_token'))) {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Profile/SkillController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function editAction(Request $request, Skill $skill): Response
/**
* @Security("user == skill.getUser()")
*/
#[Route(path: '/{id}', name: 'delete', methods: ['DELETE'])]
#[Route(path: '/{id}/del', name: 'delete', methods: ['POST'])]
public function deleteAction(Request $request, Skill $skill): Response
{
if ($this->isCsrfTokenValid('delete' . $skill->getId(), $request->request->get('_token'))) {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Profile/UserLanguageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function edit(Request $request, UserLanguage $userLanguage): Response
/**
* @IsGranted("ROLE_USER", subject="userLanguage")
*/
#[Route(path: '/{id}', name: 'delete', methods: ['DELETE'])]
#[Route(path: '/{id}/del', name: 'delete', methods: ['POST'])]
public function delete(Request $request, UserLanguage $userLanguage): Response
{
if ($this->isCsrfTokenValid('delete' . $userLanguage->getId(), $request->request->get('_token'))) {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Profile/UserSocialNetworkingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function editAction(Request $request, UserUserSocialNetworking $userSocia
*
* @Security("user == userSocialNetworking.getUser()")
*/
#[Route(path: '/{id}', name: 'delete', methods: ['DELETE'])]
#[Route(path: '/{id}/del', name: 'delete', methods: ['POST'])]
public function deleteAction(Request $request, UserUserSocialNetworking $userSocialNetworking): Response
{
if ($this->isCsrfTokenValid('delete' . $userSocialNetworking->getId(), $request->request->get('_token'))) {
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Certification.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Certification implements EntityInterface, HasUserInterface, CertificationI
#[ORM\Column(name: 'id', type: Types::INTEGER)]
#[ORM\Id]
#[ORM\GeneratedValue]
private readonly int $id;
private int $id;

#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'certifications')]
#[ORM\JoinColumn(name: 'user_id')]
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Skill.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Skill implements SkillInterface
#[ORM\Column(name: 'id', type: Types::INTEGER)]
#[ORM\Id]
#[ORM\GeneratedValue]
private readonly int $id;
private int $id;

#[ORM\ManyToOne(targetEntity: 'User', inversedBy: 'skills')]
#[ORM\JoinColumn(name: 'user_id')]
Expand Down

0 comments on commit 5d47be7

Please sign in to comment.