Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 21 additions & 21 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
updates:
#
#
# [GHAction]
# Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/github-action.yml file
#
#
#
# [GHAction]
# Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/github-action.yml file
#
- package-ecosystem: github-actions
directory: /
schedule:
Expand All @@ -14,22 +14,22 @@ updates:
prefix: '[dependabot][ghaction] - ' # No need to specify prod/dev for GHAction as there is only "production" updates !
include: scope
groups:
# Group all basic updates inside the a single PR
# No need to split prod/dev as there is only prod updates
# Group all basic updates inside the a single PR
# No need to split prod/dev as there is only prod updates
all-actions:
applies-to: version-updates
patterns: ['*']
# Group all security updates inside the a single PR
# No need to split prod/dev as there is only prod updates
# +Most likely no need to split major and other updates either
# Group all security updates inside the a single PR
# No need to split prod/dev as there is only prod updates
# +Most likely no need to split major and other updates either
SECURITY-all:
applies-to: security-updates
patterns: ['*']
#
#
# [Composer]
# Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/composer.yml file
#
#
#
# [Composer]
# Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/composer.yml file
#
- package-ecosystem: composer
directory: /
schedule: # Create PRs during week-ends, they will be ready on monday morning
Expand All @@ -41,9 +41,9 @@ updates:
prefix-development: '[dependabot][dev][composer] - '
include: scope
groups:
# Split basic updates by:
# - prod vs dev
# - major vs others (assuming packages properly follow semver !)
# Split basic updates by:
# - prod vs dev
# - major vs others (assuming packages properly follow semver !)
prod-majors:
applies-to: version-updates
dependency-type: production
Expand All @@ -62,9 +62,9 @@ updates:
applies-to: version-updates
dependency-type: development
patterns: ['*']
# Split security updates by:
# - prod vs dev
# - Major prod updates vs other prod updates
# Split security updates by:
# - prod vs dev
# - Major prod updates vs other prod updates
SECURITY-prod-major:
applies-to: security-updates
dependency-type: production
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
checks: write # For the check run creation !

jobs:
upload:
coverage:
name: Coverage
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-check-CI-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
contents: read
uses: ./.github/workflows/reusable-CI-workflow.yml

upload:
coverage:
name: Coverage
needs: [tests]
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-CI-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ jobs:
needs: [ fetch-supported-versions, tests ]
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'with-nightly-tests') ) }}
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: read
continue-on-error: true
env:
COMPOSER_IGNORE_PLATFORM_REQ: 'php+'
strategy:
Expand All @@ -246,7 +246,7 @@ jobs:
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }}
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-max == '8.4' ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }}
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-max == '8.4' ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }}
- job-name: Symfony - With lowest supported PHP version
# Fix - Sf 7.0 require php 8.1 minimum, most of deps require 8.2 !
php-version: ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.2' || needs.fetch-supported-versions.outputs.php-min }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/reusable-coverage-upload-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
outputs:
commit-sha: ${{ steps.fetch-workflow-metadata.outputs.commit-sha }}
run-id: ${{ steps.fetch-workflow-metadata.outputs.run-id }}
branch: ${{ steps.fetch-workflow-metadata.outputs.branch }}
pull-request: ${{ steps.fetch-workflow-metadata.outputs.pull-request }}

codacy-uploader:
name: Codacy
Expand Down Expand Up @@ -64,6 +66,6 @@ jobs:
run-id: ${{ needs.fetch-info.outputs.run-id }}
force-git-commit: ${{ needs.fetch-info.outputs.commit-sha }}
force-git-branch: ${{ needs.fetch-info.outputs.branch }}
force-gh-pr: ${{ needs.fetch-info.outputs.pr-number }}
force-gh-pr: ${{ needs.fetch-info.outputs.pull-request }}
force-uploader-build: ${{ needs.fetch-info.outputs.run-id }}
force-uploader-build-url: ${{ needs.fetch-info.outputs.run-url }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ build
#A library must not provide a composer.lock file
composer.lock

features/demo_app/var
# Demo app excluded dirs
features/demo_app/var/

#Phpunit
.phpunit.result.cache
6 changes: 5 additions & 1 deletion .remarkrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"plugins": [
"remark-preset-lint-consistent",
"remark-preset-lint-recommended"
"remark-preset-lint-recommended",
[
"remark-lint-list-item-indent",
"space"
]
]
}
1 change: 0 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ build:
variables:
CI: 'true'
TEST_OUTPUT_STYLE: 'pretty'
COMPOSER_OPTIONS: '--optimize-autoloader'
COVERAGE_OUTPUT_STYLE: 'clover'
COVERAGE_CLOVER_FILE_PATH: 'build/coverage/clover.xml'
PHPCS_DISABLE_WARNING: 'true'
Expand Down
6 changes: 3 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ include:
Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
professional setting

## Our Responsibilities

Expand Down
32 changes: 19 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
# Contributing

## Getting Started
* Fork, then clone the repo:

* Fork, then clone the repo:

```bash
git clone git@github.com:your-username/symfony-jsonrpc-http-server-swagger-doc.git
````
```

* Make sure everything goes well:

* Make sure everything goes well:
```bash
make build
make test
```

* Make your changes (Add/Update tests according to your changes).
* Make sure tests are still green:
* Make your changes (Add/Update tests according to your changes).
* Make sure tests are still green:

```bash
make test
```

* To check code coverage, launch
* To check code coverage, launch

```bash
make coverage
```

* Push to your fork and [submit a pull request](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc/compare/).
* Wait for feedback or merge.
* Push to your fork and [submit a pull request](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc/compare/).
* Wait for feedback or merge.

Some stuff that will increase your pull request's acceptance:

Some stuff that will increase your pull request's acceptance:
* Write tests.
* Follow PSR-2 coding style.
* Write good commit messages.
* Do not rebase or squash your commits when a review has been made.
* Write tests.
* Follow PSR-2 coding style.
* Write good commit messages.
* Do not rebase or squash your commits when a review has been made.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,13 @@ scrutinizer-behat:
create-build-directories:
mkdir -p ${PHPUNIT_COVERAGE_DIRECTORY} ${BEHAT_COVERAGE_DIRECTORY} ${REPORTS_DIRECTORY}

.PHONY: configure-dev-env
configure-dev-env:
npm install --global remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-lint-list-item-indent

.PHONY: lint-markdown
lint-markdown:
npx remark . --output

.PHONY: build install configure test test-unit test-functional codestyle create-build-directories scrutinizer-behat scrutinizer-phpunit
.DEFAULT: build
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

[![License](https://img.shields.io/github/license/yoanm/symfony-jsonrpc-http-server-swagger-doc.svg)](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc)
[![Code size](https://img.shields.io/github/languages/code-size/yoanm/symfony-jsonrpc-http-server-swagger-doc.svg)](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\&repo=yoanm/symfony-jsonrpc-http-server-swagger-doc)](https://dependabot.com)
![Dependabot Status](https://flat.badgen.net/github/dependabot/yoanm/symfony-jsonrpc-http-server-swagger-doc)
![Last commit](https://badgen.net/github/last-commit/yoanm/symfony-jsonrpc-http-server-swagger-doc)

[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/symfony-jsonrpc-http-server-swagger-doc.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-swagger-doc/build-status/master)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/symfony-jsonrpc-http-server-swagger-doc/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-swagger-doc/?branch=master)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e50269d2b7bc465fa43a9f9000bc5f06)](https://app.codacy.com/gh/yoanm/symfony-jsonrpc-http-server-swagger-doc/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e50269d2b7bc465fa43a9f9000bc5f06)](https://app.codacy.com/gh/yoanm/symfony-jsonrpc-http-server-swagger-doc/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)

[![CI](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc/actions/workflows/CI.yml)
[![codecov](https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server-swagger-doc/branch/master/graph/badge.svg?token=NHdwEBUFK5)](https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server-swagger-doc)
Expand All @@ -21,8 +22,8 @@ Symfony bundle for [yoanm/jsonrpc-http-server-swagger-doc-sdk](https://github.co

## Versions

* Symfony v3/4 - PHP >=7.1 : `^v0.X`
* Symfony v4/5 - PHP >=7.2 : `^v1.0`
* Symfony v3/4 - PHP >=7.1 : `^v0.X`
* Symfony v4/5 - PHP >=7.2 : `^v1.0`

## How to use

Expand All @@ -34,24 +35,24 @@ See below how to configure it.

[Behat demo app configuration folders](./features/demo_app) can be used as examples.

* Add the bundles in your config/bundles.php file:
```php
// config/bundles.php
return [
...
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServerDoc\JsonRpcHttpServerDocBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServerSwaggerDoc\JsonRpcHttpServerSwaggerDocBundle::class => ['all' => true],
...
];
```
* Add the bundles in your config/bundles.php file:
```php
// config/bundles.php
return [
...
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServerDoc\JsonRpcHttpServerDocBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServerSwaggerDoc\JsonRpcHttpServerSwaggerDocBundle::class => ['all' => true],
...
];
```

* Configure `yoanm/symfony-jsonrpc-http-server` as described on [yoanm/symfony-jsonrpc-http-server](https://github.com/yoanm/symfony-jsonrpc-http-server) documentation.
* Configure `yoanm/symfony-jsonrpc-http-server` as described on [yoanm/symfony-jsonrpc-http-server](https://github.com/yoanm/symfony-jsonrpc-http-server) documentation.

* Configure `yoanm/symfony-jsonrpc-http-server-doc` as described on [yoanm/symfony-jsonrpc-http-server-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-doc) documentation.
* Configure `yoanm/symfony-jsonrpc-http-server-doc` as described on [yoanm/symfony-jsonrpc-http-server-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-doc) documentation.

* Query your project at `/doc/swagger.json` endpoint and you will have a swagger json documentation file of your server.
* Query your project at `/doc/swagger.json` endpoint and you will have a swagger json documentation file of your server.

## Event

Expand Down
Loading