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

Fix docs #148

Merged
merged 11 commits into from
May 19, 2024
Merged
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
82 changes: 32 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
<p align="center">
<a href="https://github.com/yiisoft" target="_blank">
<img src="https://yiisoft.github.io/docs/images/yii_logo.svg" height="100px">
<img src="https://yiisoft.github.io/docs/images/yii_logo.svg" height="100px" alt="Yii">
</a>
<a href="https://getbootstrap.com/" target="_blank" rel="external">
<img src="https://v4-alpha.getbootstrap.com/assets/brand/bootstrap-solid.svg" height="100px">
<a href="https://getbootstrap.com/" target="_blank">
<img src="https://v4-alpha.getbootstrap.com/assets/brand/bootstrap-solid.svg" height="100px" alt="Bootstrap">
</a>
<h1 align="center">Yii Framework Twitter Bootstrap 5 Extension</h1>
<br>
</p>

This [Yii Framework] extension encapsulates [Twitter Bootstrap 5] components
and plugins in terms of Yii widgets, and thus makes using Bootstrap components/plugins
in Yii applications extremely easy.

[Yii Framework]: https://www.yiiframework.com/
[Twitter Bootstrap 5.2]: https://getbootstrap.com/docs/5.2/getting-started/introduction/
luizcmarin marked this conversation as resolved.
Show resolved Hide resolved

For license information check the [LICENSE](LICENSE.md)-file.

Documentation is at [docs/guide/README.md](docs/guide/README.md).

[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii-bootstrap5/v/stable.png)](https://packagist.org/packages/yiisoft/yii-bootstrap5)
[![Total Downloads](https://poser.pugx.org/yiisoft/yii-bootstrap5/downloads.png)](https://packagist.org/packages/yiisoft/yii-bootstrap5)
[![Build status](https://github.com/yiisoft/yii-bootstrap5/workflows/build/badge.svg)](https://github.com/yiisoft/yii-bootstrap5/actions?query=workflow%3Abuild)
Expand All @@ -29,13 +18,20 @@ Documentation is at [docs/guide/README.md](docs/guide/README.md).
[![static analysis](https://github.com/yiisoft/yii-bootstrap5/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/yii-bootstrap5/actions?query=workflow%3A%22static+analysis%22)
[![type-coverage](https://shepherd.dev/github/yiisoft/yii-bootstrap5/coverage.svg)](https://shepherd.dev/github/yiisoft/yii-bootstrap5)

Installation
------------
This [Yii Framework] extension encapsulates [Twitter Bootstrap 5] components
and plugins in terms of Yii widgets, and thus makes using Bootstrap components/plugins
in Yii applications extremely easy.

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
## Requirements

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap5
- PHP 8.1 or higher.

## Installation

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

```shell
composer require yiisoft/yii-bootstrap5
```

## Install assets
Expand Down Expand Up @@ -73,69 +69,55 @@ Add to composer.json the following:

Once the changes are made, you can install the assets using the following command:

```php
```shell
composer update
```

2. Using the [npm-asset](https://www.npmjs.com/) package manager.
2. Using the [npm-asset](https://www.npmjs.com/) package manager.

Run the following command at the root directory of your application.

```shell
npm i bootstrap@5.3.1
```


## General usage

For example, the following
single line of code in a view file would render a Bootstrap Progress plugin:
For example, the following single line of code in a view file would render a Bootstrap Progress plugin:

```php
<?= Yiisoft\Yii\Bootstrap5\Progress::widget()
->percent('60')
->label('test') ?>
```

### Unit testing
## Documentation

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
- [Twitter Bootstrap 5.3](https://getbootstrap.com/docs/5.3/getting-started/introduction/)
- Guide: [English](docs/guide/en/README.md), [中国人](docs/guide/zh-CN/README.md), [日本語](docs/guide/ja/README.md), [Português - Brasil](docs/guide/pt-BR/README.md), [Español](docs/guide/es/README.md), [Русский](docs/guide/ru/README.md), [українська](docs/guide/ukr/README.md)
- [Internals](docs/internals.md)

```shell
./vendor/bin/phpunit
```

### Mutation testing

The package tests are checked with [Infection](https://infection.github.io/) mutation framework. To run it:
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).

```shell
./vendor/bin/infection
```

### Static analysis
## License

The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
The Yii Framework Twitter Bootstrap 5 Extension is free software. It is released under the terms of the BSD License.
Please see [`LICENSE`](./LICENSE.md) for more information.

```shell
./vendor/bin/psalm
```
Maintained by [Yii Software](https://www.yiiframework.com/).

### Support the project
## Support the project

[![Open Collective](https://img.shields.io/badge/Open%20Collective-sponsor-7eadf1?logo=open%20collective&logoColor=7eadf1&labelColor=555555)](https://opencollective.com/yiisoft)

### Follow updates
## Follow updates

[![Official website](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](https://www.yiiframework.com/)
[![Twitter](https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter&logoColor=1DA1F2&labelColor=555555?style=flat)](https://twitter.com/yiiframework)
[![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 Framework Twitter Bootstrap 5 Extension 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/).
[Yii Framework]: https://www.yiiframework.com/
[Twitter Bootstrap 5]: https://getbootstrap.com/docs/5.3/getting-started/introduction/
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
],
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii-bootstrap5/issues?state=open",
"source": "https://github.com/yiisoft/yii-bootstrap5",
"issues": "https://github.com/yiisoft/yii-bootstrap5/issues",
"forum": "https://www.yiiframework.com/forum/",
"wiki": "https://www.yiiframework.com/wiki/",
"irc": "ircs://irc.libera.chat:6697/yii",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Der empfohlene Weg zur Installation dieser Erweiterung ist mittels [composer](ht
Führen Sie entweder folgenden Befehlt aus

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap4
composer require yiisoft/yii-bootstrap5
```

oder fügen Sie folgendes
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions docs/guide/README.md → docs/guide/en/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Twitter Bootstrap Extension for Yii
===================================
# Twitter Bootstrap Extension for Yii

The extension includes support for the [Bootstrap 5](https://getbootstrap.com/) markup and components framework
(also known as "Twitter Bootstrap"). Bootstrap is an excellent, responsive framework that can greatly speed up the
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ The preferred way to install this extension is through [composer](https://getcom
Either run

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap5
composer require yiisoft/yii-bootstrap5
```

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ La mejor manera para instalar esta extensión es a través de [composer](https:/
Ejecuta

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap4
composer require yiisoft/yii-bootstrap5
```

o añade
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
下記のコマンドを実行してください。

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap4
composer require yiisoft/yii-bootstrap5
```

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A maneira recomendada para instalar esta extensão é através do [composer](htt
Então rode

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap4
composer require yiisoft/yii-bootstrap5
```

Ou Adicione
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Для этого запустите команду

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap4
composer require yiisoft/yii-bootstrap5
```

или добавьте
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Запустіть

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap4
composer require yiisoft/yii-bootstrap5
```

або додайте
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
直接运行

```
php composer.phar require --prefer-dist yiisoft/yii-bootstrap4
composer require yiisoft/yii-bootstrap5
```

或者在项目目录的 `composer.json` 文件中添加如下代码
Expand Down
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions docs/internals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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
```
Loading