Your project must not use PHP super globals

More information: https://insight.symfony.com/what-we-analyse/symfony.use_super_globals

  1. public function __invoke(SendContactEmail $message): void
  2. {
  3. $email = (new Email())
  4. ->from($message->getEmail())
  5. ->to($_ENV['EMAIL_TO'])
    $_ENV super global should not be used.
    Last edited by Luigi Gandemer
  6. ->subject("Portfolio contact from {$message->getName()}")
  7. ->html("
  8. <h2>New contact from your portfolio</h2>
  9. <p><strong>Name:</strong> {$message->getName()}</p>
  10. <p><strong>Email:</strong> {$message->getEmail()}</p>

Your project files must be encoded in UTF-8

More information: https://insight.symfony.com/what-we-analyse/web.non_utf8_encoding

This file uses utf-16le text encoding. Prefer UTF-8 to avoid cross-encoding issues.
Time to fix: about 30 minutes
Read doc Open Issue Permalink Copy Prompt
Last edited by Luigi Gandemer

Your project must provide a favicon in its public directory

More information: https://insight.symfony.com/what-we-analyse/web.missing_favicon

in public
No favicon found in the web root directory
Last edited by Luigi Gandemer
  • public
    • images
    • index.php
    • robots.txt
    • site.webmanifest

Your project error pages must be customised 2

More information: https://insight.symfony.com/what-we-analyse/symfony.configuration.error_pages_should_be_customised

You should customize the 500 error page.
Time to fix: about 4 hours
Read doc Open Issue Permalink Copy Prompt
Collective
You should customize the 404 error page.
Time to fix: about 4 hours
Read doc Open Issue Permalink Copy Prompt
Collective

Your project must not contain invalid function or method calls 11

More information: https://insight.symfony.com/what-we-analyse/php.invalid_call

  1. public function __invoke(SendContactEmail $message): void
  2. {
  3. $email = (new Email())
  4. ->from($message->getEmail())
  5. ->to($_ENV['EMAIL_TO'])
    Parameter #1 ...$addresses of method Symfony\Component\Mime\Email::to() expects string|Symfony\Component\Mime\Address, mixed given.
    Last edited by Luigi Gandemer
  6. ->subject("Portfolio contact from {$message->getName()}")
  7. ->html("
  8. <h2>New contact from your portfolio</h2>
  9. <p><strong>Name:</strong> {$message->getName()}</p>
  10. <p><strong>Email:</strong> {$message->getEmail()}</p>
  1. $this->mailer->send($email);
  2. $contact = $this->contactRepository->find($message->getContactId());
  3. if ($contact) {
  4. $contact->setStatus('sent');
    Call to an undefined method object::setStatus().
    Last edited by Luigi Gandemer
  5. $this->entityManager->flush();
  6. }
  7. }
  8. }
  1. $username = $input->getArgument('username');
  2. $password = $input->getArgument('password');
  3. $user = new User();
  4. $user->setUsername($username);
    Parameter #1 $username of method App\Entity\User::setUsername() expects string, mixed given.
    Last edited by Luigi Gandemer
  5. $user->setRoles(['ROLE_ADMIN']);
  6. $user->setPassword(
  7. $this->passwordHasher->hashPassword($user, $password)
  8. );
  1. $user = new User();
  2. $user->setUsername($username);
  3. $user->setRoles(['ROLE_ADMIN']);
  4. $user->setPassword(
  5. $this->passwordHasher->hashPassword($user, $password)
    Parameter #2 $plainPassword of method Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::hashPassword() expects string, mixed given.
    Last edited by Luigi Gandemer
  6. );
  7. $this->entityManager->persist($user);
  8. $this->entityManager->flush();
  1. $files = [$files];
  2. }
  3. $uploaded = [];
  4. foreach ($files as $file) {
  5. $image = $imageUploadService->upload($file);
    Parameter #1 $file of method App\Service\ImageUploadService::upload() expects Symfony\Component\HttpFoundation\File\UploadedFile, mixed given.
    Last edited by Luigi Gandemer
  6. $uploaded[] = [
  7. 'id' => $image->getId(),
  8. 'filename' => $image->getFilename(),
  9. 'url' => $request->getSchemeAndHttpHost() . '/images/' . $image->getFilename(),
  10. 'uploaded_at' => $image->getUploadedAt()->format('Y-m-d H:i:s'),
  1. return;
  2. }
  3. $contact = $this->contactRepository->find($message->getContactId());
  4. if ($contact) {
  5. $contact->setStatus('failed');
    Call to an undefined method object::setStatus().
    Last edited by Luigi Gandemer
  6. $this->entityManager->flush();
  7. }
  8. }
  9. }
  1. default => throw new BadRequestHttpException('Unsupported image type.'),
  2. };
  3. // Preserve transparency for PNG and GIF
  4. if (in_array($mime, ['image/png', 'image/gif'])) {
  5. imagepalettetotruecolor($source);
    Parameter #1 $image of function imagepalettetotruecolor expects GdImage, GdImage|false given.
    Last edited by Luigi Gandemer
  6. imagealphablending($source, true);
  7. imagesavealpha($source, true);
  8. }
  9. imagewebp($source, $outputPath, 85);
  1. };
  2. // Preserve transparency for PNG and GIF
  3. if (in_array($mime, ['image/png', 'image/gif'])) {
  4. imagepalettetotruecolor($source);
  5. imagealphablending($source, true);
    Parameter #1 $image of function imagealphablending expects GdImage, GdImage|false given.
    Last edited by Luigi Gandemer
  6. imagesavealpha($source, true);
  7. }
  8. imagewebp($source, $outputPath, 85);
  9. imagedestroy($source);
  1. // Preserve transparency for PNG and GIF
  2. if (in_array($mime, ['image/png', 'image/gif'])) {
  3. imagepalettetotruecolor($source);
  4. imagealphablending($source, true);
  5. imagesavealpha($source, true);
    Parameter #1 $image of function imagesavealpha expects GdImage, GdImage|false given.
    Last edited by Luigi Gandemer
  6. }
  7. imagewebp($source, $outputPath, 85);
  8. imagedestroy($source);
  9. }
  1. imagepalettetotruecolor($source);
  2. imagealphablending($source, true);
  3. imagesavealpha($source, true);
  4. }
  5. imagewebp($source, $outputPath, 85);
    Parameter #1 $image of function imagewebp expects GdImage, GdImage|false given.
    Last edited by Luigi Gandemer
  6. imagedestroy($source);
  7. }
  8. }
  1. imagealphablending($source, true);
  2. imagesavealpha($source, true);
  3. }
  4. imagewebp($source, $outputPath, 85);
  5. imagedestroy($source);
    Parameter #1 $image of function imagedestroy expects GdImage, GdImage|false given.
    Last edited by Luigi Gandemer
  6. }
  7. }

Your project must not contain invalid instantiations 5

More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation

in public/index.php, line 8
  1. use App\Kernel;
  2. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  3. return function (array $context) {
  4. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
    Parameter #1 $environment of class App\Kernel constructor expects string, mixed given.
    Last edited by Luigi Gandemer
  5. };
  1. $this->entityManager->persist($data);
  2. $this->entityManager->flush();
  3. $this->bus->dispatch(new SendContactEmail(
  4. $data->getName(),
    Parameter #1 $name of class App\Message\SendContactEmail constructor expects string, string|null given.
    Last edited by Luigi Gandemer
  5. $data->getEmail(),
  6. $data->getMessage(),
  7. $data->getId(),
  8. ));
  1. $this->entityManager->persist($data);
  2. $this->entityManager->flush();
  3. $this->bus->dispatch(new SendContactEmail(
  4. $data->getName(),
  5. $data->getEmail(),
    Parameter #2 $email of class App\Message\SendContactEmail constructor expects string, string|null given.
    Last edited by Luigi Gandemer
  6. $data->getMessage(),
  7. $data->getId(),
  8. ));
  9. return $data;
  1. $this->entityManager->flush();
  2. $this->bus->dispatch(new SendContactEmail(
  3. $data->getName(),
  4. $data->getEmail(),
  5. $data->getMessage(),
    Parameter #3 $message of class App\Message\SendContactEmail constructor expects string, string|null given.
    Last edited by Luigi Gandemer
  6. $data->getId(),
  7. ));
  8. return $data;
  9. }
  1. $this->bus->dispatch(new SendContactEmail(
  2. $data->getName(),
  3. $data->getEmail(),
  4. $data->getMessage(),
  5. $data->getId(),
    Parameter #4 $contactId of class App\Message\SendContactEmail constructor expects int, int|null given.
    Last edited by Luigi Gandemer
  6. ));
  7. return $data;
  8. }
  9. }

Your project should use return types 2

More information: https://insight.symfony.com/what-we-analyse/php.missing_return_typehint

  1. {
  2. $this->companyName = $companyName;
  3. return $this;
  4. }
  5. public function getTasks(): Collection { return $this->tasks; }
    Method App\Entity\Experience::getTasks() return type with generic interface Doctrine\Common\Collections\Collection does not specify its types: TKey, T
    Last edited by Luigi Gandemer
  6. public function addTask(Task $task): static
  7. {
  8. if (!$this->tasks->contains($task)) {
  9. $this->tasks->add($task);
in src/Entity/Project.php, line 102
  1. {
  2. $this->image = $image;
  3. return $this;
  4. }
  5. public function getTechnologies(): Collection { return $this->technologies; }
    Method App\Entity\Project::getTechnologies() return type with generic interface Doctrine\Common\Collections\Collection does not specify its types: TKey, T
    Last edited by Luigi Gandemer
  6. public function addTechnology(Technology $technology): static
  7. {
  8. if (!$this->technologies->contains($technology)) {
  9. $this->technologies->add($technology);

Text files should end with a valid new line character.

More information: https://insight.symfony.com/what-we-analyse/missing_e_o_l

in README.md, line 14
  1. | API | http://localhost:8080 |
  2. | LiteSpeed Admin | http://localhost:7080 |
  3. | RabbitMQ UI | http://localhost:15672 |
  4. | Mailhog UI | http://localhost:8025 |
  5. | phpMyAdmin | http://localhost:8081 |
  6. This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.
    Time to fix: about 15 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by Luigi Gandemer