Closed tiptone closed 8 months ago
The works fine (for me at least) on PHP 8.3.
I believe this is the version number with the prefixed caret that allows me to use PHP 8.3. Basically means I can use anything from PHP 8.0.2 up until (but not including) a hypothetical PHP 9.0.
So, if your project supports it, you could use PHP 8.1 just fine.
That is correct, the issue is not with PHP >= 8.1 but instead with the fact that this package advertises itself as compatible with php: ^7.4.15 || ^8.0.2
and that is not accurate. The current release of this library (I didn't investigate previous release compatibility) is only compatible with PHP >= 8.1.
Agreed. @GrahamCampbell, I have fixed this in #800, if you agree to this change.
The code sample is incorrect.
[
'search_namespaces' => true,
'search' => $type,
]
should be
[
[
'search_namespaces' => true,
'search' => $type,
]
]
The array needs to be the list of params. The first param is an array, but you are passing the first param, instead of a list of params.
While I don't find it intuitive, it works! Thank you.
ResultPager functions as expected unless I try to pass an array of parameters to
fetchAll()
. Using PHP 7.4.33 and m4tthumphrey/php-gitlab-api version 11.13.0.This works as-expected:
This throws an error copy/pasted below the code:
PHP Fatal error: Uncaught Error: Cannot unpack array with string keys in /path/to/app/vendor/m4tthumphrey/php-gitlab-api/src/ResultPager.php:93 Stack trace:
0 /path/to/app/vendor/m4tthumphrey/php-gitlab-api/src/ResultPager.php(134): Gitlab\ResultPager->fetch(Object(Gitlab\Api\Projects), 'all', Array)
Line 93 in GitLab\ResultPager:
$result = self::bindPerPage($api, $this->perPage)->$method(...$parameters);
If my Googling is correct, unpacking an array with string keys was not allowed until PHP 8.1 but the current version (11.13.0) requires
php: ^7.4.15 || ^8.0.2
. Please correct me if I'm looking at this all wrong.