create a php console application , install as many composer packages as you need, that given the imap server connection credentials will connect to the imap server , fetch the INBOX folder messages and for each message if the subject contains a fiscal code number 'VRNHTG14F12D325G' will assign the email the folder 'Matched'
Here is an example of a PHP console application that uses the `imap` extension and several Composer packages to connect to an IMAP server, fetch the INBOX folder messages, and move emails with a specific subject to a folder named 'Matched':

**Step 1: Create a new PHP project and install required packages**

Create a new directory for your project and navigate to it in your terminal. Then, run the following commands:
```
composer init --name=my-imap-app
composer require php-imap/php-imap
composer require symfony/console
composer require doctrine/dbal
```
**Step 2: Create the PHP console application**

Create a new file `imap_app.php` in the root of your project directory:
```php
<?php

require __DIR__. '/vendor/autoload.php';

use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use PhpImap\PhpImap;
use Doctrine\DBAL\DriverManager;

class ImapApp extends Command
{
    protected function configure()
    {
        $this->setName('imap:fetch');
        $this->setDescription('Fetch emails from IMAP server and move matched emails to "Matched" folder');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $imapServer = 'imap.example.com';
        $imapUsername = 'username';
        $imapPassword
create a php console application , install as many composer packages as you need, that given the imap server connection credentials will connect to the imap server , fetch the INBOX folder messages and for each message if the subject contains a fiscal code number 'VRNHTG14F12D325G' will assign the email the folder 'Matched' and move it there, otherwise will assign the folder 'Unmatched' and move it there.

First, let's create a new PHP project using Composer. You can do this by running the following command:

```bash
composer init
```

Follow the prompts to set up your project. For the minimum requirements, you can simply press enter for each question.

Next, let's install the necessary packages. We will use `imap` for connecting to the IMAP server, `Nyholm\Psr7` for creating PSR-7 messages, and `Symfony\Component\Mime\Email` for handling email messages:

```bash
composer require imap nyholm/psr7 symfony/mime
```

Now, let's create a new PHP file `index.php` in the root of your project:

```php
<?php

require_once __DIR__ . '/vendor/autoload.php';

use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7\Stream;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mime\Mailer;
use Symfony\Component\Mime\Transport\Transport