Skip to content

Commit 966ce0c

Browse files
authored
fix: semantic major version of Laravel
Current code only extracts the first digit to retrieve the major version of Laravel, but this is incorrect as of Laravel version 10: the major version now has 2 digits.
1 parent 7196372 commit 966ce0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CloudinaryServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ protected function bootComponents()
101101

102102
protected function getComponentName($componentName)
103103
{
104-
if( (int)$this->app->version()[0] <= 6 ) {
104+
$version = explode(".", $this->app->version());
105+
if( (int)$version[0] <= 6 ) {
105106
$componentName = str_replace("-", "_", $componentName);
106107
}
107108

0 commit comments

Comments
 (0)