Skip to content

Commit

Permalink
Merge pull request #39 from darkwood-fr/1.x-dev
Browse files Browse the repository at this point in the history
v1.1.3
  • Loading branch information
matyo91 committed Sep 4, 2023
2 parents b446e65 + 914de28 commit b74d386
Show file tree
Hide file tree
Showing 273 changed files with 4,767 additions and 2,488 deletions.
11 changes: 7 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8

[*.md]
max_line_length = 80
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Continuous Integration

on:
push:
branches:
- 1.x
pull_request:

jobs:
cs-fix:
name: Check and fix coding styles using PHP CS Fixer
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.2' ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xsl, openswoole
tools: composer
coverage: none # disable XDebug for tests

- name: Install dependencies
run: composer install -d tools/php-cs-fixer

- name: PHP-CS-Fixer
run: tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --diff --dry-run

phpstan:
name: Execute PHPStan analysis
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.2' ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xsl, openswoole
tools: composer
coverage: none # disable XDebug for tests

- name: 'Install dependencies'
run: |
composer install -d tools/phpstan
composer install
- name: PHPStan
run: tools/phpstan/vendor/bin/phpstan --configuration=phpstan.neon

phpunit:
name: Launch PHPUnit test suite
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.2' ]
steps:
- name: Init repository
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xsl, openswoole
tools: composer
coverage: none # disable XDebug for tests

- name: Install dependencies
run: composer install

- name: PHPUnit
run: vendor/bin/phpunit
40 changes: 0 additions & 40 deletions .github/workflows/code-quality.yaml

This file was deleted.

11 changes: 6 additions & 5 deletions .github/workflows/docs-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'

- name: Install dependencies
run: npm install
run: cd docs && npm install

# - name: Check for linting errors
# run: npm test
# run: cd docs && npm test

- name: Build production website
run: npm run build
run: cd docs && npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public
publish_dir: ./docs/src/public
20 changes: 7 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
# IDS
.vscode/
# Docs
/docs/node_modules
/docs/src/public
/docs/src/resources

# PHP
/.phpunit.result.cache
/.castor.stub.php
/.php-cs-fixer.cache
/.php_cs.cache
/build/
/.phpunit.cache
/composer.lock
/vendor/

# HUGO
node_modules
public
resources
TODO
site
/vendor/
24 changes: 0 additions & 24 deletions .php-cs-fixer.dist.php

This file was deleted.

39 changes: 39 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->ignoreVCSIgnored(true)
->ignoreDotFiles(false)
->in(__DIR__)
->append([
__FILE__,
])
->notPath('.castor.stub.php')
;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PHP82Migration' => true,
'@PhpCsFixer' => true,
'@Symfony' => true, // https://cs.symfony.com/doc/ruleSets/Symfony.html
'@Symfony:risky' => true,
'heredoc_indentation' => false,
'php_unit_internal_class' => false, // From @PhpCsFixer but we don't want it
'php_unit_test_class_requires_covers' => false, // From @PhpCsFixer but we don't want it
'phpdoc_add_missing_param_annotation' => false, // From @PhpCsFixer but we don't want it
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => true, // Symfony(PSR12) override the default value, but we don't want
'blank_line_before_statement' => true, // Symfony(PSR12) override the default value, but we don't want
'declare_strict_types' => true, // https://cs.symfony.com/doc/rules/strict/declare_strict_types.html
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
'import_classes' => true,
],
'yoda_style' => false, // https://cs.symfony.com/doc/rules/control_structure/yoda_style.html
'increment_style' => ['style' => 'post'],
])
->setFinder($finder)
;
3 changes: 0 additions & 3 deletions .stylelintignore

This file was deleted.

26 changes: 11 additions & 15 deletions ...tent/en/docs/getting-started/changelog.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
---
title: "Changelog"
description: "Changelog."
lead: "Changelog."
date: 2020-10-13T15:21:01+02:00
lastmod: 2020-10-13T15:21:01+02:00
draft: false
images: []
menu:
docs:
parent: "getting-started"
weight: 60
toc: true
---
### 1.1.3

- Update DX for Flow\DriverInterface
- Update `async` that now $onResolve get called with async $callback result or Flow\Exception as first argument
- Update `tick` that now return a Closure to cleanup tick interval
- Remove `start` and `stop`
- Add Fiber Driver from https://github.com/jolicode/castor/blob/main/src/functions.php
- Upgrade to Symfony 6.3 and PHPUnit 10.3
- Refactor docs structure
- Refactor tooling from https://github.com/jolicode/castor

### 1.1.2

Expand Down Expand Up @@ -87,4 +83,4 @@ toc: true

# 1.0.0

- Initial release : Flow, Supervisor, Client
- Initial release
32 changes: 20 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
Contributing
============
# Contributing

Thank you for contributing to this project!
First of all, **thank you** for contributing, **you are awesome**!

Bug reports
-----------
Everybody should be able to help. Here's how you can do it:

1. [Fork it](https://github.com/darkwood-fr/flow/fork)
2. improve it
3. submit a [pull request](https://help.github.com/articles/creating-a-pull-request)

Here's some tips to make you the best contributor ever:

* [Bug reports](#bug-reports)
* [Feature requests](#feature-requests)
* [Creating a pull request](#creating-a-pull-request)
* [Coding standard](#coding-standard)

## Bug reports

Please search existing issues first to make sure this is not a duplicate.
Every issue report has a cost for the developers required to field it; be
Expand All @@ -13,15 +24,13 @@ submission. Try to be as detailed as possible in your problem description
to help us fix the bug. Please adhere to
[sound bug reporting principles](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html).

Feature requests
----------------
## Feature requests

If you wish to propose a feature, please submit an issue. Try to explain your
use case as fully as possible to help us understand why you think the feature
should be added.

Creating a pull request (PR)
----------------------------
## Creating a pull request

First [fork the repository](https://help.github.com/articles/fork-a-repo/) on
GitHub.
Expand Down Expand Up @@ -63,14 +72,13 @@ git rebase -i
git push origin bug-or-feature-description -f
```

Coding standard
---------------
## Coding standard

This project follows the [Symfony](https://symfony.com/doc/current/contributing/code/standards.html) coding style.
Please make sure your pull requests adhere to this standard.

To fix, execute this command after [download PHP CS Fixer](https://cs.symfony.com/):

```shell script
$ php php-cs-fixer.phar fix
$ make cs-fix
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 Mathieu Ledru <[email protected]>
Copyright (c) 2023 Darkwood

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
Loading

0 comments on commit b74d386

Please sign in to comment.