grimzy/laravel-mysql-spatial

could not find driver issue/conflict with another package

scandar opened this issue · 1 comments

Hi guys,

my CI pipeline was working fine until i installed grimzy/laravel-mysql-spatial and i started getting this error in CI

[38.0MiB/16.10s] > @php artisan package:discover --ansi
[38.0MiB/16.23s] 
[38.0MiB/16.23s]    PDOException 
[38.0MiB/16.23s] 
[38.0MiB/16.23s]   could not find driver
[38.0MiB/16.23s] 
[38.0MiB/16.23s]   at vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
[38.0MiB/16.23s]      66▕         if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) ***
     67▕             return new PDOConnection($dsn, $username, $password, $options);
     68▕         ***
     69▕ 
  ➜  70▕         return new PDO($dsn, $username, $password, $options);
     71▕     ***
     72▕ 
     73▕     /**
     74▕      * Determine if the connection is persistent.
[38.0MiB/16.24s] 
      +30 vendor frames [38.0MiB/16.24s] 
[38.0MiB/16.24s]   31  [internal]:0
[38.0MiB/16.24s]       Illuminate\Foundation\Application::Illuminate\Foundation\***closure***(Object(Facade\Ignition\IgnitionServiceProvider))
[38.0MiB/16.24s] 
      +5 vendor frames [38.0MiB/16.24s] 
[38.0MiB/16.24s]   37  artisan:37
[38.0MiB/16.24s]       Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
[38.0MiB/16.24s] Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

after some debugging i found out that the issue happens when i have both of these packages installed

  • grimzy/laravel-mysql-spatial
  • jenssegers/mongodb

it just works fine if i have one without the other
after some more debugging i found out that you're overriding laravel's db.factory
i'm not 100% sure if that's the issue but it seems both packages are colliding with each other

your help is much appreciated
thanks

Hello, I'm having this same issue. Has there been any updates regarding it?
edit: In actuality, my error isn't quite the same, but it's similar; a package conflict resulting in a PDOException. This is in attempting to update to laravel 8.

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Doctrine\DBAL\Driver\PDO\Exception 

  could not find driver

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
     14▕ final class Exception extends PDOException
     15▕ {
     16▕     public static function new(\PDOException $exception): self
     17▕     {
  ➜  18▕         return new self($exception);
     19▕     }
     20▕ }
     21▕ 

      +1 vendor frames 
  2   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}()

      +19 vendor frames 
  22  app/Providers/AppServiceProvider.php:27
      Illuminate\Support\Facades\Facade::__callStatic()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1