You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
It seems like the boot of the ray service force the creation of the database connection which is missing by default and is not required in my case.
Even without the composer.json dependency it is still required by orchestra/testbench.
Setup:
php 8.0
fresh clone of the package
ran the installation script
ran composer update
ran composer test
Expected: the single default test is successful.
Actual: test fails with Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = OFF;)
./vendor/bin/testbench package:test --parallel --no-coverage
E 1 / 1 (100%)
Time: 00:00.265, Memory: 16.00 MB
There was 1 error:
1) Salaun\ComplexUpsert\Tests\ExampleTest::true_is_true
Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = OFF;)
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/Connection.php:692
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/Connection.php:652
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/Connection.php:486
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:353
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php:38
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:282
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:76
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:50
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:131
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:86
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:388
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261
/var/www/packages/laravel-complex-upsert/vendor/spatie/laravel-ray/src/Watchers/QueryWatcher.php:46
/var/www/packages/laravel-complex-upsert/vendor/spatie/laravel-ray/src/RayServiceProvider.php:155
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php:234
/var/www/packages/laravel-complex-upsert/vendor/spatie/laravel-ray/src/RayServiceProvider.php:156
/var/www/packages/laravel-complex-upsert/vendor/spatie/laravel-ray/src/RayServiceProvider.php:51
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Container/Util.php:40
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Container/Container.php:651
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:914
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:895
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:896
/var/www/packages/laravel-complex-upsert/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17
/var/www/packages/laravel-complex-upsert/vendor/orchestra/testbench-core/src/Concerns/CreatesApplication.php:347
/var/www/packages/laravel-complex-upsert/vendor/orchestra/testbench-core/src/Concerns/CreatesApplication.php:223
/var/www/packages/laravel-complex-upsert/vendor/orchestra/testbench-core/src/TestCase.php:75
/var/www/packages/laravel-complex-upsert/vendor/orchestra/testbench-core/src/Concerns/Testing.php:81
/var/www/packages/laravel-complex-upsert/vendor/orchestra/testbench-core/src/TestCase.php:43
/var/www/packages/laravel-complex-upsert/tests/TestCase.php:13
FAILURES!
Tests: 1, Assertions: 0, Errors: 1.
Script ./vendor/bin/testbench package:test --parallel --no-coverage handling the test event returned with error code 2
Fix: the manual suppression of the vendor/spatie/ray folder (followed by composer dumpautoload for good measure) allows to run the test but it is temporary as the composer update method reinstall it.
This discussion was converted from issue #142 on August 26, 2021 10:53.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
It seems like the boot of the ray service force the creation of the database connection which is missing by default and is not required in my case.
Even without the composer.json dependency it is still required by orchestra/testbench.
Setup:
composer update
composer test
Expected: the single default test is successful.
Actual: test fails with
Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = OFF;)
Fix: the manual suppression of the
vendor/spatie/ray
folder (followed bycomposer dumpautoload
for good measure) allows to run the test but it is temporary as thecomposer update
method reinstall it.Beta Was this translation helpful? Give feedback.
All reactions