cloudinary-laravel
cloudinary-laravel copied to clipboard
Testcase Failed
I've tried the library using Laravel v10, but got an error that says Trait "League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait" not found
. So i decide to fork & clone the repository and try to run the test for the first time.
This is what i got:
PHPUnit 11.0.6 by Sebastian Bergmann and contributors.
Runtime: PHP 8.2.17
Configuration: /var/www/html/cloudinary-laravel/phpunit.xml
PHP Fatal error: Trait "League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait" not found in /var/www/html/cloudinary-laravel/src/CloudinaryAdapter.php on line 16
In CloudinaryAdapter.php line 16:
Trait "League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait" not found
After i remove the trait and run the test again, i got another error:
PHPUnit 11.0.6 by Sebastian Bergmann and contributors.
Runtime: PHP 8.2.17
Configuration: /var/www/html/cloudinary-laravel/phpunit.xml
EE 2 / 2 (100%)
Time: 00:00.189, Memory: 28.00 MB
There were 2 PHPUnit test runner warnings:
1) Class 2020_06_14_000001_create_media_table cannot be found in /var/www/html/cloudinary-laravel/tests/database/migrations/2020_06_14_000001_create_media_table.php
2) Class 2020_12_10_000001_create_model_table cannot be found in /var/www/html/cloudinary-laravel/tests/database/migrations/2020_12_10_000001_create_model_table.php
--
There was 1 PHPUnit test runner deprecation:
1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!
--
There were 2 errors:
1) CloudinaryAdapterTest::test_can_get_url_given_public_id
Error: Interface "League\Flysystem\AdapterInterface" not found
/var/www/html/cloudinary-laravel/src/CloudinaryAdapter.php:15
/var/www/html/cloudinary-laravel/src/CloudinaryServiceProvider.php:166
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php:163
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php:143
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php:120
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php:83
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:357
/var/www/html/cloudinary-laravel/tests/CloudinaryAdapterTest.php:34
2) DetachMediaTest::test_can_detach_one_media_or_all
Illuminate\Database\QueryException: could not find driver (Connection: testing, SQL: PRAGMA foreign_keys = OFF;)
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:813
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:767
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:560
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:534
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php:39
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:275
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:76
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:51
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:167
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:93
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:226
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:182
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:689
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:161
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Support/helpers.php:286
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:161
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:137
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:107
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:622
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:106
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:85
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/Util.php:41
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:662
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:212
/var/www/html/cloudinary-laravel/vendor/symfony/console/Command/Command.php:279
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:181
/var/www/html/cloudinary-laravel/vendor/symfony/console/Application.php:1031
/var/www/html/cloudinary-laravel/vendor/symfony/console/Application.php:318
/var/www/html/cloudinary-laravel/vendor/symfony/console/Application.php:169
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Console/Application.php:162
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:423
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Testing/PendingCommand.php:297
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/functions.php:67
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:59
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:34
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Concerns/InteractsWithMigrations.php:62
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Concerns/InteractsWithMigrations.php:40
/var/www/html/cloudinary-laravel/tests/DetachMediaTest.php:19
Caused by
PDOException: could not find driver
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:44
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php:25
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:222
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1219
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:565
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:800
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:767
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:560
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:534
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php:39
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:275
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:76
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:51
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:167
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:93
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:226
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:182
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:689
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:161
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Support/helpers.php:286
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:161
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:137
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:107
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:622
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:106
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:85
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/Util.php:41
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:662
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:212
/var/www/html/cloudinary-laravel/vendor/symfony/console/Command/Command.php:279
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:181
/var/www/html/cloudinary-laravel/vendor/symfony/console/Application.php:1031
/var/www/html/cloudinary-laravel/vendor/symfony/console/Application.php:318
/var/www/html/cloudinary-laravel/vendor/symfony/console/Application.php:169
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Console/Application.php:162
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:423
/var/www/html/cloudinary-laravel/vendor/laravel/framework/src/Illuminate/Testing/PendingCommand.php:297
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/functions.php:67
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:59
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:34
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Concerns/InteractsWithMigrations.php:62
/var/www/html/cloudinary-laravel/vendor/orchestra/testbench-core/src/Concerns/InteractsWithMigrations.php:40
/var/www/html/cloudinary-laravel/tests/DetachMediaTest.php:19
ERRORS!
Tests: 2, Assertions: 0, Errors: 2, Warnings: 2, Deprecations: 1.
I recommend to add github actions to automatically run the tests. So everyone know if the test is broken or passed.
v2.1 introduced some regressions and that is causing the error you are seeing.
@unicodeveloper Please see my comments on Issue https://github.com/cloudinary-community/cloudinary-laravel/issues/83
The v2.1 release has not been reverted/corrected yet.
I'm going to check this out today @jayjfletcher @dwadp
I'm also receiving the Trait "League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait" not found
error.
I'm going to check this out today @jayjfletcher @dwadp
Any update here?
@unicodeveloper any update? also getting this error Trait "League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait" not found {"userId":1,"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Trait "League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait" not found
I also got this error with Laravel 9 but works fine in Laravel 11
I'm going to check this out today @jayjfletcher @dwadp
Was there any progress on this one @unicodeveloper ?
I'm going to check this out today @jayjfletcher @dwadp
Was there any progress on this one @unicodeveloper ?
Hello Michael, I've taken over the repository for Cloudinary and am working on bringing it up to speed with Laravel 11.
I apologize for any troubles in the meantime while I work through this.
I published v2.2.0 yesterday which should make it work in Laravel 10 and 11. Go ahead and give it a try and if you see any problems, please open a new issue so I can address it.