Skip to content

Commit

Permalink
Merge pull request #1 from archiprocode/master
Browse files Browse the repository at this point in the history
Implement an Event mangement system for Silverstripe CMS
  • Loading branch information
maxime-rainville authored Nov 17, 2024
2 parents 8f9577b + da0f6d4 commit 5430498
Show file tree
Hide file tree
Showing 23 changed files with 1,743 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
ci:
name: CI
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
with:
dynamic_matrix: false
extra_jobs: |
- php: '8.1'
db: mysql80
phpunit: true
installer_version: ^4
- php: '8.2'
db: mysql80
phpunit: true
installer_version: ^5
- php: '8.3'
db: mariadb
phpunit: true
installer_version: ^5
coding-standards:
name: Coding Standards
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
tools: composer:v2, php-cs-fixer

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Check coding standards
run: php-cs-fixer fix --dry-run --diff

- name: Static Analysis
run: vendor/bin/phpstan analyse
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/vendor/
.phpunit.result.cache
.php-cs-cache
.env
.idea/
.vscode/
*.swp
*.swo
.DS_Store
composer.lock
/public/
.php-cs-fixer.cache
phpstan.cache/
32 changes: 32 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

$config = new PhpCsFixer\Config();

return $config
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_align' => true,
'phpdoc_order' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_trim' => true,
'phpdoc_var_without_name' => true,
'return_type_declaration' => ['space_before' => 'none'],
'single_quote' => true,
'ternary_operator_spaces' => true,
'unary_operator_spaces' => true,
])
->setFinder($finder);
Loading

0 comments on commit 5430498

Please sign in to comment.