PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, December 31, 2021

[FIXED] Composer problem install verify-email-bundle Symfony 5.2

 December 31, 2021     composer-php, php, symfony     No comments   

Issue

i cant add bundle, and i need for confirmation email register use

composer require symfonycasts/verify-email-bundle

  Problem 1
    - doctrine/doctrine-migrations-bundle is locked to version 3.0.1 and an update of this package was not requested.
    - doctrine/doctrine-migrations-bundle 3.0.1 requires php ^7.2 -> your php version (8.0.0) does not satisfy that requirement.
  Problem 2
    - doctrine/orm is locked to version 2.7.4 and an update of this package was not requested.
    - doctrine/orm 2.7.4 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
  Problem 3
    - doctrine/orm 2.7.4 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
    - doctrine/doctrine-fixtures-bundle 3.4.0 requires doctrine/orm ^2.6.0 -> satisfiable by doctrine/orm[2.7.4].
    - doctrine/doctrine-fixtures-bundle is locked to version 3.4.0 and an update of this package was not requested.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.
PS C:\Projecto\Symfony\Symfony5\xxx>

Exception:

Cannot autowire service "App\Security\EmailVerifier": argument "$helper" of method "__construct()" has type "SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelperInterface" but this class was not found.

App\Security\EmailVerifier.php

namespace App\Security;

use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface;
use SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelperInterface;

class EmailVerifier
{
    private $verifyEmailHelper;
    private $mailer;
    private $entityManager;

public function __construct(VerifyEmailHelperInterface $helper, MailerInterface $mailer, EntityManagerInterface $manager)
{
    $this->verifyEmailHelper = $helper;
    $this->mailer = $mailer;
    $this->entityManager = $manager;
}

Solution

This problem is in no way related to symfonycasts/verify-email-bundle - just read the message: you are requiring doctrine/doctrine-migrations-bundle in your configuration, and you are using PHP 8. This Doctrine bundle has not been made compatible with PHP 8 yet, as doctrine/migrations is not compatible with PHP 8.

You either need to remove these packages, or downgrade to PHP 7



Answered By - Nico Haase
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing