Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an Event mangement system for Silverstripe CMS #1

Merged
merged 26 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
30d6d46
Initial commit
maxime-rainville Nov 6, 2024
4911860
Update workfow
maxime-rainville Nov 6, 2024
5de5068
Add ability to scaffold Dataobject event
maxime-rainville Nov 7, 2024
3095867
Update CI workflow
maxime-rainville Nov 7, 2024
dcf32e8
Add PHPUnit config
maxime-rainville Nov 7, 2024
263401f
Move test around
maxime-rainville Nov 7, 2024
86c7bb9
Test PHP 8.3
maxime-rainville Nov 7, 2024
abcaf6d
Fix PHP linting error
maxime-rainville Nov 7, 2024
bdf4dfa
Finishing implementing test for DataObjectEvent flow
maxime-rainville Nov 7, 2024
397b00d
Fix linting issue
maxime-rainville Nov 7, 2024
0b8ed50
Add DataObjectListener test
maxime-rainville Nov 7, 2024
0269386
Update readme
maxime-rainville Nov 7, 2024
0fc305f
Remove repositories composer config
maxime-rainville Nov 7, 2024
9e945f9
Add CI badge to readme
maxime-rainville Nov 7, 2024
ed7ba72
Try to instanciate Loaders and listeners with Injector
maxime-rainville Nov 10, 2024
54afefd
Add more code sample to readme
maxime-rainville Nov 10, 2024
1db248b
Be more explicit abotut he return type of DataObjectEvent
maxime-rainville Nov 11, 2024
e857cc7
Fix linting issue
maxime-rainville Nov 11, 2024
8618512
Add option to suppress Event dispatch for testing
maxime-rainville Nov 11, 2024
e410533
Add more detail about testing to README
maxime-rainville Nov 12, 2024
aa2593f
Enable PHPStan CI
Nov 13, 2024
de9b9e9
Fix all PHPStan warning
Nov 13, 2024
017bd8b
Fix linting issue
Nov 13, 2024
fedec8b
Implement peer review feedback
Nov 13, 2024
5b7ead7
Fix some linting issue
Nov 13, 2024
da0f6d4
Require version 0.0.0 of archipro/revolt-event-dispatcher
maxime-rainville Nov 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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