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
6 changes: 6 additions & 0 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Add custom labels
run: gh pr edit "${{github.event.pull_request.html_url}}" --add-label "with-nightly-tests"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge for Dependabot PRs
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --squash "$PR_URL"
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
11 changes: 6 additions & 5 deletions .github/workflows/reusable-CI-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,23 @@ jobs:
- job-name: Up to date versions # => Highest versions allowed by composer config
php-version: '${{ needs.fetch-supported-versions.outputs.php-max }}'
symfony-version: '${{ needs.fetch-supported-versions.outputs.symfony-max }}'
## Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
pkg-extra-constraints: behat/gherkin:~4.12.0
- job-name: Up to date versions - Special case - Symfony 5.4
php-version: '${{ needs.fetch-supported-versions.outputs.php-max }}'
symfony-version: '5.4'
## Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
# Fix - symfony/yaml - Avoid issue with Sf YAML 6.4+ and Framework bundle
pkg-extra-constraints: behat/gherkin:~4.12.0 symfony/yaml:~6.4.0
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' ) && 'symfony/yaml:~6.4.0' || '' }}
- job-name: Bare minimum # => Lowest versions allowed by composer config
php-version: '${{ needs.fetch-supported-versions.outputs.php-min }}'
symfony-version: '${{ needs.fetch-supported-versions.outputs.symfony-min }}'
- job-name: Bare minimum - Special case - Symfony 5.4
php-version: '${{ needs.fetch-supported-versions.outputs.php-min }}'
symfony-version: '5.4'
- job-name: Late migration - PHP # => Highest symfony version with lowest php version allowed by composer config
php-version: ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.1' || needs.fetch-supported-versions.outputs.php-min }} # Fix - Sf 6.4 require php 8.1 minimum !
# Fix - Sf 6.4 require php 8.1 minimum !
php-version: ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.1' || needs.fetch-supported-versions.outputs.php-min }}
symfony-version: '${{ needs.fetch-supported-versions.outputs.symfony-max }}'
- job-name: Late migration - Symfony # => Lowest symfony version with highest php version allowed by composer config
php-version: '${{ needs.fetch-supported-versions.outputs.php-max }}'
Expand Down Expand Up @@ -217,9 +218,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 Down
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 [email protected]:your-username/php-jsonrpc-params-symfony-constraint-doc-sdk.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/php-jsonrpc-params-symfony-constraint-doc-sdk/compare/).
* Wait for feedback or merge.
* Push to your fork and [submit a pull request](https://github.com/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/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
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

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

[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/build-status/master)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/?branch=master)
Expand All @@ -21,9 +22,9 @@ See [yoanm/symfony-jsonrpc-params-sf-constraints-doc](https://github.com/yoanm/s

## Versions

* Symfony v3/4 PHP >=7.1 : `v0.x`
* Symfony v4/5 PHP >=7.2 : `v1.0`
* Symfony v4.4/5.4/6.x PHP ^8.0 : `v1.1`
* Symfony v3/4 PHP >=7.1 : `v0.x`
* Symfony v4/5 PHP >=7.2 : `v1.0`
* Symfony v4.4/5.4/6.x PHP ^8.0 : `v1.1`

## How to use

Expand Down
39 changes: 18 additions & 21 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupStaticAttributes="false"
colors="true"
processIsolation="false"
Expand All @@ -23,23 +22,21 @@
forceCoversAnnotation="true"

bootstrap="vendor/autoload.php"
>
<listeners>
<listener class="Yoanm\PhpUnitExtended\Listener\YoanmTestsStrategyListener"/>
</listeners>

<testsuites>
<testsuite name="functional">
<directory>tests/Functional/*</directory>
</testsuite>
<testsuite name="technical">
<directory>tests/Technical/*</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>src</directory>
</whitelist>
</filter>
>
<coverage>
<include>
<directory>src</directory>
</include>
</coverage>
<listeners>
<listener class="Yoanm\PhpUnitExtended\Listener\YoanmTestsStrategyListener"/>
</listeners>
<testsuites>
<testsuite name="functional">
<directory>tests/Functional</directory>
</testsuite>
<testsuite name="technical">
<directory>tests/Technical</directory>
</testsuite>
</testsuites>
</phpunit>