From c5ceb7ad5a369e9dfb2af0b3938a373ce78598ed Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:56:55 -0300 Subject: [PATCH 01/10] translation into Brazilian Portuguese --- docs/pt-BR/testing.md | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 docs/pt-BR/testing.md diff --git a/docs/pt-BR/testing.md b/docs/pt-BR/testing.md new file mode 100644 index 00000000..7d20dbe5 --- /dev/null +++ b/docs/pt-BR/testing.md @@ -0,0 +1,51 @@ +# Testes + +## Ações do Github + +Todos os nossos pacotes possuem ações do github por padrão, então você pode testar sua [contribuição](https://github.com/yiisoft/db-sqlite/blob/master/.github/CONTRIBUTING.md) na nuvem. + +> Observação: recomendamos a solicitação pull no modo rascunho até que todos os testes sejam aprovados. + +## Teste de unidade + +O pacote é testado com [PHPUnit](https://phpunit.de/). + +```shell +vendor/bin/phpunit +``` + +### Teste de mutação + +Os testes do pacote são verificados com a estrutura de mutação [Infection](https://infection.github.io/) e com +[plugin de análise estática de infecção](https://github.com/Roave/infection-static-analysis-plugin). Para executá-lo: + +```shell +./vendor/bin/roave-infection-static-analysis-plugin +``` + +## Análise estática + +O código é analisado estaticamente com [Psalm](https://psalm.dev/). Para executar a análise estática: + +```shell +./vendor/bin/psalm +``` + +## Reitor + +Use [Rector](https://github.com/rectorphp/rector) para fazer a base de código seguir algumas regras específicas ou +use a versão mais recente ou qualquer versão específica do PHP: + +```shell +./vendor/bin/rector +``` + +## Composer requer verificador + +Este pacote usa [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) para verificar se todas as dependências estão definidas corretamente em `composer.json`. + +Para executar o verificador, execute o seguinte comando: + +```shell +./vendor/bin/composer-require-checker +``` From b52afa7bf5388d699d93f853e312a7847840ee90 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:27:14 -0300 Subject: [PATCH 02/10] Docs folder standardization and other fixes Differences from the testing.md file have been added to the internals.md file --- README.md | 4 +-- docs/{en/testing.md => internals.md} | 17 +++++----- docs/pt-BR/testing.md | 51 ---------------------------- phpunit.xml.dist | 2 +- psalm.xml | 2 +- psalm4.xml | 2 +- src/DQLQueryBuilder.php | 2 +- src/Dsn.php | 2 +- src/SqlTokenizer.php | 2 +- src/Transaction.php | 2 +- 10 files changed, 18 insertions(+), 68 deletions(-) rename docs/{en/testing.md => internals.md} (70%) delete mode 100644 docs/pt-BR/testing.md diff --git a/README.md b/README.md index 8b66401e..8ee37330 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,11 @@ perform advanced database operations such as joins and aggregates. The package could be installed via composer: -```php +```shell composer require yiisoft/db-sqlite ``` -## Usage +## Usage For config connection to SQLite database check [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/en/connection/sqlite.md). diff --git a/docs/en/testing.md b/docs/internals.md similarity index 70% rename from docs/en/testing.md rename to docs/internals.md index 49d60d0e..30ec7ee4 100644 --- a/docs/en/testing.md +++ b/docs/internals.md @@ -1,4 +1,4 @@ -# Testing +# Internals ## Github actions @@ -8,13 +8,13 @@ All our packages have github actions by default, so you can test your [contribut ## Unit testing -The package is tested with [PHPUnit](https://phpunit.de/). +The package is tested with [PHPUnit](https://phpunit.de/). To run tests: ```shell -vendor/bin/phpunit +./vendor/bin/phpunit ``` -### Mutation testing +## 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: @@ -33,16 +33,17 @@ The code is statically analyzed with [Psalm](https://psalm.dev/). To run static ## 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: +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 +## Dependencies -This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`. +Use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to detect transitive +[Composer](https://getcomposer.org/) dependencies. To run the checker, execute the following command: diff --git a/docs/pt-BR/testing.md b/docs/pt-BR/testing.md deleted file mode 100644 index 7d20dbe5..00000000 --- a/docs/pt-BR/testing.md +++ /dev/null @@ -1,51 +0,0 @@ -# Testes - -## Ações do Github - -Todos os nossos pacotes possuem ações do github por padrão, então você pode testar sua [contribuição](https://github.com/yiisoft/db-sqlite/blob/master/.github/CONTRIBUTING.md) na nuvem. - -> Observação: recomendamos a solicitação pull no modo rascunho até que todos os testes sejam aprovados. - -## Teste de unidade - -O pacote é testado com [PHPUnit](https://phpunit.de/). - -```shell -vendor/bin/phpunit -``` - -### Teste de mutação - -Os testes do pacote são verificados com a estrutura de mutação [Infection](https://infection.github.io/) e com -[plugin de análise estática de infecção](https://github.com/Roave/infection-static-analysis-plugin). Para executá-lo: - -```shell -./vendor/bin/roave-infection-static-analysis-plugin -``` - -## Análise estática - -O código é analisado estaticamente com [Psalm](https://psalm.dev/). Para executar a análise estática: - -```shell -./vendor/bin/psalm -``` - -## Reitor - -Use [Rector](https://github.com/rectorphp/rector) para fazer a base de código seguir algumas regras específicas ou -use a versão mais recente ou qualquer versão específica do PHP: - -```shell -./vendor/bin/rector -``` - -## Composer requer verificador - -Este pacote usa [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) para verificar se todas as dependências estão definidas corretamente em `composer.json`. - -Para executar o verificador, execute o seguinte comando: - -```shell -./vendor/bin/composer-require-checker -``` diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c65978bb..b4003563 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/psalm.xml b/psalm.xml index 906206a6..0a53528c 100644 --- a/psalm.xml +++ b/psalm.xml @@ -3,7 +3,7 @@ errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="false" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > diff --git a/psalm4.xml b/psalm4.xml index 10d319ae..36d7a96e 100644 --- a/psalm4.xml +++ b/psalm4.xml @@ -3,7 +3,7 @@ errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="false" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > diff --git a/src/DQLQueryBuilder.php b/src/DQLQueryBuilder.php index 1faa2b0c..6f1bf494 100644 --- a/src/DQLQueryBuilder.php +++ b/src/DQLQueryBuilder.php @@ -92,7 +92,7 @@ public function buildLimit(ExpressionInterface|int|null $limit, ExpressionInterf /** * Limit isn't optional in SQLite. * - * {@see http://www.sqlite.org/syntaxdiagrams.html#select-stmt} + * {@see https://www.sqlite.org/syntaxdiagrams.html#select-stmt} */ $sql = 'LIMIT 9223372036854775807 OFFSET ' . // 2^63-1 ($offset instanceof ExpressionInterface ? $this->buildExpression($offset) : (string)$offset); diff --git a/src/Dsn.php b/src/Dsn.php index 37f0c1cf..8806397a 100644 --- a/src/Dsn.php +++ b/src/Dsn.php @@ -24,7 +24,7 @@ public function __construct(private string $driver, private string|null $databas /** * @return string The Data Source Name, or DSN, has the information required to connect to the database. * - * Please refer to the [PHP manual](http://php.net/manual/en/pdo.construct.php) on the format of the DSN string. + * Please refer to the [PHP manual](https://php.net/manual/en/pdo.construct.php) on the format of the DSN string. * * The `driver` array key is used as the driver prefix of the DSN, all further key-value pairs are rendered as * `key=value` and concatenated by `;`. For example: diff --git a/src/SqlTokenizer.php b/src/SqlTokenizer.php index 54a4154a..7db891d2 100644 --- a/src/SqlTokenizer.php +++ b/src/SqlTokenizer.php @@ -12,7 +12,7 @@ * * It's used to obtain `CHECK` constraint information from a `CREATE TABLE` SQL code. * - * @link http://www.sqlite.org/draft/tokenreq.html + * @link https://www.sqlite.org/draft/tokenreq.html * @link https://sqlite.org/lang.html */ final class SqlTokenizer extends AbstractTokenizer diff --git a/src/Transaction.php b/src/Transaction.php index 2256e473..15731a29 100644 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -29,7 +29,7 @@ final class Transaction extends AbstractPdoTransaction * @throws Throwable When unsupported isolation levels are used. SQLite only supports `SERIALIZABLE` * and `READ UNCOMMITTED`. * - * @link http://www.sqlite.org/pragma.html#pragma_read_uncommitted + * @link https://www.sqlite.org/pragma.html#pragma_read_uncommitted */ protected function setTransactionIsolationLevel(string $level): void { From 82de2a8682cdf45db661001d29a595536d37d4a7 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:11:45 -0300 Subject: [PATCH 03/10] IRC link fix and update xml files --- composer.json | 2 +- phpunit.xml.dist | 2 +- psalm.xml | 2 +- psalm4.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 1130051a..94622861 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "forum": "https://www.yiiframework.com/forum/", "wiki": "https://www.yiiframework.com/wiki/", "chat": "https://t.me/yii3en", - "irc": "irc://irc.freenode.net/yii" + "irc": "ircs://irc.libera.chat:6697/yii" }, "require": { "php": "^8.0", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b4003563..368ef3ec 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/psalm.xml b/psalm.xml index 0a53528c..906206a6 100644 --- a/psalm.xml +++ b/psalm.xml @@ -3,7 +3,7 @@ errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="false" - xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > diff --git a/psalm4.xml b/psalm4.xml index 36d7a96e..10d319ae 100644 --- a/psalm4.xml +++ b/psalm4.xml @@ -3,7 +3,7 @@ errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="false" - xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > From ed07507d9e695cb06f18fd2a0677fb1b57b35a92 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:12:23 -0300 Subject: [PATCH 04/10] Docs folder standardization and other fixes --- LICENSE.md | 8 +++---- README.md | 25 ++++++++++++++++----- docs/guide/en/testing.md | 44 +++++++++++++++++++++++++++++++++++++ docs/guide/pt-BR/testing.md | 44 +++++++++++++++++++++++++++++++++++++ docs/internals.md | 11 ++-------- 5 files changed, 113 insertions(+), 19 deletions(-) create mode 100644 docs/guide/en/testing.md create mode 100644 docs/guide/pt-BR/testing.md diff --git a/LICENSE.md b/LICENSE.md index bc5674fe..6a920d60 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,17 +1,17 @@ -Copyright © 2008 by Yii Software (https://www.yiiframework.com/) +Copyright © 2008 by Yii Software () 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. diff --git a/README.md b/README.md index 8ee37330..f86fdadf 100644 --- a/README.md +++ b/README.md @@ -40,15 +40,28 @@ The package could be installed via composer: composer require yiisoft/db-sqlite ``` -## Usage +## Documentation -For config connection to SQLite database check [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/en/connection/sqlite.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 SQLite database check [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/en/connection/sqlite.md) +- [Check the documentation docs](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 SQLite database check [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/pt-BR/connection/sqlite.md) +- [Check the documentation docs](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 @@ -64,7 +77,7 @@ For config connection to SQLite database check [Connecting SQLite](https://githu ## License -The Yii DataBase SQLite 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/). diff --git a/docs/guide/en/testing.md b/docs/guide/en/testing.md new file mode 100644 index 00000000..5475ee5d --- /dev/null +++ b/docs/guide/en/testing.md @@ -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) diff --git a/docs/guide/pt-BR/testing.md b/docs/guide/pt-BR/testing.md new file mode 100644 index 00000000..5475ee5d --- /dev/null +++ b/docs/guide/pt-BR/testing.md @@ -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) diff --git a/docs/internals.md b/docs/internals.md index 30ec7ee4..8dc4049f 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -1,11 +1,5 @@ # Internals -## Github actions - -All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/db-sqlite/blob/master/.github/CONTRIBUTING.md) in the cloud. - -> Note: We recommend pull requesting in draft mode until all tests pass. - ## Unit testing The package is tested with [PHPUnit](https://phpunit.de/). To run tests: @@ -40,10 +34,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: From c91da323addff12c852094e1cacb76df057c2e2e Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:36:29 -0300 Subject: [PATCH 05/10] Update README.md Co-authored-by: Alexander Makarov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f86fdadf..7ae15c2c 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ composer require yiisoft/db-sqlite English: - For config connection to SQLite database check [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/en/connection/sqlite.md) -- [Check the documentation docs](https://github.com/yiisoft/db/blob/master/docs/en/README.md) to learn about usage. +- [Check the yiisoft/db docs](https://github.com/yiisoft/db/blob/master/docs/en/README.md) to learn about usage. Portuguese - Brazil: From 13d945b4485e3e99fc51b926e91b36a0ee7188a8 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Sat, 20 Apr 2024 05:44:56 -0300 Subject: [PATCH 06/10] Update internals --- README.md | 2 +- docs/guide/en/testing.md | 44 ------------------------------------- docs/guide/pt-BR/testing.md | 44 ------------------------------------- docs/internals.md | 37 +++++++++++++++++++++++++++++-- 4 files changed, 36 insertions(+), 91 deletions(-) delete mode 100644 docs/guide/en/testing.md delete mode 100644 docs/guide/pt-BR/testing.md diff --git a/README.md b/README.md index 7ae15c2c..5ab07558 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ You may also check out other [Yii Community Resources](https://www.yiiframework. ## License -The Yii Access is free software. It is released under the terms of the BSD License. +The Yii DataBase SQLite 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/). diff --git a/docs/guide/en/testing.md b/docs/guide/en/testing.md deleted file mode 100644 index 5475ee5d..00000000 --- a/docs/guide/en/testing.md +++ /dev/null @@ -1,44 +0,0 @@ -# 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) diff --git a/docs/guide/pt-BR/testing.md b/docs/guide/pt-BR/testing.md deleted file mode 100644 index 5475ee5d..00000000 --- a/docs/guide/pt-BR/testing.md +++ /dev/null @@ -1,44 +0,0 @@ -# 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) diff --git a/docs/internals.md b/docs/internals.md index 8dc4049f..e0ad2317 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -1,11 +1,44 @@ # Internals +## 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/). To run tests: +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 +vendor/bin/phpunit ``` ## Mutation testing From 8a5423b654c87c6ae477aa24771938c3e41aabe1 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Sat, 20 Apr 2024 05:54:16 -0300 Subject: [PATCH 07/10] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5ab07558..05652687 100644 --- a/README.md +++ b/README.md @@ -49,13 +49,11 @@ English: Portuguese - Brazil: -- For config connection to SQLite database check [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/pt-BR/connection/sqlite.md) -- [Check the documentation docs](https://github.com/yiisoft/db/blob/master/docs/pt-BR/README.md) to learn about usage. +- Para configurar a conexão com o SQLite leia [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/pt-BR/connection/sqlite.md) +- [Check the documentation docs](https://github.com/yiisoft/db/blob/master/docs/pt-BR/README.md) para aprender como usar. 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 From 65f13d28b9177c757d4b1151d8daaf4a238994c4 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Sat, 20 Apr 2024 06:28:50 -0300 Subject: [PATCH 08/10] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 05652687..3eb40765 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,8 @@ English: Portuguese - Brazil: -- Para configurar a conexão com o SQLite leia [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/pt-BR/connection/sqlite.md) -- [Check the documentation docs](https://github.com/yiisoft/db/blob/master/docs/pt-BR/README.md) para aprender como usar. +- Para configurar a conexão com o SQLite leia [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/pt-BR/connection/sqlite.md). +- [Confira a documentação](https://github.com/yiisoft/db/blob/master/docs/pt-BR/README.md) para aprender como usar. Testing: From 532b5104f4ef016edd66f531bd2bde8b67f0608e Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Sun, 21 Apr 2024 06:32:22 -0300 Subject: [PATCH 09/10] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3eb40765..b1342bea 100644 --- a/README.md +++ b/README.md @@ -47,14 +47,14 @@ English: - For config connection to SQLite database check [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/en/connection/sqlite.md) - [Check the yiisoft/db docs](https://github.com/yiisoft/db/blob/master/docs/en/README.md) to learn about usage. -Portuguese - Brazil: +Português - Brasil: - Para configurar a conexão com o SQLite leia [Connecting SQLite](https://github.com/yiisoft/db/blob/master/docs/pt-BR/connection/sqlite.md). - [Confira a documentação](https://github.com/yiisoft/db/blob/master/docs/pt-BR/README.md) para aprender como usar. Testing: -- More information can be found in the [Internals.](docs/internals.md) +- [Internals](docs/internals.md) ## Support From f71060d24810eb0dd9a232a2f462aea27d395103 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 23 Apr 2024 00:17:11 +0300 Subject: [PATCH 10/10] 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 ef7dc88a..4966a62b 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -2,7 +2,7 @@ ## 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. +All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/db-sqlite/blob/master/.github/CONTRIBUTING.md) in the cloud. > Note: We recommend pull requesting in draft mode until all tests pass.