Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into column_type_classes2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed May 24, 2024
2 parents 6065471 + 74594d9 commit 64f3211
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 42 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Enh #255: Implement `SqlParser` and `ExpressionBuilder` driver classes (@Tigrov)
- Enh #236: Implement `ColumnSchemaInterface` classes according to the data type of database table columns
for type casting performance. Related with yiisoft/db#752 (@Tigrov)
- Chg #272: Replace call of `SchemaInterface::getRawTableName()` to `QuoterInterface::getRawTableName()` (@Tigrov)

## 1.3.0 March 21, 2024

Expand Down
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
<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://www.oracle.com/database/technologies/" target="_blank">
<img src="https://avatars3.githubusercontent.com/u/4430336" height="100px">
<img src="https://avatars3.githubusercontent.com/u/4430336" height="100px" alt="Oracle">
</a>
<h1 align="center">Oracle driver for Yii Database</h1>
<h1 align="center">Yii Database Oracle driver</h1>
<br>
</p>

[![Latest Stable Version](https://poser.pugx.org/yiisoft/db-oracle/v/stable.png)](https://packagist.org/packages/yiisoft/db-oracle)
[![Total Downloads](https://poser.pugx.org/yiisoft/db-oracle/downloads.png)](https://packagist.org/packages/yiisoft/db-oracle)
[![rector](https://github.com/yiisoft/db-oracle/actions/workflows/rector.yml/badge.svg)](https://github.com/yiisoft/db-oracle/actions/workflows/rector.yml)
[![codecov](https://codecov.io/gh/yiisoft/db-oracle/branch/master/graph/badge.svg?token=XGJAFXVHSH)](https://codecov.io/gh/yiisoft/db-oracle)
[![StyleCI](https://github.styleci.io/repos/114756574/shield?branch=master)](https://github.styleci.io/repos/114756574?branch=master)

Oracle driver for [Yii Database](https://github.com/yiisoft/db) is a database driver for [Oracle] databases.

The package allows you to connect to [Oracle] databases from your application and perform various database operations
Expand All @@ -21,35 +27,37 @@ your Oracle database and perform various database operations as needed.

[Oracle]: https://www.oracle.com/database/technologies/

[![Latest Stable Version](https://poser.pugx.org/yiisoft/db-oracle/v/stable.png)](https://packagist.org/packages/yiisoft/db-oracle)
[![Total Downloads](https://poser.pugx.org/yiisoft/db-oracle/downloads.png)](https://packagist.org/packages/yiisoft/db-oracle)
[![rector](https://github.com/yiisoft/db-oracle/actions/workflows/rector.yml/badge.svg)](https://github.com/yiisoft/db-oracle/actions/workflows/rector.yml)
[![codecov](https://codecov.io/gh/yiisoft/db-oracle/branch/master/graph/badge.svg?token=XGJAFXVHSH)](https://codecov.io/gh/yiisoft/db-oracle)
[![StyleCI](https://github.styleci.io/repos/114756574/shield?branch=master)](https://github.styleci.io/repos/114756574?branch=master)

## Support version

| PHP | Oracle Version | CI-Actions
|:----:|:------------------------:|:---:|
| PHP | Oracle Version | CI-Actions |
|-----|----------------|------------|
|**8.0 - 8.2**| **12c - 21c**|[![build](https://github.com/yiisoft/db-oracle/actions/workflows/build.yml/badge.svg?branch=dev)](https://github.com/yiisoft/db-oracle/actions/workflows/build.yml) [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Fdb-oracle%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/db-oracle/master) [![static analysis](https://github.com/yiisoft/db-oracle/actions/workflows/static.yml/badge.svg?branch=dev)](https://github.com/yiisoft/db-oracle/actions/workflows/static.yml) [![type-coverage](https://shepherd.dev/github/yiisoft/db-oracle/coverage.svg)](https://shepherd.dev/github/yiisoft/db-oracle)

## Installation

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

```php
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).
For config connection to Oracle database check [Connecting Oracle](https://github.com/yiisoft/db/blob/master/docs/guide/en/connection/oracle.md).

[Check the documentation docs](https://github.com/yiisoft/db/blob/master/docs/en/README.md) to learn about usage.
[Check the documentation docs](https://github.com/yiisoft/db/blob/master/docs/guide/en/README.md) to learn about usage.

## Testing
- [Internals](docs/internals.md)

[Check the documentation](/docs/en/testing.md) to learn about testing.
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).

## License

The Yii Database Oracle driver 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/).

## Support the project

Expand All @@ -62,10 +70,3 @@ For config connection to Oracle database check [Connecting Oracle](https://githu
[![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 Oracle 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/).
16 changes: 13 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,23 @@
"type": "library",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/db-oracle/issues",
"issues": "https://github.com/yiisoft/db-oracle/issues?state=open",
"source": "https://github.com/yiisoft/db-oracle",
"forum": "https://www.yiiframework.com/forum/",
"wiki": "https://www.yiiframework.com/wiki/",
"irc": "ircs://irc.libera.chat:6697/yii",
"chat": "https://t.me/yii3en",
"source": "https://github.com/yiisoft/db-oracle"
"chat": "https://t.me/yii3en"
},
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/yiisoft"
},
{
"type": "github",
"url": "https://github.com/sponsors/yiisoft"
}
],
"require": {
"ext-pdo": "*",
"php": "^8.0",
Expand Down
23 changes: 10 additions & 13 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 @@ -10,7 +10,7 @@ All our packages have github actions by default, so you can test your [contribut

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)
1. [Oracle 21](../docker-compose.yml)

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

Expand All @@ -20,9 +20,7 @@ docker compose up -d

## Unit testing

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

The following steps are required to run the tests:
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

1. Run the docker container for the dbms.
2. Install the dependencies of the project with composer.
Expand All @@ -32,7 +30,7 @@ The following steps are required to run the tests:
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 @@ -49,20 +47,19 @@ The code is statically analyzed with [Psalm](https://psalm.dev/). To run static
./vendor/bin/psalm
```

## Rector
## 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:
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`.
## Dependencies

To run the checker, execute the following command:
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
Expand Down
2 changes: 1 addition & 1 deletion src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function insertWithReturningPks(string $table, array $columns): bool|arra
$returnParams[$phName]['dataType'] = PDO::PARAM_INT;
}

$returnParams[$phName]['size'] = $columnSchemas[$name]->getSize() ?? -1;
$returnParams[$phName]['size'] = isset($columnSchemas[$name]) ? $columnSchemas[$name]->getSize() : -1;

$returning[] = $this->db->getQuoter()->quoteColumnName($name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ protected function findViewNames(string $schema = ''): array
*/
protected function getCacheKey(string $name): array
{
return array_merge([self::class], $this->generateCacheKey(), [$this->getRawTableName($name)]);
return array_merge([self::class], $this->generateCacheKey(), [$this->db->getQuoter()->getRawTableName($name)]);
}

/**
Expand Down

0 comments on commit 64f3211

Please sign in to comment.