From 7c5fa69605b4bc2eef1c3e520555b69767d4c8f2 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Sat, 4 May 2024 08:33:04 -0300 Subject: [PATCH 1/6] Fix docs --- README.md | 2 +- docs/guide/en/README.md | 6 ---- docs/guide/pt-BR/README.md | 8 +---- docs/internals.md | 62 ++++++++++++++++++++++++++++++++++++- docs/testing.md | 63 -------------------------------------- 5 files changed, 63 insertions(+), 78 deletions(-) delete mode 100644 docs/testing.md diff --git a/README.md b/README.md index 7d5590e53..aa6659772 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

Yii Database is a framework-agnostic package to work with different types of databases, -such as [MariaDB], [MSSQL], [MySQL], [Oracle], [PostgreSQL], and [SQLite]. +such as [MariaDB], [MSSQL], [MySQL], [Oracle], [PostgreSQL] and [SQLite]. Using the package, you can perform common database tasks such as creating, reading, updating, and deleting records in a database table, as well as executing raw SQL queries. diff --git a/docs/guide/en/README.md b/docs/guide/en/README.md index dfe593cc2..831656a23 100644 --- a/docs/guide/en/README.md +++ b/docs/guide/en/README.md @@ -23,10 +23,6 @@ Yii DB supports the following databases out of the box: - [PostgreSQL](https://www.postgresql.org/) of versions **9.6 - 15**. - [SQLite](https://www.sqlite.org/) of version **3.3 and above**. -## Requirements - -- PHP 8.0 or higher. - ## Installation To install Yii DB, you must select the driver you want to use and install it with [Composer](https://getcomposer.org/). @@ -61,8 +57,6 @@ For [SQLite](https://github.com/yiisoft/db-sqlite): composer require yiisoft/db-sqlite ``` -## Prerequisites - ## Configure schema cache First, you need to [configure database schema cache](schema/cache.md). diff --git a/docs/guide/pt-BR/README.md b/docs/guide/pt-BR/README.md index b5c3dc7e9..bac6e08bc 100644 --- a/docs/guide/pt-BR/README.md +++ b/docs/guide/pt-BR/README.md @@ -23,11 +23,7 @@ Yii DB suporta os seguintes bancos de dados prontos para uso: - [PostgreSQL](https://www.postgresql.org/) das versões **9.6 - 15**. - [SQLite](https://www.sqlite.org/) da versão **3.3 e superior**. -## Requerimentos - -- PHP 8.0 or higher. - -## Instalação +## Installation Para instalar o Yii DB, você deve selecionar o driver que deseja usar e instalá-lo com o [Composer](https://getcomposer.org/). @@ -61,8 +57,6 @@ Para [SQLite](https://github.com/yiisoft/db-sqlite): composer require yiisoft/db-sqlite ``` -## Pré-requisitos - ## Configurar cache de esquema Primeiro, você precisa [configurar o cache do esquema do banco de dados](schema/cache.md). diff --git a/docs/internals.md b/docs/internals.md index 6598f764c..6e9583ff2 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -1,6 +1,66 @@ # Internals -- [Testing](./testing.md) +This package can be tested globally or individually for each DBMS. + +- [MSSQL](https://github.com/yiisoft/db-mssql) +- [MySQL/MariaDB](https://github.com/yiisoft/db-mysql) +- [Oracle](https://github.com/yiisoft/db-oracle) +- [PostgreSQL](https://github.com/yiisoft/db-pgsql) +- [SQLite](https://github.com/yiisoft/db-sqlite) + +## Github actions + +All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/db/blob/master/.github/CONTRIBUTING.md) in the cloud. + +> Note: We recommend pull requesting in draft mode until all tests pass. + +## Docker images + +For greater ease it is recommended to use Docker containers for each DBMS, for this you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that in the root directory of each package. + +- [MSSQL 2022](https://github.com/yiisoft/db-mssql/blob/master/docker-compose.yml) +- [MySQL 8](https://github.com/yiisoft/db-mysql/blob/master/docker-compose.yml) +- [MariaDB 10.11](https://github.com/yiisoft/db-mysql/blob/master/docker-compose-mariadb.yml) +- [Oracle 21](https://github.com/yiisoft/db-oracle/blob/master/docker-compose.yml) +- [PostgreSQL 15](https://github.com/yiisoft/db-pgsql/blob/master/docker-compose.yml) + +For running the Docker containers you can use the following command: + +```shell +docker compose up -d +``` + +### Global testing + +The package is tested with [PHPUnit](https://phpunit.de/). To run tests: + +1. Run all Docker containers for each dbms. +2. Install the dependencies of the project with composer. +3. Run the tests. + +```shell +./vendor/bin/phpunit +``` + +### Individual testing + +The package is tested with [PHPUnit](https://phpunit.de/). To run tests: + +1. Run the Docker container for the dbms you want to test. +2. Install the dependencies of the project with composer. +3. Run the tests. + +```shell +./vendor/bin/phpunit --testsuite=Pgsql +``` + +Suites available: + +- Mssql +- Mysql +- Oracle +- Pgsql +- Sqlite ## Static analysis diff --git a/docs/testing.md b/docs/testing.md deleted file mode 100644 index fa26b9ab1..000000000 --- a/docs/testing.md +++ /dev/null @@ -1,63 +0,0 @@ -# Testing - -This package can be tested globally or individually for each DBMS. - -- [MSSQL](https://github.com/yiisoft/db-mssql) -- [MySQL/MariaDB](https://github.com/yiisoft/db-mysql) -- [Oracle](https://github.com/yiisoft/db-oracle) -- [PostgreSQL](https://github.com/yiisoft/db-pgsql) -- [SQLite](https://github.com/yiisoft/db-sqlite) - -## Github actions - -All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/db/blob/master/.github/CONTRIBUTING.md) in the cloud. - -> Note: We recommend pull requesting in draft mode until all tests pass. - -## Docker images - -For greater ease it is recommended to use Docker containers for each DBMS, for this you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that in the root directory of each package. - -- [MSSQL 2022](https://github.com/yiisoft/db-mssql/blob/master/docker-compose.yml) -- [MySQL 8](https://github.com/yiisoft/db-mysql/blob/master/docker-compose.yml) -- [MariaDB 10.11](https://github.com/yiisoft/db-mysql/blob/master/docker-compose-mariadb.yml) -- [Oracle 21](https://github.com/yiisoft/db-oracle/blob/master/docker-compose.yml) -- [PostgreSQL 15](https://github.com/yiisoft/db-pgsql/blob/master/docker-compose.yml) - -For running the Docker containers you can use the following command: - -```shell -docker compose up -d -``` - -### Global testing - -The following steps are required to run the tests. - -1. Run all Docker containers for each dbms. -2. Install the dependencies of the project with composer. -3. Run the tests. - -```shell -vendor/bin/phpunit -``` - -### Individual testing - -The following steps are required to run the tests. - -1. Run the Docker container for the dbms you want to test. -2. Install the dependencies of the project with composer. -3. Run the tests. - -```shell -vendor/bin/phpunit --testsuite=Pgsql -``` - -Suites available: - -- Mssql -- Mysql -- Oracle -- Pgsql -- Sqlite From 27bf4f6458b4d78cb3670006547c64ceeb2fe12b Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Mon, 6 May 2024 07:02:42 -0300 Subject: [PATCH 2/6] Update file --- docs/guide/en/README.md | 2 +- docs/guide/pt-BR/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/en/README.md b/docs/guide/en/README.md index 831656a23..f531cd9cd 100644 --- a/docs/guide/en/README.md +++ b/docs/guide/en/README.md @@ -25,7 +25,7 @@ Yii DB supports the following databases out of the box: ## Installation -To install Yii DB, you must select the driver you want to use and install it with [Composer](https://getcomposer.org/). +To install Yii DB, you must select the driver you want to use and install it with [Composer](https://getcomposer.org). For [MSSQL](https://github.com/yiisoft/db-mssql): diff --git a/docs/guide/pt-BR/README.md b/docs/guide/pt-BR/README.md index bac6e08bc..6b06bd86d 100644 --- a/docs/guide/pt-BR/README.md +++ b/docs/guide/pt-BR/README.md @@ -25,7 +25,7 @@ Yii DB suporta os seguintes bancos de dados prontos para uso: ## Installation -Para instalar o Yii DB, você deve selecionar o driver que deseja usar e instalá-lo com o [Composer](https://getcomposer.org/). +Para instalar o Yii DB, você deve selecionar o driver que deseja usar e instalá-lo com o [Composer](https://getcomposer.org). Para [MSSQL](https://github.com/yiisoft/db-mssql): From 30c81070a79851f0dcd8dbe92bbb6f1d2b8607f8 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Mon, 6 May 2024 07:59:56 -0300 Subject: [PATCH 3/6] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aa6659772..7fbc25a12 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,13 @@

Yii Database

+[![Latest Stable Version](https://poser.pugx.org/yiisoft/db/v/stable.png)](https://packagist.org/packages/yiisoft/db) +[![Total Downloads](https://poser.pugx.org/yiisoft/db/downloads.png)](https://packagist.org/packages/yiisoft/db) +[![Build status](https://github.com/yiisoft/db/workflows/build/badge.svg)](https://github.com/yiisoft/db/actions?query=workflow%3Abuild) +[![codecov](https://codecov.io/gh/yiisoft/db/branch/master/graph/badge.svg?token=pRr4gci2qj)](https://codecov.io/gh/yiisoft/db) +[![static analysis](https://github.com/yiisoft/db/actions/workflows/static.yml/badge.svg?branch=dev)](https://github.com/yiisoft/db/actions/workflows/static.yml) +[![type-coverage](https://shepherd.dev/github/yiisoft/db/coverage.svg)](https://shepherd.dev/github/yiisoft/db) + Yii Database is a framework-agnostic package to work with different types of databases, such as [MariaDB], [MSSQL], [MySQL], [Oracle], [PostgreSQL] and [SQLite]. @@ -35,13 +42,6 @@ similar to the way you would use ORM (Object-Relational Mapping) frameworks like [PostgreSQL]: https://www.postgresql.org [SQLite]: https://www.sqlite.org -[![Latest Stable Version](https://poser.pugx.org/yiisoft/db/v/stable.png)](https://packagist.org/packages/yiisoft/db) -[![Total Downloads](https://poser.pugx.org/yiisoft/db/downloads.png)](https://packagist.org/packages/yiisoft/db) -[![Build status](https://github.com/yiisoft/db/workflows/build/badge.svg)](https://github.com/yiisoft/db/actions?query=workflow%3Abuild) -[![codecov](https://codecov.io/gh/yiisoft/db/branch/master/graph/badge.svg?token=pRr4gci2qj)](https://codecov.io/gh/yiisoft/db) -[![static analysis](https://github.com/yiisoft/db/actions/workflows/static.yml/badge.svg?branch=dev)](https://github.com/yiisoft/db/actions/workflows/static.yml) -[![type-coverage](https://shepherd.dev/github/yiisoft/db/coverage.svg)](https://shepherd.dev/github/yiisoft/db) - ## Requirements - PHP 8.0 or higher. From 4dc41fc10963631152c80926c4502c771531be37 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Mon, 6 May 2024 10:13:46 -0300 Subject: [PATCH 4/6] Update UPGRADE.md --- UPGRADE.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 6b040126c..17d983ad5 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,7 +1,11 @@ -# Upgrading Instructions for Yii Database - -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. +# Yii Database Upgrading Instructions + +> **!!!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.x to 2.x From e0241e7450fd7846c49e9f3446bc01db323ce4c2 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 7 May 2024 19:41:24 +0300 Subject: [PATCH 5/6] fix --- docs/internals.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/internals.md b/docs/internals.md index 6e9583ff2..0cc24e347 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -1,5 +1,7 @@ # Internals +## Unit testing + This package can be tested globally or individually for each DBMS. - [MSSQL](https://github.com/yiisoft/db-mssql) @@ -8,13 +10,13 @@ This package can be tested globally or individually for each DBMS. - [PostgreSQL](https://github.com/yiisoft/db-pgsql) - [SQLite](https://github.com/yiisoft/db-sqlite) -## Github actions +### Github actions All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/db/blob/master/.github/CONTRIBUTING.md) in the cloud. > Note: We recommend pull requesting in draft mode until all tests pass. -## Docker images +### Docker images For greater ease it is recommended to use Docker containers for each DBMS, for this you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that in the root directory of each package. From 862f7890e408e43b177612176ea021bc9504c673 Mon Sep 17 00:00:00 2001 From: Sergei Tigrov Date: Fri, 10 May 2024 10:21:15 +0700 Subject: [PATCH 6/6] Update docs/internals.md --- docs/internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/internals.md b/docs/internals.md index 0cc24e347..ba6f53a30 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -36,7 +36,7 @@ docker compose up -d The package is tested with [PHPUnit](https://phpunit.de/). To run tests: -1. Run all Docker containers for each dbms. +1. Run all Docker containers for each DBMS. 2. Install the dependencies of the project with composer. 3. Run the tests.