Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for psr/log ^2.0 #46

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,8 @@ see: [PSR-16 Simple Cache](https://www.php-fig.org/psr/psr-16/)
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request

## Third party applications
If you use this SDK, feel free to open a PR to add your application in this list.

## Authors
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"ext-json": "*",
"ext-curl": "*",
"guzzlehttp/guzzle": "^6.3|^7.0",
"psr/log": "^1.0",
"psr/log": "^2.0",
"psr/simple-cache": "^1.0"
},
"autoload": {
Expand All @@ -36,7 +36,7 @@
},
"require-dev": {
"ext-gd": "*",
"monolog/monolog": "^1.23",
"monolog/monolog": "^2.0",
"symfony/cache": "^4.3",
"phpunit/phpunit": "^8.5|^9.5",
"phpstan/phpstan": "^0.12.99",
Expand Down
13 changes: 6 additions & 7 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,38 +103,37 @@ public function searchCount(): int
/**
* @inheritDoc
*/
public function rewind()
public function rewind(): void
{
reset($this->listDocuments);
}
/**
* @inheritDoc
* @return Document|false
*/
public function current()
public function current(): mixed
{
return current($this->listDocuments);
}
/**
* @inheritDoc
* @return int|null
*/
public function key()
public function key(): mixed
{
return key($this->listDocuments);
}
/**
* @inheritDoc
* @return Document|false
*/
public function next()
public function next(): void
{
return next($this->listDocuments);
next($this->listDocuments);
}
/**
* @inheritDoc
*/
public function valid()
public function valid(): bool
{
$key = key($this->listDocuments);
return ($key !== null && $key !== false);
Expand Down