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

DevKit updates for 4.x branch #1406

Merged
merged 1 commit into from
Sep 8, 2021
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
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ tests export-ignore
docs export-ignore
Makefile export-ignore
phpunit.xml.dist export-ignore
phpstan.neon.dist export-ignore
phpstan-baseline.neon export-ignore
phpstan-console-application.php export-ignore
psalm.xml export-ignore
psalm-baseline.xml export-ignore
62 changes: 62 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

name: Quality assurance

on:
push:
branches:
- 4.x
- master
pull_request:

jobs:
phpstan:
name: PHPStan

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: composer:v2

- name: Install Composer dependencies (highest)
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "--prefer-dist --prefer-stable"

- name: PHPStan
run: vendor/bin/phpstan --memory-limit=1G analyse
psalm:
name: Psalm

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: composer:v2

- name: Install Composer dependencies (highest)
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "--prefer-dist --prefer-stable"

- name: Psalm
run: vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc) --shepherd --php-version=8.0
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,17 @@ For instance, assuming you want to introduce a new method to an existing interfa

namespace Foo;

/**
* @method void usefulMethod()
*/
interface BarInterface
{
/**
* NEXT_MAJOR: Uncomment this method
*
* This method does useful stuff.
*/
// public function usefulMethod();
// public function usefulMethod(): void;

// …
}
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@ coverage:
docs:
cd docs && sphinx-build -W -b dirhtml -d _build/doctrees . _build/html
.PHONY: docs

phpstan:
vendor/bin/phpstan --memory-limit=1G analyse
.PHONY: phpstan

psalm:
vendor/bin/psalm
.PHONY: psalm
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Symfony SonataUserBundle

[![Latest Stable Version](https://poser.pugx.org/sonata-project/user-bundle/v/stable)](https://packagist.org/packages/sonata-project/user-bundle)
[![Latest Unstable Version](https://poser.pugx.org/sonata-project/user-bundle/v/unstable)](https://packagist.org/packages/sonata-project/user-bundle)
[![Psalm Type Coverage][shepherd_stable_badge]][shepherd_stable_link]
[![License](https://poser.pugx.org/sonata-project/user-bundle/license)](https://packagist.org/packages/sonata-project/user-bundle)

[![Total Downloads](https://poser.pugx.org/sonata-project/user-bundle/downloads)](https://packagist.org/packages/sonata-project/user-bundle)
Expand Down Expand Up @@ -45,6 +46,8 @@ This package is available under the [MIT license](LICENSE).
[coverage_stable_link]: https://codecov.io/gh/sonata-project/SonataUserBundle/branch/4.x
[coverage_unstable_badge]: https://codecov.io/gh/sonata-project/SonataUserBundle/branch/master/graph/badge.svg
[coverage_unstable_link]: https://codecov.io/gh/sonata-project/SonataUserBundle/branch/master
[shepherd_stable_badge]: https://shepherd.dev/github/sonata-project/SonataUserBundle/coverage.svg
[shepherd_stable_link]: https://shepherd.dev/github/sonata-project/SonataUserBundle

[documentation_stable_badge]: https://readthedocs.org/projects/sonatauserbundle/badge/?version=4.x
[documentation_stable_link]: https://docs.sonata-project.org/projects/SonataUserBundle/en/4.x/?badge=4.x
Expand Down