What best practices should be followed when restructuring the folder hierarchy of a PHP project to ensure autoload functionality?
When restructuring the folder hierarchy of a PHP project, it is important to update the autoload functionality to reflect the new file paths. This can be done by modifying the composer.json file to include the new namespace mappings and running the `composer dump-autoload` command to regenerate the autoloader files.
// composer.json
{
"autoload": {
"psr-4": {
"App\\": "src/"
}
}
}
```
After updating the composer.json file, run the following command in the terminal:
```
composer dump-autoload