Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:
curl https://fabbot.io/patch/twigphp/Twig/4304/e0feaf1635cfa45ac92f193d4e1b9a7637f00e43/exception_messages.diff | patch -p0
diff -ru src/Environment.php src/Environment.php
--- src/Environment.php 2024-10-02 12:41:30.855477035 +0000
+++ src/Environment.php 2024-10-02 12:41:32.078520604 +0000
@@ -925,6 +925,6 @@
private function createStub(string $type, $name, $package): callable
{
- return fn () => throw new RuntimeError(\sprintf('Cannot use the "%s" %s because the "%s" composer package is not installed. Try running "composer require %s".', $name, $type, $package, $package));
+ return fn () => throw new RuntimeError(\sprintf('Cannot use the "%s" "%s" because the "%s" composer package is not installed. Try running "composer require "%s"".', $name, $type, $package, $package));
}
}