Skip to content

Commit 8cd3ca8

Browse files
committed
wip
1 parent a39e64c commit 8cd3ca8

File tree

25 files changed

+668
-0
lines changed

25 files changed

+668
-0
lines changed

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/.github/ export-ignore
2+
/app/ export-ignore
3+
/src/js/ export-ignore
4+
/tests/ export-ignore
5+
/workbench/ export-ignore
6+
/storage/ export-ignore
7+
/.gitattributes export-ignore
8+
/.gitignore export-ignore
9+
/.prettierrc export-ignore
10+
/bun.lock export-ignore
11+
/bun.lockb export-ignore
12+
/Dockerfile export-ignore
13+
/eslint.config.js export-ignore
14+
/index.html export-ignore
15+
/package-lock.json export-ignore
16+
/package.json export-ignore
17+
/phpunit.xml export-ignore
18+
/testbench.yaml export-ignore
19+
/tsconfig.json export-ignore
20+
/vite.config.ts export-ignore
21+
/vitest.config.ts export-ignore
22+
/UPGRADING.md export-ignore

.github/workflows/php-test.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PHP Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
laravel: [9, 10, 11, 12]
12+
php: [8.2, 8.3, 8.4]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: test against Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }}
18+
run: docker build . --build-arg PHP_VERSION=${{ matrix.php }} --build-arg LARAVEL=${{ matrix.laravel }}

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
build
2+
dist
3+
node_modules
4+
vendor
5+
composer.lock
6+
coverage
7+
coverage-html
8+
coverage.xml
9+
.phpunit.cache
10+
.phpunit.result.cache
11+
*.tgz
12+
workbench/bootstrap/cache/packages.php
13+
workbench/bootstrap/cache/services.php
14+
workbench/bootstrap/cache/testbench.yaml
15+
workbench/storage/logs
16+
resources/js/export-types
17+
export-types
18+
/.idea
19+
/.vscode
20+
.DS_Store
21+
/storage

Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ARG PHP_VERSION=8.2
2+
FROM php:$PHP_VERSION-cli-alpine
3+
4+
RUN apk add git zip unzip autoconf make g++
5+
6+
# apparently newer xdebug needs these now?
7+
RUN apk add --update linux-headers
8+
9+
RUN pecl install xdebug && docker-php-ext-enable xdebug
10+
11+
RUN curl -sS https://getcomposer.org/installer | php \
12+
&& mv composer.phar /usr/local/bin/composer
13+
14+
WORKDIR /package
15+
16+
RUN adduser -D -g '' dev
17+
18+
RUN chown dev -R /package
19+
20+
USER dev
21+
22+
COPY --chown=dev composer.json ./
23+
24+
ARG LARAVEL=9
25+
RUN composer require laravel/framework ^$LARAVEL.0
26+
27+
COPY --chown=dev . .
28+
29+
RUN composer test

LICENSE

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 Synergi Tech Ltd
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.

composer.json

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"name": "synergitech/synergi-export-types",
3+
"type": "library",
4+
"license": "MIT",
5+
"homepage": "https://github.com/SynergiTech/synergi-export-types",
6+
"description": "",
7+
"keywords": [
8+
"laravel",
9+
"php",
10+
"interfaces"
11+
],
12+
"authors": [
13+
{
14+
"name": "Synergi Tech",
15+
"homepage": "http://github.com/SynergiTech"
16+
}
17+
],
18+
"support": {
19+
"issues": "https://github.com/SynergiTech/synergi-export-types/issues"
20+
},
21+
"require": {
22+
"php": "^8.2",
23+
"laravel/framework": ">=9.0"
24+
},
25+
"require-dev": {
26+
"larastan/larastan": "^2.0|^3.0",
27+
"orchestra/testbench": "^7.0|^8.0|^9.0|^10.0",
28+
"php-parallel-lint/php-parallel-lint": "^1.4",
29+
"phpstan/extension-installer": "^1.4",
30+
"phpunit/phpunit": "^9.0|^10.0|^11.0",
31+
"squizlabs/php_codesniffer": "^3.13"
32+
},
33+
"autoload": {
34+
"psr-4": {
35+
"SynergiTech\\ExportTypes\\": "src/"
36+
}
37+
},
38+
"autoload-dev": {
39+
"psr-4": {
40+
"App\\": "workbench/app/",
41+
"SynergiTech\\ExportTypes\\Tests\\": "tests/",
42+
"Workbench\\App\\": "workbench/app/",
43+
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
44+
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
45+
}
46+
},
47+
"extra": {
48+
"laravel": {
49+
"providers": [
50+
"SynergiTech\\ExportTypes\\ExportTypesServiceProvider"
51+
]
52+
}
53+
},
54+
"scripts": {
55+
"analyse": [
56+
"phpstan analyse --memory-limit 2G --level 8 app tests"
57+
],
58+
"lint": [
59+
"parallel-lint --exclude vendor .",
60+
"phpcs --standard=PSR12 src tests"
61+
],
62+
"test": [
63+
"Composer\\Config::disableProcessTimeout",
64+
"@lint",
65+
"XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text",
66+
"@analyse"
67+
],
68+
"post-autoload-dump": [
69+
"@prepare"
70+
],
71+
"prepare": "@php vendor/bin/testbench package:discover --ansi",
72+
"build": "@php vendor/bin/testbench workbench:build --ansi"
73+
},
74+
"config": {
75+
"optimize-autoloader": true,
76+
"preferred-install": "dist",
77+
"sort-packages": true,
78+
"allow-plugins": {
79+
"phpstan/extension-installer": true
80+
}
81+
}
82+
}

phpunit.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
4+
bootstrap="vendor/autoload.php">
5+
<testsuites>
6+
<testsuite name="default">
7+
<directory>tests</directory>
8+
</testsuite>
9+
</testsuites>
10+
11+
<source>
12+
<include>
13+
<directory>src</directory>
14+
</include>
15+
</source>
16+
17+
<php>
18+
<server name="APP_DEBUG" value="true"/>
19+
<server name="APP_ENV" value="testing"/>
20+
<server name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
21+
<server name="CACHE_STORE" value="array"/>
22+
</php>
23+
</phpunit>

0 commit comments

Comments
 (0)