Skip to content

Commit c764536

Browse files
authored
Initial commit
0 parents  commit c764536

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2322
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
* text=auto eol=lf
5+
6+
*.blade.php diff=html
7+
*.css diff=css
8+
*.html diff=html
9+
*.md diff=markdown
10+
*.php diff=php
11+
12+
# Ignore all development content with "export-ignore".
13+
/.github export-ignore
14+
/.husky export-ignore
15+
/docs export-ignore
16+
/env export-ignore
17+
/tests export-ignore
18+
/workbench export-ignore
19+
20+
/.editorconfig export-ignore
21+
/.gitattributes export-ignore
22+
/.gitignore export-ignore
23+
/.lando.dist.yml export-ignore
24+
/.php-cs-fixer.dist.php export-ignore
25+
/commitlint.config.cjs export-ignore
26+
/package.json export-ignore
27+
/package-lock.json export-ignore
28+
/phpunit.xml.dist export-ignore
29+
/README.md export-ignore
30+
/testbench.example.yaml export-ignore

.github/workflows/linter.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Code linting
2+
3+
on:
4+
# Run linting on all push events that have committed changes in PHP files
5+
push:
6+
paths:
7+
- '**.php'
8+
# Make it possible to run the workflow manually
9+
workflow_dispatch:
10+
11+
jobs:
12+
phplint:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
# Give the default GITHUB_TOKEN write permission to commit and push the
17+
# added or changed files to the repository.
18+
contents: write
19+
20+
steps:
21+
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.head_ref }}
26+
27+
- name: Run Laravel Pint
28+
uses: aglipanci/laravel-pint-action@latest
29+
30+
- name: Commit changes
31+
uses: stefanzweifel/git-auto-commit-action@v5
32+
with:
33+
commit_message: "style: fix code style"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v3
17+
with:
18+
release-type: php
19+
package-name: eclipsephp-plugin-template

.github/workflows/test-runner.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Tests
2+
3+
on:
4+
# Run testing on all push and pull requests for the main branch that have committed changes in PHP files
5+
push:
6+
branches: [ "main" ]
7+
paths:
8+
- '**.php'
9+
pull_request:
10+
branches: [ "main" ]
11+
paths:
12+
- '**.php'
13+
# Make it possible to run the workflow manually
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
22+
runs-on: ${{ matrix.os }}
23+
24+
# Define the matrix of different PHP and dependency versions
25+
strategy:
26+
# Fail the whole workflow if one of the jobs fails
27+
fail-fast: true
28+
matrix:
29+
os: [ ubuntu-latest ]
30+
php: [ 8.2, 8.3, 8.4 ]
31+
dependency-version: [ prefer-lowest, prefer-stable ]
32+
33+
name: ${{ matrix.os }} / PHP ${{ matrix.php }} / ${{ matrix.dependency-version }}
34+
35+
steps:
36+
37+
#- name: Configure operating system
38+
# if: matrix.os == 'ubuntu-latest'
39+
# run: sudo apt-get update && sudo apt-get install -y locales locales-all
40+
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
with:
44+
ref: ${{ github.head_ref }}
45+
46+
- name: Validate composer.json and composer.lock
47+
run: composer validate --strict
48+
49+
- name: Cache Composer packages
50+
id: composer-cache
51+
uses: actions/cache@v3
52+
with:
53+
path: vendor
54+
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ matrix.dependency-version }}-${{ hashFiles('**/composer.lock') }}
55+
56+
- name: Setup PHP
57+
uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: ${{ matrix.php }}
60+
coverage: xdebug
61+
# extensions: mbstring, gd, intl
62+
63+
- name: Install dependencies
64+
run: composer update --prefer-dist --no-progress --${{ matrix.dependency-version }}
65+
66+
- name: Run test suite
67+
run: composer test -- --coverage-clover ./coverage.xml
68+
69+
- name: Upload coverage reports to Codecov
70+
# Make sure the Codecov action is only executed once
71+
if: matrix.os == 'ubuntu-latest' && matrix.php == '8.2' && matrix.dependency-version == 'prefer-stable'
72+
uses: codecov/codecov-action@v5
73+
with:
74+
token: ${{ secrets.CODECOV_TOKEN }}
75+
files: ./coverage.xml
76+
verbose: true

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# 1. Keep lines sorted alphabetically in this file
2+
# 2. Do not add OS or IDE specific lines here — do it in the global .gitignore: https://gist.github.com/subfuzion/db7f57fff2fb6998a16c
3+
# -----------------------
4+
/.env
5+
/.env.backup
6+
/.env.production
7+
/.lando.local.yml
8+
/.php-cs-fixer.cache
9+
/.phpunit.result.cache
10+
/build
11+
/composer.lock
12+
/node_modules
13+
/phpunit.xml
14+
/vendor

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

.lando.dist.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: eclipsephp-plugin-template
2+
services:
3+
appserver:
4+
type: php:custom
5+
xdebug: "debug,develop,coverage"
6+
via: cli
7+
overrides:
8+
image: slimdeluxe/php:8.2-v1.0
9+
tooling:
10+
php:
11+
service: appserver
12+
composer:
13+
service: appserver
14+
test:
15+
service: appserver
16+
description: Run tests
17+
cmd: "composer test"
18+
format:
19+
service: appserver
20+
description: Fix code style issues
21+
cmd: "composer format"
22+
testbench:
23+
service: appserver
24+
description: Run testbench CLI
25+
cmd: "vendor/bin/testbench"

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## 1.0.0 (2025-03-21)
4+
5+
6+
### Features
7+
8+
* add division method with test ([6acebfb](https://github.com/DataLinx/eclipsephp-plugin-template/commit/6acebfb8e784e2a6a2f43bf0d318ee3555455ff6))
9+
* add Math source file with tests ([bdca326](https://github.com/DataLinx/eclipsephp-plugin-template/commit/bdca3261e55aa6893684eba4517c138a795e8ecb))
10+
* add placeholder files ([2dda560](https://github.com/DataLinx/eclipsephp-plugin-template/commit/2dda5603cb60df1973f1d91130814965b76801b1))
11+
* add service provider and plugin class ([b3343ee](https://github.com/DataLinx/eclipsephp-plugin-template/commit/b3343eebb6b57d66199efa07f5085e0339a5519c))

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) DataLinx <info@datalinx.si>
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
13+
all 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
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)