Skip to content

Commit

Permalink
Fix docs (#83)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergei Predvoditelev <[email protected]>
  • Loading branch information
luizcmarin and vjik authored May 16, 2024
1 parent b926e35 commit ca870fc
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 42 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Yii DbCache Change Log
# Yii Cache Library - DB Handler Change Log

## 1.0.1 under development

Expand Down
6 changes: 3 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ 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
44 changes: 21 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<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>
<h1 align="center">Yii Cache Library - DB Handler</h1>
<br>
Expand Down Expand Up @@ -32,15 +32,15 @@ This package implements database-based [PSR-16](https://www.php-fig.org/psr/psr-

## Installation

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

```shell
composer require yiisoft/cache-db --prefer-dist
composer require yiisoft/cache-db
```

## Create database connection

For more information see [yiisoft/db](https://github.com/yiisoft/db/tree/master/docs/en#create-connection).
For more information see [yiisoft/db](https://github.com/yiisoft/db/tree/master/docs/guide/en#create-connection).

## Database Preparing

Expand All @@ -49,18 +49,18 @@ Package provides two way for preparing database:
1. Raw SQL. You can use it with the migration package used in your application.

- Ensure tables:
- [MSSQL](/sql/sqlsrv-up.sql),
- [MySQL / MariaDB](/sql/mysql-up.sql),
- [Oracle](/sql/oci-up.sql),
- [PostgreSQL](/sql/pgsql-up.sql)
- [SQLite](/sql/sqlite-up.sql)
- [MSSQL](sql/sqlsrv-up.sql),
- [MySQL / MariaDB](sql/mysql-up.sql),
- [Oracle](sql/oci-up.sql),
- [PostgreSQL](sql/pgsql-up.sql)
- [SQLite](sql/sqlite-up.sql)

- Ensure no tables:
- [MSSQL](/sql/sqlsrv-down.sql),
- [MySQL / MariaDB](/sql/mysql-down.sql),
- [Oracle](/sql/oci-down.sql),
- [PostgreSQL](/sql/pgsql-down.sql)
- [SQLite](/sql/sqlite-down.sql)
- [MSSQL](sql/sqlsrv-down.sql),
- [MySQL / MariaDB](sql/mysql-down.sql),
- [Oracle](sql/oci-down.sql),
- [PostgreSQL](sql/pgsql-down.sql)
- [SQLite](sql/sqlite-down.sql)

2. `DbSchemaManager` for `ensureTable()`, `ensureNoTable()` methods for cache table (by default `{{%yii_cache}}`).

Expand Down Expand Up @@ -150,11 +150,16 @@ This allows you to log cache operations, when ocurring errors, etc.

- [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).

## License

The Yii Cache Library - DB Handler 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

[![Open Collective](https://img.shields.io/badge/Open%20Collective-sponsor-7eadf1?logo=open%20collective&logoColor=7eadf1&labelColor=555555)](https://opencollective.com/yiisoft)
Expand All @@ -166,10 +171,3 @@ You may also check out other [Yii Community Resources](https://www.yiiframework.
[![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 Cache Library - DB Handler 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 @@
"homepage": "https://www.yiiframework.com/",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/cache-db/issues",
"issues": "https://github.com/yiisoft/cache-db/issues?state=open",
"source": "https://github.com/yiisoft/cache-db",
"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/cache-db"
"chat": "https://t.me/yii3en"
},
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/yiisoft"
},
{
"type": "github",
"url": "https://github.com/sponsors/yiisoft"
}
],
"require": {
"php": "^8.0",
"ext-pdo": "*",
Expand Down
17 changes: 6 additions & 11 deletions docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ docker compose 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/).

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

## Global testing
### Global testing

The following steps are required to run the tests.

Expand All @@ -50,7 +46,7 @@ The following steps are required to run the tests.
vendor/bin/phpunit
```

## Individual testing
### Individual testing

The following steps are required to run the tests.

Expand Down Expand Up @@ -87,7 +83,7 @@ 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:
Expand All @@ -98,9 +94,8 @@ use either newest or any specific version of PHP:

## 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:
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 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" bootstrap="vendor/autoload.php" colors="true" failOnRisky="true" failOnWarning="true" stopOnFailure="false" executionOrder="random" resolveDependencies="true" backupGlobals="false" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/10.1/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" colors="true" failOnRisky="true" failOnWarning="true" stopOnFailure="false" executionOrder="random" resolveDependencies="true" backupGlobals="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd">
<php>
<ini name="error_reporting" value="-1"/>
</php>
Expand Down

0 comments on commit ca870fc

Please sign in to comment.