Skip to content

Commit d0507ce

Browse files
authored
Docs folder standardization and other fixes (#107)
1 parent 0c90819 commit d0507ce

File tree

7 files changed

+340
-314
lines changed

7 files changed

+340
-314
lines changed

LICENSE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Copyright © 2008 by Yii Software (https://www.yiiframework.com/)
1+
Copyright © 2008 by Yii Software (<https://www.yiiframework.com/>)
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
55
modification, are permitted provided that the following conditions
66
are met:
77

8-
* Redistributions of source code must retain the above copyright
8+
* Redistributions of source code must retain the above copyright
99
notice, this list of conditions and the following disclaimer.
10-
* Redistributions in binary form must reproduce the above copyright
10+
* Redistributions in binary form must reproduce the above copyright
1111
notice, this list of conditions and the following disclaimer in
1212
the documentation and/or other materials provided with the
1313
distribution.
14-
* Neither the name of Yii Software nor the names of its
14+
* Neither the name of Yii Software nor the names of its
1515
contributors may be used to endorse or promote products derived
1616
from this software without specific prior written permission.
1717

README.md

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The package provides advanced error handling. The features are:
2121
- Production and debug modes.
2222
- Debug mode displays details, stacktrace, has dark and light themes and handy buttons to search for error without typing.
2323
- Takes PHP settings into account.
24-
- Handles out of memory errors, fatals, warnings, notices and exceptions.
24+
- Handles out of memory errors, fatals, warnings, notices and exceptions.
2525
- Can use any PSR-3 compatible logger for error logging.
2626
- Detects response format based on mime type of the request.
2727
- Supports responding with HTML, plain text, JSON, XML and headers out of the box.
@@ -195,9 +195,6 @@ $response = $exceptionResponder->process($request, $handler);
195195
In the application middleware stack `Yiisoft\ErrorHandler\Middleware\ExceptionResponder` must be placed before
196196
`Yiisoft\ErrorHandler\Middleware\ErrorCatcher`.
197197

198-
For use in the [Yii framework](https://www.yiiframework.com/),
199-
see [Yii guide to handling errors](https://github.com/yiisoft/docs/blob/master/guide/en/runtime/handling-errors.md).
200-
201198
## Events
202199

203200
- When `ErrorCatcher` catches an error it dispatches `\Yiisoft\ErrorHandler\Event\ApplicationError` event.
@@ -221,7 +218,6 @@ Code blocks in solution markdown support language syntax highlight:
221218

222219
For example:
223220

224-
````
225221
```html
226222
<html>
227223
<body>
@@ -230,45 +226,21 @@ For example:
230226
</body>
231227
</html>
232228
```
233-
````
234-
235-
## Testing
236-
237-
### Unit testing
238-
239-
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
240-
241-
```shell
242-
./vendor/bin/phpunit
243-
```
244229

245-
### Mutation testing
230+
## Documentation
246231

247-
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
248-
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:
249-
250-
```shell
251-
./vendor/bin/roave-infection-static-analysis-plugin
252-
```
253-
254-
### Static analysis
255-
256-
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
257-
258-
```shell
259-
./vendor/bin/psalm
260-
```
232+
- [Yii guide to handling errors (English)](https://github.com/yiisoft/docs/blob/master/guide/en/runtime/handling-errors.md)
233+
- [Guia Yii para lidar com erros (Português - Brasil)](https://github.com/yiisoft/docs/blob/master/guide/en/runtime/handling-errors.md)
234+
- [Internals](docs/internals.md)
261235

262236
## Credits
263237

264238
The Yii Error Handler use code of [Highlight.js](https://highlightjs.org/) by Ivan Sagalaev and other contributors.
265239

266-
## License
240+
## Support
267241

268-
The Yii Error Handler is free software. It is released under the terms of the BSD License.
269-
Please see [`LICENSE`](./LICENSE.md) for more information.
270-
271-
Maintained by [Yii Software](https://www.yiiframework.com/).
242+
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.
243+
You may also check out other [Yii Community Resources](https://www.yiiframework.com/community).
272244

273245
## Support the project
274246

@@ -281,3 +253,10 @@ Maintained by [Yii Software](https://www.yiiframework.com/).
281253
[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat&logo=telegram)](https://t.me/yii3en)
282254
[![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat&logo=facebook&logoColor=ffffff)](https://www.facebook.com/groups/yiitalk)
283255
[![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat&logo=slack)](https://yiiframework.com/go/slack)
256+
257+
## License
258+
259+
The Yii Error Handler is free software. It is released under the terms of the BSD License.
260+
Please see [`LICENSE`](./LICENSE.md) for more information.
261+
262+
Maintained by [Yii Software](https://www.yiiframework.com/).

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"issues": "https://github.com/yiisoft/error-handler/issues?state=open",
1717
"forum": "https://www.yiiframework.com/forum/",
1818
"wiki": "https://www.yiiframework.com/wiki/",
19-
"irc": "irc://irc.freenode.net/yii",
19+
"irc": "ircs://irc.libera.chat:6697/yii",
2020
"chat": "https://t.me/yii3en",
2121
"source": "https://github.com/yiisoft/error-handler"
2222
},

docs/internals.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Internals
2+
3+
## Unit testing
4+
5+
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
6+
7+
```shell
8+
./vendor/bin/phpunit
9+
```
10+
11+
## Mutation testing
12+
13+
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
14+
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:
15+
16+
```shell
17+
./vendor/bin/roave-infection-static-analysis-plugin
18+
```
19+
20+
## Static analysis
21+
22+
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
23+
24+
```shell
25+
./vendor/bin/psalm
26+
```
27+
28+
## Rector
29+
30+
Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or
31+
use either newest or any specific version of PHP:
32+
33+
```shell
34+
./vendor/bin/rector
35+
```
36+
37+
## Composer require checker
38+
39+
This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`.
40+
41+
To run the checker, execute the following command:
42+
43+
```shell
44+
./vendor/bin/composer-require-checker
45+
```

templates/_call-stack-item.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
</svg>
1919
HTML;
2020
?>
21-
<li class="<?= (!empty($lines) && ($index === 1 || !$isVendorFile)) ? 'application ' : '' ?>call-stack-item"
22-
data-line="<?= (int) ($line - $begin) ?>">
21+
<li class="<?= (!empty($lines) && ($index === 1 || !$isVendorFile)) ? 'application ' : '' ?>call-stack-item" data-line="<?= (int) ($line - $begin) ?>">
2322
<div class="element-wrap">
2423
<div class="flex-1">
2524
<?php if ($file !== null): ?>
@@ -61,4 +60,4 @@
6160
</div>
6261
</div>
6362
<?php endif ?>
64-
</li>
63+
</li>

0 commit comments

Comments
 (0)