'Call to undefined function Symfony\Component\Console\Input\escapeshellarg()
When running composer install in production I get a new error message today:
$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
   Error
  Call to undefined function Symfony\Component\Console\Input\escapeshellarg()
  at vendor/symfony/console/Input/Input.php:195
    191▕      * @return string
    192▕      */
    193▕     public function escapeToken(string $token)
    194▕     {
  ➜ 195▕         return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token);
    196▕     }
    197▕
    198▕     /**
    199▕      * {@inheritdoc}
      +1 vendor frames
  2   [internal]:0
      Symfony\Component\Console\Input\ArgvInput::Symfony\Component\Console\Input\{closure}("package:discover")
      +8 vendor frames
  11  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
I can't figure out what is wrong. I'm wondering if the dependencies have got into a funny state and I need to do a fresh install of the vendor directory?
Solution 1:[1]
Turns out the function escapeshellarg() was disabled by the hosting provider. Thank you Nico for your help!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|---|
| Solution 1 | Mr U. | 
