staudenmeir / laravel-cte

Laravel queries with common table expressions
MIT License
514 stars 38 forks source link

deprecated `implode()` glue param #15

Closed silvio-gratani closed 3 years ago

silvio-gratani commented 4 years ago

I got this error:

[2020-07-08 12:09:02] local.ERROR: implode(): Passing glue string after array is deprecated. Swap the parameters {"userId":1,"exception":"[object] (ErrorException(code: 0): implode(): Passing glue string after array is deprecated. Swap the parameters at /var/www/html/vendor/staudenmeir/laravel-cte/src/Query/Grammars/CompilesExpressions.php:41)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8192, 'implode(): Pass...', '/var/www/html/v...', 41, Array)
#1 /var/www/html/vendor/staudenmeir/laravel-cte/src/Query/Grammars/CompilesExpressions.php(41): implode(Array, ', ')
...

Can't find any clue if it is due my specific use case and the query i'm building or what, but it looks like is a pure php related error and how the implode() function is used.

staudenmeir commented 4 years ago

What version of the package are you using?

silvio-gratani commented 4 years ago

Installed following your guide trough

composer require staudenmeir/laravel-cte:"^1.0"

I currently/temporarely fixed it modifying culprit file (in my vendor folder) swapping implode() arguments and it is actually working.

staudenmeir commented 4 years ago

What's the output of composer show for staudenmeir/laravel-cte?

silvio-gratani commented 4 years ago
root@8fe05854b702:/var/www/html# composer show staudenmeir/laravel-cte
name     : staudenmeir/laravel-cte
descrip. : Laravel queries with common table expressions
keywords : 
versions : * v1.1.6
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : 
source   : [git] https://github.com/staudenmeir/laravel-cte.git 68a8fa448fa5c5ee2d09b8d7121a805d9b8fec99
dist     : [zip] https://api.github.com/repos/staudenmeir/laravel-cte/zipball/68a8fa448fa5c5ee2d09b8d7121a805d9b8fec99 68a8fa448fa5c5ee2d09b8d7121a805d9b8fec99
path     : /var/www/html/vendor/staudenmeir/laravel-cte
names    : staudenmeir/laravel-cte

autoload
psr-4
Staudenmeir\LaravelCte\ => src/

requires
illuminate/database 5.8.*
php ^7.1.3

requires (dev)        
laravel/homestead ^8.0
orchestra/testbench 3.8.*
root@8fe05854b702:/var/www/html# 
silvio-gratani commented 4 years ago

Would you prefer a pull request?

staudenmeir commented 4 years ago

I've released a new version that fixes the issue.