Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
luizcmarin committed May 6, 2024
1 parent da1a178 commit 1ff1c6e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 41 deletions.
44 changes: 6 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ The package provides:

## Installation

The package could be installed with [Composer](https://getcomposer.org):

```shell
composer require yiisoft/strings
```
Expand Down Expand Up @@ -241,46 +243,12 @@ if ($regexp->matches('second')) {
}
```

## 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

The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:

```shell
./vendor/bin/psalm
```

### Code style

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
```
## Documentation

### Dependencies
- [Internals](docs/internals.md)

Use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to detect transitive
[Composer](https://getcomposer.org/) dependencies.
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).

## License

Expand Down
10 changes: 7 additions & 3 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Upgrading Instructions
# Yii Strings Upgrading Instructions

These notes highlight changes that could break your application when you upgrade package from one version to another.

Upgrading in general is as simple as updating your dependency in your `composer.json` and running `composer update`.
In a big application however there may be more things to consider, which are explained in the following.

> Note: The following upgrading instructions are cumulative. That is, if you want to upgrade from a version A to version
> C and there is a version B between A and C, you need to follow the instructions for both A and B.
> **!!!IMPORTANT!!!**
>
> The following upgrading instructions are *cumulative*. That is,
> if you want to upgrade from version A to version C and there is
> version B between A and C, you need to following the instructions
> for both A and B.
## Upgrade from 1.2.0

Expand Down
45 changes: 45 additions & 0 deletions docs/internals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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
```

## Code style

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

This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`.

To run the checker, execute the following command:

```shell
./vendor/bin/composer-require-checker
```

0 comments on commit 1ff1c6e

Please sign in to comment.