Skip to content

Commit 63a2d11

Browse files
committed
chore: Initial commit
0 parents  commit 63a2d11

31 files changed

+635
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: static analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
analysis:
11+
runs-on: ubuntu-22.04
12+
13+
name: Source Code
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: 8.4
23+
tools: composer:v2
24+
coverage: none
25+
26+
- name: Install dependencies
27+
uses: nick-fields/retry@v3
28+
with:
29+
timeout_minutes: 5
30+
max_attempts: 5
31+
command: composer install --dev --no-interaction --no-progress
32+
33+
- name: Execute type checking
34+
run: composer analyse

.github/workflows/tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-22.04
12+
13+
services: {}
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: 8.4
23+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp, :php-psr
24+
ini-values: error_reporting=E_ALL
25+
tools: composer:v2
26+
coverage: pcov
27+
28+
- name: Install dependencies
29+
uses: nick-fields/retry@v3
30+
with:
31+
timeout_minutes: 5
32+
max_attempts: 5
33+
command: composer install --dev --no-interaction --no-progress
34+
35+
- name: Prepare testbench
36+
run: composer clear && composer prepare && composer build
37+
38+
- name: Execute tests
39+
run: composer test
40+
41+
- name: Upload coverage reports to Codecov
42+
uses: codecov/codecov-action@v4
43+
with:
44+
fail_ci_if_error: true # optional (default = false)
45+
files: ./build/logs/clover.xml
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
48+
- name: Upload test results to Codecov
49+
if: ${{ !cancelled() }}
50+
uses: codecov/test-results-action@v1
51+
with:
52+
files: ./build/report.junit.xml
53+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/vendor/
2+
composer.lock
3+
/wiki/
4+
/build/
5+
.phpunit.result.cache
6+
/src/_OLD/

CHANGELOG.md

Whitespace-only changes.

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Ollie Read
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<img src="concise.png">
2+
3+
![Packagist Version](https://img.shields.io/packagist/v/concise/concise)
4+
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/concise/concise)
5+
6+
![GitHub](https://img.shields.io/github/license/concise-laravel/concise)
7+
![Laravel](https://img.shields.io/badge/laravel-11.x-red.svg)
8+
[![codecov](https://codecov.io/gh/concise-laravel/concise/branch/main/graph/badge.svg?token=FHJ41NQMTA)](https://codecov.io/gh/concise-laravel/concise)
9+
10+
![Unit Tests](https://github.com/concise-laravel/concise/actions/workflows/tests.yml/badge.svg)
11+
![Static Analysis](https://github.com/concise-laravel/concise/actions/workflows/static-analysis.yml/badge.svg)
12+
13+
# Concise
14+
Concise is a super lightweight data mapper ORM for Laravel.
15+
It exists as a package entirely because I wanted the most lightweight solution I could build, that would give me the
16+
benefit of using a data mapper ORM, without using a full ORM.

composer.json

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"name" : "concise/concise",
3+
"description" : "A super lightweight data mapper ORM for Laravel",
4+
"keywords" : [
5+
"laravel",
6+
"orm",
7+
"data mapper",
8+
"datamapper",
9+
"lightweight"
10+
],
11+
"type" : "library",
12+
"require" : {
13+
"php" : "^8.4",
14+
"laravel/framework": "^12.0"
15+
},
16+
"require-dev" : {
17+
"phpunit/phpunit" : "^11.0.1",
18+
"orchestra/testbench": "^9.4",
19+
"larastan/larastan" : "^3.0",
20+
"infection/infection": "^0.29.8"
21+
},
22+
"license" : "MIT",
23+
"autoload" : {
24+
"psr-4": {
25+
"Articulate\\Concise\\": "src/"
26+
},
27+
"files": []
28+
},
29+
"autoload-dev" : {
30+
"psr-4": {
31+
"Articulate\\Concise\\Tests\\": "tests/",
32+
"App\\" : "workbench/app/",
33+
"Database\\Factories\\" : "workbench/database/factories/",
34+
"Database\\Mappers\\" : "workbench/database/mappers/",
35+
"Database\\Seeders\\" : "workbench/database/seeders/"
36+
}
37+
},
38+
"authors" : [
39+
{
40+
"name" : "Ollie Read",
41+
"email": "[email protected]"
42+
}
43+
],
44+
"minimum-stability": "stable",
45+
"scripts" : {
46+
"post-autoload-dump": [
47+
"@clear",
48+
"@prepare",
49+
"@php vendor/bin/testbench package:discover --ansi"
50+
],
51+
"phpstan" : "@php vendor/bin/phpstan analyse --memory-limit=2G --verbose --ansi",
52+
"clear" : "@php vendor/bin/testbench package:purge-skeleton --ansi",
53+
"prepare" : "@php vendor/bin/testbench package:discover --ansi",
54+
"build" : "@php vendor/bin/testbench workbench:build --ansi",
55+
"serve" : [
56+
"Composer\\Config::disableProcessTimeout",
57+
"@build",
58+
"@php vendor/bin/testbench serve --ansi"
59+
],
60+
"analyse" : [
61+
"phpstan"
62+
],
63+
"test" : [
64+
"@clear",
65+
"@prepare",
66+
"@build",
67+
"@php vendor/bin/phpunit"
68+
],
69+
"mutation" : [
70+
"@clear",
71+
"@prepare",
72+
"@build",
73+
"@php vendor/bin/infection --threads=12"
74+
],
75+
"lint" : [
76+
"@php vendor/bin/phpstan analyse --verbose --ansi"
77+
]
78+
},
79+
"extra" : {
80+
"laravel": {
81+
"providers": [
82+
"Articulate\\Concise\\ConciseServiceProvider"
83+
],
84+
"facades" : []
85+
}
86+
},
87+
"config" : {
88+
"allow-plugins": {
89+
"infection/extension-installer": true
90+
}
91+
}
92+
}

concise.png

375 KB
Loading

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
includes:
2+
- vendor/larastan/larastan/extension.neon
3+
4+
parameters:
5+
level: max
6+
paths:
7+
- src
8+
excludePaths:
9+
- tests
10+
ignoreErrors:

phpunit.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5+
backupGlobals="false"
6+
bootstrap="vendor/autoload.php"
7+
colors="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
executionOrder="random"
11+
failOnWarning="true"
12+
failOnRisky="true"
13+
failOnEmptyTestSuite="true"
14+
beStrictAboutOutputDuringTests="true"
15+
testdox="true"
16+
>
17+
<testsuites>
18+
<testsuite name="Testsuite">
19+
<directory>./tests</directory>
20+
</testsuite>
21+
</testsuites>
22+
<source>
23+
<include>
24+
<directory suffix=".php">./src</directory>
25+
</include>
26+
</source>
27+
<coverage>
28+
<report>
29+
<html outputDirectory="build/coverage"/>
30+
<text outputFile="build/coverage.txt"/>
31+
<clover outputFile="build/logs/clover.xml"/>
32+
</report>
33+
</coverage>
34+
<logging>
35+
<junit outputFile="build/report.junit.xml"/>
36+
</logging>
37+
<php>
38+
<server name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
39+
</php>
40+
</phpunit>

0 commit comments

Comments
 (0)