Container with mysql extended class

I have a connection class that extends mysql pdo, inside a container, my question is this connection is closed automatically, or do I need to close them manually

The PHP “shared nothing” architecture brings all the required objects into memory, performs the required processing, and then releases all resources when the request is fulfilled. This also applies to your database connection objects within the DI container. So you don’t need to close them manually.