Skip to content

Commit

Permalink
Docs folder standardization and other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luizcmarin committed Apr 19, 2024
1 parent 5e021a1 commit bd91bee
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 13 deletions.
8 changes: 4 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Copyright © 2008 by Yii Software (https://www.yiiframework.com/)
Copyright © 2008 by Yii Software (<https://www.yiiframework.com/>)
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.

Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,28 @@ The package could be installed via composer:
composer require yiisoft/db-oracle
```

## Usage
## Documentation

For config connection to Oracle database check [Connecting Oracle](https://github.com/yiisoft/db/blob/master/docs/en/connection/oracle.md).
English:

[Check the documentation docs](https://github.com/yiisoft/db/blob/master/docs/en/README.md) to learn about usage.
- For config connection to Mysql, MariaDb database check [Connecting MySQL/MariaDb](https://github.com/yiisoft/db/blob/master/docs/en/connection/oracle.md)
- [Check the documentation](https://github.com/yiisoft/db/blob/master/docs/en/README.md) to learn about usage

## Testing
Portuguese - Brazil:

[Check the documentation](/docs/en/testing.md) to learn about testing.
- For config connection to Mysql, MariaDb database check [Connecting MySQL/MariaDb](https://github.com/yiisoft/db/blob/master/docs/pt-BR/connection/mysql.md)
- [Check the documentation](https://github.com/yiisoft/db/blob/master/docs/pt-BR/README.md) to learn about usage

Testing:

- [English](docs/guide/en/testing.md)
- [Portuguese - Brazil](docs/guide/pt-BR/testing.md)
- More information can be found in the [Internals.](docs/internals.md)

## Support

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

Expand All @@ -65,7 +78,7 @@ For config connection to Oracle database check [Connecting Oracle](https://githu

## License

The Yii Framework Oracle Extension is free software. It is released under the terms of the BSD License.
The Yii Access 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/).
69 changes: 69 additions & 0 deletions docs/guide/en/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Testing

## Github actions

All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/db-oracle/blob/master/.github/CONTRIBUTING.md) in the cloud.

> Note: We recommend pull requesting in draft mode until all tests pass.
## Docker image

For greater ease it is recommended to use docker containers, for this you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that is in the docs folder.

1. [Oracle 21](/docker-compose.yml)

For running the docker containers you can use the following command:

```shell
docker compose up -d
```

## Unit testing

The package is tested with [PHPUnit](https://phpunit.de/).

The following steps are required to run the tests:

1. Run the docker container for the dbms.
2. Install the dependencies of the project with composer.
3. Run the 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
```

## Composer require checker

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
```
44 changes: 44 additions & 0 deletions docs/guide/pt-BR/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Testing

## Github actions

All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/db-mysql/blob/master/.github/CONTRIBUTING.md) in the cloud.

> Note: We recommend pull requesting in draft mode until all tests pass.
## Docker image

For greater ease it is recommended to use docker containers, for this you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that is in the docs folder.

1. [MySQL 8](../../../docker-compose.yml)
2. [MariaDB 10.11](../../../docker-compose-mariadb.yml)

For running the docker containers you can use the following command:

MySQL 8.0.

```dockerfile
docker compose up -d
```

MariaDB 10.11.

```dockerfile
docker compose -f docker-compose-mariadb.yml up -d
```

## Unit testing

The package is tested with [PHPUnit](https://phpunit.de/).

The following steps are required to run the tests:

1. Run the docker container for the dbms.
2. Install the dependencies of the project with composer.
3. Run the tests.

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

- More information can be found in the [Internals.](../../internals.md)
5 changes: 2 additions & 3 deletions docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ use either newest or any specific version of PHP:
./vendor/bin/rector
```

## Dependencies
## Composer require checker

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

Expand Down

0 comments on commit bd91bee

Please sign in to comment.