As per Single-parenting behavior changes in Google Drive API, beginning Sept. 30, 2020, you will no longer be able to place a file in multiple parent folders. Now we should Create a shortcut to a Drive file instead.
Is it possible to create shortcut to the file with Google Drive PHP Client v2 or anyhow simple with PHP.
I have tryed:
$file = new \Google_Service_Drive_DriveFile();
$file->setName('Shortcut Name');
$file->setParents([$parent_id]);
$file->setMimeType('application/vnd.google-apps.shortcut');
$shortcut = $drive->files->create($file, [
'shortcutDetails' => [
'targetId' => $file_id
]
]);
I'm getting unknown parameter: 'shortcutDetails'