diff --git a/LICENSE.md b/LICENSE.md index bc5674fe..6a920d60 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,17 +1,17 @@ -Copyright © 2008 by Yii Software (https://www.yiiframework.com/) +Copyright © 2008 by Yii Software () All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Yii Software nor the names of its +* Neither the name of Yii Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/README.md b/README.md index 1a6239c1..20a1334a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ [![type-coverage](https://shepherd.dev/github/yiisoft/log/coverage.svg)](https://shepherd.dev/github/yiisoft/log) This package provides [PSR-3](https://www.php-fig.org/psr/psr-3/) compatible logging library. It is used in -[Yii Framework](http://www.yiiframework.com/) but is usable separately. +[Yii Framework](https://www.yiiframework.com/) but is usable separately. The logger sends passes messages to multiple targets. Each target may filter messages by their severity levels and categories and then export them to some medium such as file, email or syslog. @@ -37,7 +37,6 @@ composer require yiisoft/log --prefer-dist Creating a logger: ```php - /** * List of class instances that extend the \Yiisoft\Log\Target abstract class. * @@ -92,41 +91,19 @@ Extra logging targets are implemented as separate packages: - [File](https://github.com/yiisoft/log-target-file) - [Syslog](https://github.com/yiisoft/log-target-syslog) -See [Yii guide to logging](https://github.com/yiisoft/docs/blob/master/guide/en/runtime/logging.md) for more info. - -## Testing - -### Unit testing - -The package is tested with [PHPUnit](https://phpunit.de/). To run tests: - -```shell -./vendor/bin/phpunit -``` - -### Mutation testing - -The package tests are checked with [Infection](https://infection.github.io/) mutation framework with -[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: - -```shell -./vendor/bin/roave-infection-static-analysis-plugin -``` - -### Static analysis +## Documentation -The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: +- See [Yii guide to logging](https://github.com/yiisoft/docs/blob/master/guide/en/runtime/logging.md) for more info. +- Leia [Yii guide to logging](https://github.com/yiisoft/docs/blob/master/guide/pt-BR/runtime/logging.md) para mais informações. -```shell -./vendor/bin/psalm -``` +Testing: -## License +- [Internals](docs/internals.md) -The Yii Logging Library is free software. It is released under the terms of the BSD License. -Please see [`LICENSE`](./LICENSE.md) for more information. +## Support -Maintained by [Yii Software](https://www.yiiframework.com/). +If you need help or have a question, the [Yii Forum](https://forum.yiiframework.com/c/yii-3-0/63) is a good place for that. +You may also check out other [Yii Community Resources](https://www.yiiframework.com/community). ## Support the project @@ -139,3 +116,10 @@ Maintained by [Yii Software](https://www.yiiframework.com/). [![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat&logo=telegram)](https://t.me/yii3en) [![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat&logo=facebook&logoColor=ffffff)](https://www.facebook.com/groups/yiitalk) [![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat&logo=slack)](https://yiiframework.com/go/slack) + +## License + +The Yii Logging Library is free software. It is released under the terms of the BSD License. +Please see [`LICENSE`](./LICENSE.md) for more information. + +Maintained by [Yii Software](https://www.yiiframework.com/). diff --git a/composer.json b/composer.json index b8bb767e..3fd5223e 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "issues": "https://github.com/yiisoft/log/issues", "forum": "https://www.yiiframework.com/forum/", "wiki": "https://www.yiiframework.com/wiki/", - "irc": "irc://irc.freenode.net/yii", + "irc": "ircs://irc.libera.chat:6697/yii", "chat": "https://t.me/yii3en" }, "require": { diff --git a/docs/internals.md b/docs/internals.md new file mode 100644 index 00000000..b715d9fb --- /dev/null +++ b/docs/internals.md @@ -0,0 +1,46 @@ +# Internals + +## Unit testing + +The package is tested with [PHPUnit](https://phpunit.de/). To run tests: + +```shell +./vendor/bin/phpunit +``` + +## Mutation testing + +The package tests are checked with [Infection](https://infection.github.io/) mutation framework with +[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: + +```shell +./vendor/bin/roave-infection-static-analysis-plugin +``` + +## Static analysis + +The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: + +```shell +./vendor/bin/psalm +``` + +## Rector + +Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or +use either newest or any specific version of PHP: + +```shell +./vendor/bin/rector +``` + +## Dependencies + +Use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to detect transitive +[Composer](https://getcomposer.org/) dependencies. + +To run the checker, execute the following command: + +```shell +./vendor/bin/composer-require-checker +```