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 5.x branch #1524

Merged
merged 1 commit into from
Mar 20, 2022
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tests export-ignore
docs export-ignore
Makefile export-ignore
phpunit.xml.dist export-ignore
bin/console export-ignore
phpstan.neon.dist export-ignore
phpstan-baseline.neon export-ignore
phpstan-console-application.php export-ignore
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- cron: '30 0 * * *'
push:
branches:
- 4.x
- 5.x
- 6.x
pull_request:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- cron: '30 0 * * *'
push:
branches:
- 4.x
- 5.x
- 6.x
pull_request:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- cron: '30 0 * * *'
push:
branches:
- 4.x
- 5.x
- 6.x
pull_request:
Expand Down
115 changes: 115 additions & 0 deletions .github/workflows/symfony-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

name: Symfony Lint

on:
schedule:
- cron: '30 0 * * *'
push:
branches:
- 5.x
- 6.x
pull_request:

jobs:
container:
name: Symfony container

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.1'
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: Lint container
run: make lint-symfony-container

twig:
name: Twig files

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.1'
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: Lint twig files
run: make lint-symfony-twig

xliff:
name: XLIFF files

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.1'
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: Lint xliff files
run: make lint-symfony-xliff

yaml:
name: YML files

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.1'
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: Lint yaml files
run: make lint-symfony-yaml
1 change: 0 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- cron: '30 0 * * *'
push:
branches:
- 4.x
- 5.x
- 6.x
pull_request:
Expand Down
2 changes: 0 additions & 2 deletions .symfony.bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
# It's auto-generated by sonata-project/dev-kit package.

branches:
- 4.x
- 5.x
- 6.x

maintained_branches:
- 4.x
- 5.x
- 6.x

Expand Down
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,25 @@ lint-php:
php-cs-fixer fix --ansi --verbose --diff --dry-run
.PHONY: lint-php

lint-symfony: lint-symfony-container lint-symfony-twig lint-symfony-xliff lint-symfony-yaml
.PHONY: lint-symfony

lint-symfony-container:
bin/console lint:container
.PHONY: lint-symfony-container

lint-symfony-twig:
bin/console lint:twig src tests
.PHONY: lint-symfony-twig

lint-symfony-xliff:
bin/console lint:xliff src tests
.PHONY: lint-symfony-xliff

lint-symfony-yaml:
bin/console lint:yaml src tests
.PHONY: lint-symfony-yaml

cs-fix: cs-fix-php cs-fix-xml cs-fix-xliff cs-fix-composer
.PHONY: cs-fix

Expand Down
29 changes: 29 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Sonata\UserBundle\Tests\App\AppKernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;

if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the ' . PHP_SAPI . ' SAPI' . PHP_EOL;
}

set_time_limit(0);

require dirname(__DIR__) . '/vendor/autoload.php';

$kernel = new AppKernel();
$application = new Application($kernel);
$application->run(new ArgvInput());
1 change: 0 additions & 1 deletion docs/.doctor-rst.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ rules:
whitelist:
lines:
- '.. versionadded:: 5.x'
- 'resource: "@NelmioApiDocBundle/Resources/config/routing.yml"'