diff --git a/typo3/sysext/core/Classes/Composer/CliEntryPoint.php b/typo3/sysext/core/Classes/Composer/CliEntryPoint.php
new file mode 100644
index 0000000000000000000000000000000000000000..9da28e58325888e9931aae03cefebf02b9dc395f
--- /dev/null
+++ b/typo3/sysext/core/Classes/Composer/CliEntryPoint.php
@@ -0,0 +1,69 @@
+<?php
+declare(strict_types = 1);
+namespace TYPO3\CMS\Core\Composer;
+
+/*
+ * This file is part of the TYPO3 project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use Composer\Script\Event;
+use Composer\Util\Filesystem as FilesystemUtility;
+use Symfony\Component\Filesystem\Filesystem;
+use TYPO3\CMS\Composer\Plugin\Config;
+use TYPO3\CMS\Composer\Plugin\Core\InstallerScript;
+
+class CliEntryPoint implements InstallerScript
+{
+    /**
+     * Absolute path to entry script source
+     *
+     * @var string
+     */
+    private $source;
+
+    /**
+     * The target file relative to the web directory
+     *
+     * @var string
+     */
+    private $target;
+
+    public function __construct(string $source, string $target)
+    {
+        $this->source = $source;
+        $this->target = $target;
+    }
+
+    public function run(Event $event): bool
+    {
+        $composer = $event->getComposer();
+        $filesystemUtility = new FilesystemUtility();
+        $filesystem = new Filesystem();
+        $pluginConfig = Config::load($composer);
+
+        $entryPointContent = file_get_contents($this->source);
+        $targetFile = $pluginConfig->get('root-dir') . '/' . $this->target;
+        $autoloadFile = $composer->getConfig()->get('vendor-dir') . '/autoload.php';
+
+        $entryPointContent = preg_replace(
+            '/__DIR__ . \'[^\']*\'/',
+            $filesystemUtility->findShortestPathCode($targetFile, $autoloadFile),
+            $entryPointContent
+        );
+
+        $filesystemUtility->ensureDirectoryExists(dirname($targetFile));
+        $filesystem->dumpFile($targetFile, $entryPointContent);
+        $filesystem->chmod($targetFile, 0755);
+
+        return $filesystem->exists($targetFile);
+    }
+}
diff --git a/typo3/sysext/core/Classes/Composer/InstallerScripts.php b/typo3/sysext/core/Classes/Composer/InstallerScripts.php
index f13852f5637542e9e7950c0ec3c20e372f18fd54..e8ad74c3ee9db85b8cb173f79bef1e8f028bce60 100644
--- a/typo3/sysext/core/Classes/Composer/InstallerScripts.php
+++ b/typo3/sysext/core/Classes/Composer/InstallerScripts.php
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Composer;
  */
 
 use Composer\Script\Event;
-use TYPO3\CMS\Composer\Plugin\Core\InstallerScripts\EntryPoint;
 use TYPO3\CMS\Composer\Plugin\Core\InstallerScriptsRegistration;
 use TYPO3\CMS\Composer\Plugin\Core\ScriptDispatcher;
 
@@ -35,32 +34,6 @@ class InstallerScripts implements InstallerScriptsRegistration
         $source = dirname(__DIR__, 2) . '/Resources/Private/Php/cli.php';
         $target = 'typo3/sysext/core/bin/typo3';
 
-        $scriptDispatcher->addInstallerScript(
-            // @todo: Add support to `typo3/cms-composer-installers` to create executable entry points
-            new class($source, $target) extends EntryPoint {
-                /** @var string */
-                private $target;
-
-                public function __construct(string $source, string $target)
-                {
-                    parent::__construct($source, $target);
-                    $this->target = $target;
-                }
-
-                public function run(Event $event): bool
-                {
-                    parent::run($event);
-
-                    $composer = $event->getComposer();
-                    $pluginConfig = \TYPO3\CMS\Composer\Plugin\Config::load($composer);
-
-                    $targetFile = $pluginConfig->get('web-dir') . '/' . $this->target;
-
-                    @chmod($targetFile, 0755);
-
-                    return true;
-                }
-            }
-        );
+        $scriptDispatcher->addInstallerScript(new CliEntryPoint($source, $target));
     }
 }