Skip to content

Commit

Permalink
feat: Add support to Laravel 10
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelpc4 committed Apr 23, 2023
1 parent eb55662 commit 388a116
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 32 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 8.1, 8.0 ]
laravel: [ 9.* ]
php: [ 8.2, 8.1 ]
laravel: [ 10.* ]
include:
- laravel: 9.*
testbench: 7.*
phpunit: 9.*
- laravel: 10.*
testbench: 8.*
phpunit: 10.*

name: PHP v${{ matrix.php }} - Laravel v${{ matrix.laravel }}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:43:"Yoelpc4\LaravelCloudinary\CloudinaryAdapter";a:6:{s:4:"name";s:17:"CloudinaryAdapter";s:14:"namespacedName";s:43:"Yoelpc4\LaravelCloudinary\CloudinaryAdapter";s:9:"namespace";s:25:"Yoelpc4\LaravelCloudinary";s:9:"startLine";i:26;s:7:"endLine";i:400;s:7:"methods";a:23:{s:11:"__construct";a:6:{s:10:"methodName";s:11:"__construct";s:9:"signature";s:27:"__construct(array $options)";s:10:"visibility";s:6:"public";s:9:"startLine";i:32;s:7:"endLine";i:48;s:3:"ccn";i:1;}s:10:"fileExists";a:6:{s:10:"methodName";s:10:"fileExists";s:9:"signature";s:30:"fileExists(string $path): bool";s:10:"visibility";s:6:"public";s:9:"startLine";i:53;s:7:"endLine";i:66;s:3:"ccn";i:3;}s:15:"directoryExists";a:6:{s:10:"methodName";s:15:"directoryExists";s:9:"signature";s:35:"directoryExists(string $path): bool";s:10:"visibility";s:6:"public";s:9:"startLine";i:71;s:7:"endLine";i:84;s:3:"ccn";i:3;}s:5:"write";a:6:{s:10:"methodName";s:5:"write";s:9:"signature";s:76:"write(string $path, string $contents, League\Flysystem\Config $config): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:89;s:7:"endLine";i:98;s:3:"ccn";i:2;}s:11:"writeStream";a:6:{s:10:"methodName";s:11:"writeStream";s:9:"signature";s:75:"writeStream(string $path, $contents, League\Flysystem\Config $config): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:103;s:7:"endLine";i:117;s:3:"ccn";i:2;}s:4:"read";a:6:{s:10:"methodName";s:4:"read";s:9:"signature";s:26:"read(string $path): string";s:10:"visibility";s:6:"public";s:9:"startLine";i:122;s:7:"endLine";i:129;s:3:"ccn";i:2;}s:10:"readStream";a:6:{s:10:"methodName";s:10:"readStream";s:9:"signature";s:24:"readStream(string $path)";s:10:"visibility";s:6:"public";s:9:"startLine";i:134;s:7:"endLine";i:141;s:3:"ccn";i:2;}s:6:"delete";a:6:{s:10:"methodName";s:6:"delete";s:9:"signature";s:26:"delete(string $path): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:146;s:7:"endLine";i:156;s:3:"ccn";i:2;}s:15:"deleteDirectory";a:6:{s:10:"methodName";s:15:"deleteDirectory";s:9:"signature";s:35:"deleteDirectory(string $path): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:161;s:7:"endLine";i:168;s:3:"ccn";i:2;}s:15:"createDirectory";a:6:{s:10:"methodName";s:15:"createDirectory";s:9:"signature";s:68:"createDirectory(string $path, League\Flysystem\Config $config): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:173;s:7:"endLine";i:180;s:3:"ccn";i:2;}s:13:"setVisibility";a:6:{s:10:"methodName";s:13:"setVisibility";s:9:"signature";s:53:"setVisibility(string $path, string $visibility): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:185;s:7:"endLine";i:188;s:3:"ccn";i:1;}s:10:"visibility";a:6:{s:10:"methodName";s:10:"visibility";s:9:"signature";s:57:"visibility(string $path): League\Flysystem\FileAttributes";s:10:"visibility";s:6:"public";s:9:"startLine";i:193;s:7:"endLine";i:196;s:3:"ccn";i:1;}s:8:"mimeType";a:6:{s:10:"methodName";s:8:"mimeType";s:9:"signature";s:55:"mimeType(string $path): League\Flysystem\FileAttributes";s:10:"visibility";s:6:"public";s:9:"startLine";i:201;s:7:"endLine";i:208;s:3:"ccn";i:2;}s:12:"lastModified";a:6:{s:10:"methodName";s:12:"lastModified";s:9:"signature";s:59:"lastModified(string $path): League\Flysystem\FileAttributes";s:10:"visibility";s:6:"public";s:9:"startLine";i:213;s:7:"endLine";i:220;s:3:"ccn";i:2;}s:8:"fileSize";a:6:{s:10:"methodName";s:8:"fileSize";s:9:"signature";s:55:"fileSize(string $path): League\Flysystem\FileAttributes";s:10:"visibility";s:6:"public";s:9:"startLine";i:225;s:7:"endLine";i:232;s:3:"ccn";i:2;}s:12:"listContents";a:6:{s:10:"methodName";s:12:"listContents";s:9:"signature";s:48:"listContents(string $path, bool $deep): iterable";s:10:"visibility";s:6:"public";s:9:"startLine";i:237;s:7:"endLine";i:259;s:3:"ccn";i:2;}s:4:"move";a:6:{s:10:"methodName";s:4:"move";s:9:"signature";s:80:"move(string $source, string $destination, League\Flysystem\Config $config): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:264;s:7:"endLine";i:275;s:3:"ccn";i:2;}s:4:"copy";a:6:{s:10:"methodName";s:4:"copy";s:9:"signature";s:80:"copy(string $source, string $destination, League\Flysystem\Config $config): void";s:10:"visibility";s:6:"public";s:9:"startLine";i:280;s:7:"endLine";i:290;s:3:"ccn";i:2;}s:6:"getUrl";a:6:{s:10:"methodName";s:6:"getUrl";s:9:"signature";s:34:"getUrl(string|array $path): string";s:10:"visibility";s:6:"public";s:9:"startLine";i:298;s:7:"endLine";i:315;s:3:"ccn";i:3;}s:8:"getAsset";a:6:{s:10:"methodName";s:8:"getAsset";s:9:"signature";s:29:"getAsset(string $path): array";s:10:"visibility";s:9:"protected";s:9:"startLine";i:324;s:7:"endLine";i:329;s:3:"ccn";i:1;}s:17:"getFileAttributes";a:6:{s:10:"methodName";s:17:"getFileAttributes";s:9:"signature";s:64:"getFileAttributes(array $asset): League\Flysystem\FileAttributes";s:10:"visibility";s:9:"protected";s:9:"startLine";i:337;s:7:"endLine";i:350;s:3:"ccn";i:2;}s:15:"getResourceType";a:6:{s:10:"methodName";s:15:"getResourceType";s:9:"signature";s:37:"getResourceType(string $path): string";s:10:"visibility";s:9:"protected";s:9:"startLine";i:359;s:7:"endLine";i:376;s:3:"ccn";i:3;}s:11:"getPublicId";a:6:{s:10:"methodName";s:11:"getPublicId";s:9:"signature";s:33:"getPublicId(string $path): string";s:10:"visibility";s:9:"protected";s:9:"startLine";i:384;s:7:"endLine";i:399;s:3:"ccn";i:3;}}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:401;s:18:"commentLinesOfCode";i:85;s:21:"nonCommentLinesOfCode";i:316;}s:15:"ignoredLinesFor";a:1:{i:0;i:26;}s:17:"executableLinesIn";a:125:{i:34;i:3;i:35;i:3;i:36;i:3;i:37;i:3;i:38;i:3;i:39;i:3;i:40;i:3;i:41;i:3;i:42;i:3;i:43;i:3;i:45;i:4;i:47;i:5;i:56;i:6;i:58;i:7;i:59;i:8;i:60;i:9;i:61;i:10;i:64;i:11;i:74;i:12;i:76;i:13;i:77;i:14;i:78;i:15;i:79;i:16;i:82;i:17;i:91;i:18;i:93;i:19;i:94;i:20;i:97;i:21;i:106;i:22;i:108;i:23;i:109;i:23;i:110;i:23;i:111;i:23;i:112;i:23;i:113;i:23;i:114;i:24;i:115;i:25;i:125;i:26;i:126;i:27;i:127;i:28;i:137;i:29;i:138;i:30;i:139;i:31;i:149;i:32;i:150;i:32;i:151;i:32;i:152;i:32;i:153;i:33;i:154;i:34;i:164;i:35;i:165;i:36;i:166;i:37;i:176;i:38;i:177;i:39;i:178;i:40;i:187;i:41;i:195;i:42;i:204;i:43;i:205;i:44;i:206;i:45;i:216;i:46;i:217;i:47;i:218;i:48;i:228;i:49;i:229;i:50;i:230;i:51;i:239;i:52;i:241;i:53;i:253;i:54;i:245;i:55;i:246;i:55;i:247;i:55;i:248;i:55;i:249;i:55;i:250;i:55;i:252;i:56;i:255;i:57;i:256;i:58;i:257;i:59;i:266;i:60;i:269;i:61;i:270;i:61;i:271;i:61;i:272;i:62;i:273;i:63;i:283;i:64;i:284;i:64;i:285;i:64;i:286;i:64;i:287;i:65;i:288;i:66;i:300;i:67;i:302;i:68;i:303;i:69;i:304;i:70;i:307;i:71;i:309;i:72;i:312;i:73;i:314;i:74;i:326;i:75;i:327;i:75;i:328;i:75;i:339;i:76;i:341;i:77;i:343;i:78;i:344;i:78;i:345;i:78;i:346;i:78;i:347;i:78;i:348;i:78;i:349;i:78;i:361;i:79;i:363;i:80;i:365;i:81;i:367;i:82;i:368;i:83;i:369;i:84;i:371;i:85;i:375;i:86;i:386;i:87;i:388;i:88;i:390;i:89;i:393;i:90;i:394;i:91;i:398;i:92;}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:46:"Yoelpc4\LaravelCloudinary\UnableToListContents";a:6:{s:4:"name";s:20:"UnableToListContents";s:14:"namespacedName";s:46:"Yoelpc4\LaravelCloudinary\UnableToListContents";s:9:"namespace";s:25:"Yoelpc4\LaravelCloudinary";s:9:"startLine";i:9;s:7:"endLine";i:38;s:7:"methods";a:4:{s:12:"fromLocation";a:6:{s:10:"methodName";s:12:"fromLocation";s:9:"signature";s:75:"fromLocation(string $location, string $reason, Throwable $previous): static";s:10:"visibility";s:6:"public";s:9:"startLine";i:15;s:7:"endLine";i:22;s:3:"ccn";i:1;}s:9:"operation";a:6:{s:10:"methodName";s:9:"operation";s:9:"signature";s:19:"operation(): string";s:10:"visibility";s:6:"public";s:9:"startLine";i:24;s:7:"endLine";i:27;s:3:"ccn";i:1;}s:6:"reason";a:6:{s:10:"methodName";s:6:"reason";s:9:"signature";s:16:"reason(): string";s:10:"visibility";s:6:"public";s:9:"startLine";i:29;s:7:"endLine";i:32;s:3:"ccn";i:1;}s:8:"location";a:6:{s:10:"methodName";s:8:"location";s:9:"signature";s:18:"location(): string";s:10:"visibility";s:6:"public";s:9:"startLine";i:34;s:7:"endLine";i:37;s:3:"ccn";i:1;}}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:39;s:18:"commentLinesOfCode";i:0;s:21:"nonCommentLinesOfCode";i:39;}s:15:"ignoredLinesFor";a:1:{i:0;i:9;}s:17:"executableLinesIn";a:7:{i:17;i:3;i:18;i:4;i:19;i:5;i:21;i:6;i:26;i:7;i:31;i:8;i:36;i:9;}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:51:"Yoelpc4\LaravelCloudinary\CloudinaryServiceProvider";a:6:{s:4:"name";s:25:"CloudinaryServiceProvider";s:14:"namespacedName";s:51:"Yoelpc4\LaravelCloudinary\CloudinaryServiceProvider";s:9:"namespace";s:25:"Yoelpc4\LaravelCloudinary";s:9:"startLine";i:11;s:7:"endLine";i:36;s:7:"methods";a:2:{s:8:"register";a:6:{s:10:"methodName";s:8:"register";s:9:"signature";s:10:"register()";s:10:"visibility";s:6:"public";s:9:"startLine";i:18;s:7:"endLine";i:21;s:3:"ccn";i:1;}s:4:"boot";a:6:{s:10:"methodName";s:4:"boot";s:9:"signature";s:6:"boot()";s:10:"visibility";s:6:"public";s:9:"startLine";i:28;s:7:"endLine";i:35;s:3:"ccn";i:1;}}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:37;s:18:"commentLinesOfCode";i:11;s:21:"nonCommentLinesOfCode";i:26;}s:15:"ignoredLinesFor";a:1:{i:0;i:11;}s:17:"executableLinesIn";a:5:{i:21;i:1;i:30;i:2;i:34;i:2;i:31;i:3;i:33;i:4;}}
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":[],"times":{"Yoelpc4\\LaravelCloudinary\\Tests\\DirectoryTest::testItCanCreateDirectory":1.505,"Yoelpc4\\LaravelCloudinary\\Tests\\DirectoryTest::testIsDirectoryExists":2.618,"Yoelpc4\\LaravelCloudinary\\Tests\\DirectoryTest::testItCanDeleteDirectory":1.741,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanWriteFile":3.064,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanWriteStreamFile":2.638,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testIsFileExists":4.297,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanReadFile":4.263,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanReadStreamFile":3.963,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanListContentsFile":4.159,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanGetFileMimetype":5.017,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanGetFileLastModified":3.272,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanGetFileSize":2.869,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanGetUrl":1.487,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanDeleteFile":1.783,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanCopyFile":2.23,"Yoelpc4\\LaravelCloudinary\\Tests\\DocumentTest::testItCanMoveFile":2.26,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanWriteFile":1.688,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanWriteStreamFile":1.642,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testIsFileExists":5.757,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanReadFile":3.81,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanReadStreamFile":2.02,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanListContentsFile":3.562,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanGetFileMimetype":2.943,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanGetFileLastModified":2.941,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanGetFileSize":3.144,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanGetUrl":1.925,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanDeleteFile":1.98,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanCopyFile":2.188,"Yoelpc4\\LaravelCloudinary\\Tests\\ImageTest::testItCanMoveFile":2.301}}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ _Laravel Cloudinary filesystem driver._

| Laravel | Package |
|---------|---------|
| 10.x.x | 4.x |
| 9.x.x | 3.x |
| 8.x.x | 2.x |
| 7.x.x | 2.x |
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
}
],
"require": {
"php": ">=8.0",
"cloudinary/cloudinary_php": "^2.6.1",
"illuminate/contracts": "9.*",
"illuminate/filesystem": "9.*",
"illuminate/http": "9.*",
"illuminate/support": "9.*",
"league/flysystem": "^3.0.11"
"php": ">=8.1",
"cloudinary/cloudinary_php": "^2.9.0",
"illuminate/contracts": "10.*",
"illuminate/filesystem": "10.*",
"illuminate/http": "10.*",
"illuminate/support": "10.*",
"league/flysystem": "^3.8.0"
},
"require-dev": {
"orchestra/testbench": "7.*",
"phpunit/phpunit": "9.*"
"orchestra/testbench": "8.*",
"phpunit/phpunit": "10.*"
},
"autoload": {
"psr-4": {
Expand Down
35 changes: 17 additions & 18 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false"
backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false">
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="coverage.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
<logging/>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage includeUncoveredFiles="true">
<report>
<clover outputFile="coverage.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
<logging/>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

0 comments on commit 388a116

Please sign in to comment.