Skip to content

Commit 67fe27e

Browse files
committed
Initial commit
0 parents  commit 67fe27e

143 files changed

Lines changed: 8242 additions & 0 deletions

File tree

Some content is hidden

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

.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+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml,neon}]
15+
indent_size = 2

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* text=auto eol=lf
2+
3+
# GIT
4+
.editorconfig export-ignore
5+
.gitattributes export-ignore
6+
.gitignore export-ignore
7+
8+
# Tools
9+
.php-cs-fixer.php export-ignore
10+
phpstan.neon export-ignore
11+
12+
# Tests + CI
13+
phpunit.xml export-ignore
14+
15+
/.github export-ignore
16+
/tests export-ignore
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Setup PHP Environment
2+
3+
inputs:
4+
os:
5+
description: 'Operating System'
6+
required: false
7+
default: 'ubuntu-latest'
8+
php:
9+
description: 'PHP Version'
10+
required: false
11+
default: '8.4'
12+
stability:
13+
description: 'Composer Dependencies Stability'
14+
required: false
15+
default: 'stable'
16+
17+
runs:
18+
using: composite
19+
steps:
20+
- name: Set Git To Use LF
21+
run: |
22+
git config --global core.autocrlf false
23+
git config --global core.eol lf
24+
25+
- name: Checkout
26+
uses: actions/checkout@v5
27+
28+
- name: Setup PHP ${{ matrix.php }}
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php }}
32+
ini-values: "memory_limit=-1"
33+
34+
- name: Validate Composer
35+
run: composer validate
36+
37+
- name: Get Composer Cache Directory
38+
id: composer-cache
39+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
40+
41+
- name: Restore Composer Cache
42+
uses: actions/cache@v5
43+
with:
44+
path: ${{ steps.composer-cache.outputs.dir }}
45+
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
46+
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
47+
48+
- name: Install Dependencies
49+
uses: nick-invision/retry@v4
50+
with:
51+
timeout_minutes: 5
52+
max_attempts: 3
53+
command: composer update --prefer-${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

.github/workflows/codestyle.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CodeStyle
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
PHP_CS_FIXER_IGNORE_ENV: 1
9+
10+
jobs:
11+
psalm:
12+
name: Code Style
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
18+
- name: Setup PHP ${{ matrix.php }} Environment
19+
uses: ./.github/actions/setup-php
20+
with:
21+
os: ubuntu-latest
22+
php: 8.4
23+
24+
- name: Check Code Style
25+
run: composer phpcs:check

.github/workflows/security.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Security
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
security:
9+
name: Security
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v5
14+
15+
- name: Setup PHP ${{ matrix.php }} Environment
16+
uses: ./.github/actions/setup-php
17+
with:
18+
os: ubuntu-latest
19+
php: 8.4
20+
21+
- name: Composer Audit
22+
run: composer audit
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
phpstan:
9+
name: Linter
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v5
14+
15+
- name: Setup PHP ${{ matrix.php }} Environment
16+
uses: ./.github/actions/setup-php
17+
with:
18+
os: ubuntu-latest
19+
php: 8.4
20+
21+
- name: Static Analysis
22+
run: composer linter:check -- --error-format=github --ansi

.github/workflows/subsplit.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Subsplit Libraries
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- '*'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
subsplit:
16+
name: Split Packages (${{ matrix.package.local_path }})
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
package:
22+
# - local_path: 'path/to/component'
23+
# split_repository: 'repository-name'
24+
steps:
25+
- uses: actions/checkout@v7
26+
27+
# no tag
28+
- if: "!startsWith(github.ref, 'refs/tags/')"
29+
name: Monorepo Split of ${{ matrix.package.split_repository }}
30+
uses: danharrin/monorepo-split-github-action@v2.4.5
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
33+
with:
34+
branch: "master"
35+
package_directory: 'libs/${{ matrix.package.local_path }}'
36+
repository_organization: 'boson-php'
37+
repository_name: '${{ matrix.package.split_repository }}'
38+
user_name: "SerafimArts"
39+
user_email: "nesk@xakep.ru"
40+
41+
# with tag
42+
- if: "startsWith(github.ref, 'refs/tags/')"
43+
name: Monorepo Tagged Split of ${{ matrix.package }}
44+
uses: danharrin/monorepo-split-github-action@v2.4.5
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
47+
with:
48+
tag: ${GITHUB_REF#refs/tags/}
49+
branch: "master"
50+
package_directory: 'libs/${{ matrix.package.local_path }}'
51+
repository_organization: 'boson-php'
52+
repository_name: '${{ matrix.package.split_repository }}'
53+
user_name: "SerafimArts"
54+
user_email: "nesk@xakep.ru"

.github/workflows/tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
name: Tests (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }})
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php: [ '8.4', '8.5' ]
15+
os: [ ubuntu-latest, macos-latest, windows-latest ]
16+
stability: [ lowest, stable ]
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: [${{ matrix.stability }}] Setup PHP ${{ matrix.php }} Environment
22+
uses: ./.github/actions/setup-php
23+
with:
24+
os: ${{ matrix.os }}
25+
php: ${{ matrix.php }}
26+
stability: ${{ matrix.stability }}
27+
28+
- name: Execute Tests
29+
run: composer test

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# IDE
2+
/.idea/
3+
4+
# Composer
5+
/composer.lock
6+
/vendor/
7+
8+
# Testing
9+
test.php

0 commit comments

Comments
 (0)