Skip to content

Commit

Permalink
Merge pull request #16 from sasezaki/log-v-2
Browse files Browse the repository at this point in the history
Log v 2 support
  • Loading branch information
sasezaki authored Mar 25, 2023
2 parents ccbed3a + 274fd1f commit 210e1a5
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 412 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecept.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- "highest"
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ But, You can use this for individual purpose.
Add the following files to your stub settings.
```
stubs-for-throwable/LoggerInterface.phpstub
stubs-for-throwable/AbstractLogger.phpstub
```

## Features
Expand Down Expand Up @@ -50,6 +49,5 @@ public function log($level, $message, array $context = array())

## Not Support (Not planned)

- Stub `LoggerAwareTrait` with @psalm-require-implements
- https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-require-implements
- Stub `LoggerAwareTrait`

8 changes: 2 additions & 6 deletions build/transform-source
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
#!/usr/bin/env bash

## stubs-for-exception
cp vendor/psr/log/Psr/Log/LoggerInterface.php stubs-for-exception/LoggerInterface.php
cp vendor/psr/log/Psr/Log/AbstractLogger.php stubs-for-exception/AbstractLogger.php
cp vendor/psr/log/src/LoggerInterface.php stubs-for-exception/LoggerInterface.php
vendor/bin/rector process --config=build/rector-stubs-for-exception.php --clear-cache --no-diffs
mv stubs-for-exception/LoggerInterface.php stubs-for-exception/LoggerInterface.phpstub
mv stubs-for-exception/AbstractLogger.php stubs-for-exception/AbstractLogger.phpstub

## stubs-for-throwable
cp vendor/psr/log/Psr/Log/LoggerInterface.php stubs-for-throwable/LoggerInterface.php
cp vendor/psr/log/Psr/Log/AbstractLogger.php stubs-for-throwable/AbstractLogger.php
cp vendor/psr/log/src/LoggerInterface.php stubs-for-throwable/LoggerInterface.php
vendor/bin/rector process --config=build/rector-stubs-for-throwable.php --clear-cache --no-diffs
mv stubs-for-throwable/LoggerInterface.php stubs-for-throwable/LoggerInterface.phpstub
mv stubs-for-throwable/AbstractLogger.php stubs-for-throwable/AbstractLogger.phpstub
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
}
],
"require": {
"php": "^7.2 || ^8.0"
"php": ">=8.0.0"
},
"require-dev": {
"ext-simplexml": "*",
"psr/log": "^1",
"psr/log": "^2",
"rector/rector": "0.15.21",
"squizlabs/php_codesniffer": "^3.7",
"vimeo/psalm": "^5",
Expand All @@ -33,11 +33,11 @@
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "7.4.99"
"php": "8.0.99"
}
},
"conflict": {
"psr/log": ">=2"
"psr/log": "^1 || >=3"
},
"scripts" : {
"check": [
Expand Down
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

129 changes: 0 additions & 129 deletions stubs-for-exception/AbstractLogger.phpstub

This file was deleted.

Loading

0 comments on commit 210e1a5

Please sign in to comment.