Skip to content

Commit 543b235

Browse files
authored
Merge pull request #608 from wayofdev/feat/docs
2 parents f71e700 + 3b52afb commit 543b235

File tree

4 files changed

+77
-80
lines changed

4 files changed

+77
-80
lines changed

README.md

Lines changed: 14 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<br>
22

33
<div align="center">
4-
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-cycle-orm-adapter/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only">
5-
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-cycle-orm-adapter/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only">
4+
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-cycle-orm-adapter/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only" alt="Logo for Light Mode">
5+
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-cycle-orm-adapter/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only" alt="Logo for Dark Mode">
66
</div>
77

88

@@ -17,101 +17,43 @@
1717
<a href="https://packagist.org/packages/wayofdev/laravel-cycle-orm-adapter"><img src="https://img.shields.io/packagist/l/wayofdev/laravel-cycle-orm-adapter?style=flat-square&color=blue&logo=packagist" alt="Software License"/></a>
1818
<a href="https://packagist.org/packages/wayofdev/laravel-cycle-orm-adapter"><img alt="Commits since latest release" src="https://img.shields.io/github/commits-since/wayofdev/laravel-cycle-orm-adapter/latest?style=flat-square"></a>
1919
<a href="https://app.codecov.io/gh/wayofdev/laravel-cycle-orm-adapter"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/wayofdev/laravel-cycle-orm-adapter?style=flat-square&logo=codecov"></a>
20-
<a href="https://scrutinizer-ci.com/g/wayofdev/laravel-cycle-orm-adapter"><img alt="Scrutinizer build (GitHub/Bitbucket)" src="https://img.shields.io/scrutinizer/build/g/wayofdev/laravel-cycle-orm-adapter/master?label=scrutinizer&style=flat-square"></a>
21-
<a href=""><img src="https://img.shields.io/badge/phpstan%20level-6%20of%209-yellowgreen?style=flat-square&logo=php"></a>
20+
<a href=""><img src="https://img.shields.io/badge/phpstan%20level-5%20of%209-yellowgreen?style=flat-square&logo=php"></a>
2221
</div>
2322

2423
<br>
2524

2625
<br>
2726

2827
<div align="center">
29-
<img width="320" src="assets/on-white-bg.png#gh-light-mode-only">
30-
<img width="320" src="assets/on-black-bg.png#gh-dark-mode-only">
28+
<img width="320" src="assets/on-white-bg.png#gh-light-mode-only" alt="CycleORM + WayOfDev + Laravel Logo for Light GitHub Mode">
29+
<img width="320" src="assets/on-black-bg.png#gh-dark-mode-only" alt="CycleORM + WayOfDev + Laravel Logo for Dark GitHub Mode">
3130
</div>
3231

3332
<br>
3433

3534
# Laravel Cycle ORM Adapter
3635

37-
Package fully integrates [Cycle ORM](https://cycle-orm.dev) into [Laravel](https://laravel.com) framework.
36+
Unlock the full potential of [Domain-Driven Design](https://en.wikipedia.org/wiki/Domain-driven_design) in your Laravel projects with the [wayofdev/laravel-cycle-orm-adapter](https://github.com/wayofdev/laravel-cycle-orm-adapter) — the adapter package that seamlessly integrates the capabilities of [CycleORM](https://cycle-orm.dev) — DataMapper ORM into [Laravel Framework](https://laravel.com).
3837

39-
* [Laravel Octane](https://laravel.com/docs/9.x/octane) ready!
40-
* [Laravel Telescope](https://laravel.com/docs/9.x/telescope) compatible
41-
42-
If you **like/use** this package, please consider **starring** it. Thanks!
38+
This adapter bridges the gap between Laravel's rapid development capabilities and Cycle ORM's Data Mapper features, enabling you to craft complex, domain-centric applications, with separation of concerns, and a clear distinction between the domain model and the persistence layer.
4339

4440
<br>
4541

46-
## 💿 Installation
47-
48-
### → Using Composer
49-
50-
Require as dependency:
51-
52-
```bash
53-
$ composer req wayofdev/laravel-cycle-orm-adapter
54-
```
42+
If you **like/use** this package, please consider **starring** ⭐️ it. Thanks!
5543

5644
<br>
5745

58-
## 💻 Usage
59-
60-
### → Console Commands
61-
62-
#### Migrations:
63-
64-
| Command | Description |
65-
| ------------------------ | ------------------------------------------------------------ |
66-
| `cycle:migrate` | Perform one or all outstanding migrations.<br />`--one` Execute only one (first) migration. |
67-
| `cycle:migrate:replay` | Replay (down, up) one or multiple migrations.<br />`--all` Replay all migrations. |
68-
| `cycle:migrate:rollback` | Rollback one (default) or multiple migrations.<br />`--all` Rollback all executed migrations. |
69-
| `cycle:migrate:init` | Init migrations component (create migrations table). |
70-
| `cycle:migrate:status` | Get list of all available migrations and their statuses. |
71-
72-
#### Database:
73-
74-
| Command | Description |
75-
| ------------------------ | ------------------------------------------------------------ |
76-
| `cycle:db:list [db]` | Get list of available databases, their tables and records count.<br/>`db` database name. |
77-
| `cycle:db:table <table>` | Describe table schema of specific database.<br/>`table` Table name (required).<br/>`--database` Source database. |
46+
## 📚 Documentation
7847

79-
#### ORM and Schema:
80-
81-
| Command | Description |
82-
| ------------------- | ------------------------------------------------------------ |
83-
| `cycle:orm` | Update (init) cycle schema from database and annotated classes. |
84-
| `cycle:orm:migrate` | Generate ORM schema migrations.<br /> `--run` Automatically run generated migration. |
85-
| `cycle:orm:render` | Render available CycleORM schemas.<br /> `--no-color` Display output without colors. |
86-
| `cycle:orm:sync` | Sync Cycle ORM schema with database without intermediate migration (risk operation). |
48+
The full documentation for the package is available at [https://laravel-cycle-orm-adapter.wayof.dev](https://laravel-cycle-orm-adapter.wayof.dev).
8749

8850
<br>
8951

90-
## 🧪 Running Tests
91-
92-
### → PHPUnit Tests
93-
94-
To run tests, run the following command:
95-
96-
```bash
97-
$ make test
98-
```
99-
100-
### → Static Analysis
101-
102-
Code quality using PHPStan:
103-
104-
```bash
105-
$ make stan
106-
```
107-
108-
### → Coding Standards Fixing
52+
## 🤝 Contributing
10953

110-
Fix code using The PHP Coding Standards Fixer (PHP CS Fixer) to follow our standards:
54+
Contributions are welcome!
11155

112-
```bash
113-
$ make cs-fix
114-
```
56+
If you would like to contribute to the package, please see the [Contributing Guide](https://laravel-cycle-orm-adapter.wayof.dev/contributing) file for more information.
11557

11658
<br>
11759

@@ -133,7 +75,7 @@ Created in **2022** by [lotyp / wayofdev](https://github.com/wayofdev)
13375

13476
* The official [spiral/cycle-bridge](https://github.com/spiral/cycle-bridge) for Spiral Framework
13577

136-
* Alternative implementation of Cycle ORM for Laravel — [wakebit/laravel-cycle](https://github.com/wakebit/laravel-cycle)
78+
* Alternative implementation of Cycle ORM for Laravel — [wakebit/laravel-cycle](https://github.com/wakebit/laravel-cycle) (abandoned)
13779

13880

13981
<br>

docs/pages/_meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"installation": "Installation",
44
"configuration": "Configuration",
55
"usage": "Usage",
6-
"services": "Services"
6+
"services": "Services",
7+
"contributing": "Contributing"
78
}

docs/pages/contributing.mdx

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { Callout } from 'nextra-theme-docs'
2+
3+
# Contributing
4+
5+
If you would like to contribute to this project, please open an issue or a pull request. We are always looking for ways to improve the project and would love to hear your ideas.
6+
7+
The latest changes are always in master branch, so please make your Pull Request against that branch.
8+
9+
## 💻 Workflow
10+
11+
<Callout type="warning">
12+
Please feature/fix/update... into individual PRs (not one changing everything)
13+
</Callout>
14+
15+
- Create a github fork.
16+
- On your fork, create a branch, make the changes, commit and push.
17+
- Create a pull-request to the master branch of this repository.
18+
19+
## 🧾 Checklist
20+
21+
### → If Applicable
22+
23+
- tests should be included as a part of your PR
24+
- run `make hooks` to install the git hooks and pre-commit checks
25+
- run `make test` or `make up && make ssh && vendor/bin/pest` to run them.
26+
- `make lint` should be run to ensure the code is properly formatted and phpstan should be run to ensure the code is properly typed.
27+
- documentation should be updated, please provide the corresponding documentation as well and make it part of the Pull Request
28+
29+
## ✉️ Git Message Format
30+
31+
This repo adheres to the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
32+
Commit messages are enforced through [commitizen](https://github.com/commitizen-tools/commitizen) and a [pre-commit](https://pre-commit.com), please use `make hooks` to install them.
33+
34+
This leads to more readable messages that are easy to follow when looking through the project history and also allows to generate changelogs automatically.
35+
36+
### → Allowed prefixes for commit messages
37+
38+
- **feat** — A new feature
39+
- **fix** — A bug fix
40+
- **perf** — A code change that improves performance
41+
- **docs** — Documentation only changes
42+
- **style** — Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
43+
- **deps** — Changes to the package.json or package-lock.json
44+
- **refactor** — A code change that neither fixes a bug nor adds a feature
45+
- **ci** — Changes to our CI configuration files and scripts
46+
- **test** — Adding missing tests or correcting existing tests
47+
- **revert** — Reverting a previous commit
48+
- **build** — Changes that affect the build system or external dependencies (example scopes: pnpm, renovate, github actions)
49+
- **chore** — Other changes that don't modify src or test files
50+
- **security** — A code change that fixes a security issue
51+
52+
## 🔓 Security Vulnerabilities
53+
54+
If you discover a security vulnerability within this package, please send an e-mail to WayOfDev via the@wayof.dev. All security vulnerabilities will be promptly addressed.
55+
56+
## 🤝 Code of Conduct
57+
58+
We are using the [Contributor Covenant](https://www.contributor-covenant.org/) as our Code of Conduct, to keep discussion open and inclusive. Please, take a moment to read and follow our [Code of Conduct](https://github.com/wayofdev/laravel-cycle-orm-adapter/blob/master/.github/CODE_OF_CONDUCT.md).

docs/theme.config.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import React from 'react'
21
import {DocsThemeConfig, useTheme} from 'nextra-theme-docs'
3-
4-
52
const Logo = () => {
6-
const {theme} = useTheme();
3+
const {resolvedTheme} = useTheme();
74
const title = 'Laravel CycleORM Adapter';
85

96
const lightLogo = (
@@ -27,7 +24,6 @@ const Logo = () => {
2724
</svg>
2825
);
2926

30-
// Dark theme logo
3127
const darkLogo = (
3228
<svg className="nx-h-8 nx-w-auto" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1"
3329
x="0px" y="0px" xmlSpace="preserve"
@@ -48,9 +44,9 @@ const Logo = () => {
4844
return (
4945
<div className="nx-w-full nx-flex nx-items-center">
5046
<div className="nx-flex nx-items-center">
51-
{theme === 'light' ? lightLogo : darkLogo}
47+
{resolvedTheme === 'light' ? lightLogo : darkLogo}
5248
<span
53-
className="nx-ml-2 font-semibold whitespace-nowrap">Laravel CycleORM Adapter</span>
49+
className="nx-ml-2 font-semibold whitespace-nowrap">{title}</span>
5450
</div>
5551
</div>
5652
);

0 commit comments

Comments
 (0)