-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* develop: fix github badge remove halsey journal fix incorrect example update docs add mkdocs
- Loading branch information
Showing
19 changed files
with
326 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
permissions: | ||
contents: write | ||
jobs: | ||
publish: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: 'Publish documentation' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v5 | ||
with: | ||
php-version: '8.0' | ||
- name: Install halsey/journal | ||
run: composer global require halsey/journal | ||
- name: Generate | ||
run: composer global exec 'journal generate' | ||
- name: Push | ||
uses: peaceiris/actions-gh-pages@v3 | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./.tmp_journal/ | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/vendor | ||
/.phpunit.result.cache | ||
/.phpunit.cache | ||
/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This command is intended to be run on your computer | ||
serve-doc: | ||
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material | ||
|
||
build-doc: | ||
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material build |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
@font-face { | ||
font-family: "Monaspace Neon"; | ||
font-weight: normal; | ||
font-style: normal; | ||
src: url("../fonts/MonaspaceNeon-Regular.woff"); | ||
} | ||
|
||
:root { | ||
--md-code-font: "Monaspace Neon"; | ||
} | ||
|
||
:root { | ||
--light-md-code-hl-number-color: #f76d47; | ||
--light-md-code-hl-function-color: #6384b9; | ||
--light-md-code-hl-operator-color: #39adb5; | ||
--light-md-code-hl-constant-color: #7c4dff; | ||
--light-md-code-hl-string-color: #9fc06f; | ||
--light-md-code-hl-punctuation-color: #39adb5; | ||
--light-md-code-hl-keyword-color: #7c4dff; | ||
--light-md-code-hl-variable-color: #80cbc4; | ||
--light-md-code-hl-comment-color: #ccd7da; | ||
--light-md-code-bg-color: #fafafa; | ||
--light-md-code-fg-color: #ffb62c; | ||
--light-md-code-hl-variable-color: #6384b9; | ||
--dark-md-code-hl-number-color: #f78c6c; | ||
--dark-md-code-hl-function-color: #82aaff; | ||
--dark-md-code-hl-operator-color: #89ddff; | ||
--dark-md-code-hl-constant-color: #c792ea; | ||
--dark-md-code-hl-string-color: #c3e88d; | ||
--dark-md-code-hl-punctuation-color: #89ddff; | ||
--dark-md-code-hl-keyword-color: #c792ea; | ||
--dark-md-code-hl-variable-color: #e8f9f9; | ||
--dark-md-code-hl-comment-color: #546e7a; | ||
--dark-md-code-bg-color: #263238; | ||
--dark-md-code-fg-color: #ffcb6b; | ||
--dark-md-code-hl-variable-color: #82aaff; | ||
} | ||
|
||
@media (prefers-color-scheme: light) { | ||
.language-php > * { | ||
--md-code-hl-number-color: var(--light-md-code-hl-number-color); | ||
--md-code-hl-function-color: var(--light-md-code-hl-function-color); | ||
--md-code-hl-operator-color: var(--light-md-code-hl-operator-color); | ||
--md-code-hl-constant-color: var(--light-md-code-hl-constant-color); | ||
--md-code-hl-string-color: var(--light-md-code-hl-string-color); | ||
--md-code-hl-punctuation-color: var(--light-md-code-hl-punctuation-color); | ||
--md-code-hl-keyword-color: var(--light-md-code-hl-keyword-color); | ||
--md-code-hl-variable-color: var(--light-md-code-hl-variable-color); | ||
--md-code-hl-comment-color: var(--light-md-code-hl-comment-color); | ||
--md-code-bg-color: var(--light-md-code-bg-color); | ||
--md-code-fg-color: var(--light-md-code-fg-color); | ||
} | ||
|
||
.language-php .na { | ||
--md-code-hl-variable-color: var(--light-md-code-hl-variable-color); | ||
} | ||
} | ||
|
||
[data-md-color-media="(prefers-color-scheme: light)"] .language-php > * { | ||
--md-code-hl-number-color: var(--light-md-code-hl-number-color); | ||
--md-code-hl-function-color: var(--light-md-code-hl-function-color); | ||
--md-code-hl-operator-color: var(--light-md-code-hl-operator-color); | ||
--md-code-hl-constant-color: var(--light-md-code-hl-constant-color); | ||
--md-code-hl-string-color: var(--light-md-code-hl-string-color); | ||
--md-code-hl-punctuation-color: var(--light-md-code-hl-punctuation-color); | ||
--md-code-hl-keyword-color: var(--light-md-code-hl-keyword-color); | ||
--md-code-hl-variable-color: var(--light-md-code-hl-variable-color); | ||
--md-code-hl-comment-color: var(--light-md-code-hl-comment-color); | ||
--md-code-bg-color: var(--light-md-code-bg-color); | ||
--md-code-fg-color: var(--light-md-code-fg-color); | ||
} | ||
|
||
[data-md-color-media="(prefers-color-scheme: light)"] .language-php .na { | ||
--md-code-hl-variable-color: var(--light-md-code-hl-variable-color); | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
.language-php > * { | ||
--md-code-hl-number-color: var(--dark-md-code-hl-number-color); | ||
--md-code-hl-function-color: var(--dark-md-code-hl-function-color); | ||
--md-code-hl-operator-color: var(--dark-md-code-hl-operator-color); | ||
--md-code-hl-constant-color: var(--dark-md-code-hl-constant-color); | ||
--md-code-hl-string-color: var(--dark-md-code-hl-string-color); | ||
--md-code-hl-punctuation-color: var(--dark-md-code-hl-punctuation-color); | ||
--md-code-hl-keyword-color: var(--dark-md-code-hl-keyword-color); | ||
--md-code-hl-variable-color: var(--dark-md-code-hl-variable-color); | ||
--md-code-hl-comment-color: var(--dark-md-code-hl-comment-color); | ||
--md-code-bg-color: var(--dark-md-code-bg-color); | ||
--md-code-fg-color: var(--dark-md-code-fg-color); | ||
} | ||
|
||
.language-php .na { | ||
--md-code-hl-variable-color: var(--dark-md-code-hl-variable-color); | ||
} | ||
} | ||
|
||
[data-md-color-media="(prefers-color-scheme: dark)"] .language-php > * { | ||
--md-code-hl-number-color: var(--dark-md-code-hl-number-color); | ||
--md-code-hl-function-color: var(--dark-md-code-hl-function-color); | ||
--md-code-hl-operator-color: var(--dark-md-code-hl-operator-color); | ||
--md-code-hl-constant-color: var(--dark-md-code-hl-constant-color); | ||
--md-code-hl-string-color: var(--dark-md-code-hl-string-color); | ||
--md-code-hl-punctuation-color: var(--dark-md-code-hl-punctuation-color); | ||
--md-code-hl-keyword-color: var(--dark-md-code-hl-keyword-color); | ||
--md-code-hl-variable-color: var(--dark-md-code-hl-variable-color); | ||
--md-code-hl-comment-color: var(--dark-md-code-hl-comment-color); | ||
--md-code-bg-color: var(--dark-md-code-bg-color); | ||
--md-code-fg-color: var(--dark-md-code-fg-color); | ||
} | ||
|
||
[data-md-color-media="(prefers-color-scheme: dark)"] .language-php .na { | ||
--md-code-hl-variable-color: var(--dark-md-code-hl-variable-color); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,11 @@ use Formal\AccessLayer\{ | |
}; | ||
use Innmind\Url\Url; | ||
|
||
$connection = new Lazy(static fn() => PDO::of(Url::of('mysql://user:[email protected]:3306/database_name'))); | ||
$connection = new Lazy( | ||
static fn() => PDO::of( | ||
Url::of('mysql://user:[email protected]:3306/database_name'), | ||
), | ||
); | ||
``` | ||
|
||
By passing a callable to the constructor allows you to use [whatever implementation](own.md) of a `Connection` you wish to lazy load. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,5 @@ $connection = PDO::of(Url::of('mysql://user:[email protected]:3306/database_name?cha | |
|
||
When executing a [query](../queries/sql.md) through this connection it will return a [deferred `Sequence`](https://innmind.github.io/Immutable/SEQUENCE.html#defer) of rows. This means that the rows returned from the database are only loaded once you iterate over the sequence. (Queries with the named constructor `::onDemand()` will return a lazy `Sequence`). | ||
|
||
> [!IMPORTANT] | ||
> as soon as you instanciate the class it will open a connection to the database, if you want to open it upon first query take a look at the [`Lazy` connection](lazy.md). | ||
!!! note "" | ||
As soon as you instanciate the class it will open a connection to the database, if you want to open it upon first query take a look at the [`Lazy` connection](lazy.md). |
Oops, something went wrong.