1. Go to this page and download the library: Download arnaud-ritti/mosparo-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// src/EventListener/FilterFieldTypesListener.php
namespace App\EventListener;
use Mosparo\MosparoBundle\Event\FilterFieldTypesEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
#[AsEventListener]
class FilterFieldTypesListener
{
public function __invoke(FilterFieldTypesEvent $event): FilterFieldTypesEvent
{
// Remove PasswordType from the ignored list
$event->setIgnoredFieldTypes(array_diff(
$event->getIgnoredFieldTypes(),
[
PasswordType::class
]
));
// Add PasswordType to the verifiable list
$event->setVerifiableFieldTypes(array_merge(
$event->getVerifiableFieldTypes(),
[
PasswordType::class
]
));
return $event;
}
}