php – How to use a plugin on the server, running only on the local machine (Symfony)?

Through the terminal, I installed the Ramsey / Uuid plug-in:

composer need ramsey / uuid

In my PagesRepository.php I create this function:

use Ramsey  Uuid  Uuid;

function generateUid ()
{
$ uuid = Uuid :: uuid4 ();
$ uuid = $ uuid-> getHex ();
$ uuid = substr ($ uuid, 0.10);

return $ uuid;
}

I'm using the function in my PagesController.php

        $ unique_id = PagesRepository :: generateUid ();
$ entity-> setUnique_id ($ unique_id);

It works fine on my local machine, but then I push it to my server via git and get the following error message:

Attempt to load the class "Uuid" from the "Ramsey Uuid" namespace. As you
forget a "use" statement for
"Symfony Component Validator Constraints Uuid"?

I can not install anything on the server because it is a shared host and the permission is denied. I have copied the file. Ramsey folder in my provider folder on the server. But that did not solve the problem.

I do not understand why it requires the Symfony validator, because it does not need it on the local machine.