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

Docs folder standardization and other fixes #296

Merged
merged 5 commits into from
Apr 16, 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
17 changes: 9 additions & 8 deletions docs/en/testing.md → docs/internals.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Testing
# Internals

## Github actions

Expand All @@ -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:
Expand All @@ -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:

Expand Down
51 changes: 0 additions & 51 deletions docs/pt-BR/testing.md

This file was deleted.

2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" failOnRisky="true" failOnWarning="true" executionOrder="default" resolveDependencies="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd">
<phpunit xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" failOnRisky="true" failOnWarning="true" executionOrder="default" resolveDependencies="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd">
<coverage/>
<php>
<ini name="error_reporting" value="-1"/>
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
Expand Down
2 changes: 1 addition & 1 deletion psalm4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
Expand Down
2 changes: 1 addition & 1 deletion src/DQLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,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);
Expand Down
2 changes: 1 addition & 1 deletion src/Dsn.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/SqlTokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading