Skip to content

Commit

Permalink
DevKit updates for 4.x branch (#660)
Browse files Browse the repository at this point in the history
* DevKit updates

* DevKit updates

* Fix build

Co-authored-by: Vincent Langlet <vincentlanglet@hotmail.fr>
  • Loading branch information
SonataCI and VincentLanglet committed Mar 28, 2022
1 parent dc45771 commit 07027f0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .php-cs-fixer.dist.php
@@ -1,5 +1,16 @@
<?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.
*/

/*
* DO NOT EDIT THIS FILE!
*
Expand Down
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -44,6 +44,7 @@
"twig/twig": "^2.12.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.4",
"matthiasnoback/symfony-config-test": "^4.2",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"phpstan/extension-installer": "^1.0",
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Expand Up @@ -6,3 +6,4 @@ Pygments==2.9.0
sphinx==1.8.5
git+https://github.com/fabpot/sphinx-php.git@v2.0.2#egg_name=sphinx-php
sphinx_rtd_theme==0.5.2
jinja2==3.0.3
11 changes: 11 additions & 0 deletions psalm.xml
Expand Up @@ -11,4 +11,15 @@
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<issueHandlers>
<!-- Psalm equivalent of PHPStan config `treatPhpDocTypesAsCertain: false` -->
<DocblockTypeContradiction errorLevel="suppress"/>
<RedundantConditionGivenDocblockType errorLevel="suppress"/>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<!-- https://github.com/symfony/symfony/issues/45609 -->
<referencedClass name="UnitEnum"/>
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm>
2 changes: 1 addition & 1 deletion src/DependencyInjection/SonataFormatterExtension.php
Expand Up @@ -51,7 +51,7 @@ public function load(array $configs, ContainerBuilder $container): void
if (isset($bundles['FOSCKEditorBundle'])) {
if (interface_exists(CKEditorConfigurationInterface::class)) {
$loader->load('form.xml');
} else {//NEXT_MAJOR: Remove this case
} else {// NEXT_MAJOR: Remove this case
$loader->load('form_fcke1.xml');
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/Type/FormatterType.php
Expand Up @@ -196,7 +196,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
if (null !== $this->ckEditorConfiguration) {
$defaultConfig = $this->ckEditorConfiguration->getDefaultConfig();
$ckeditorConfiguration = $this->ckEditorConfiguration->getConfig($defaultConfig);
} else {//NEXT_MAJOR: Remove this case
} else {// NEXT_MAJOR: Remove this case
$defaultConfig = $this->configManager->getDefaultConfig();

if ($this->configManager->hasConfig($defaultConfig)) {
Expand All @@ -211,7 +211,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
}

if ($options['ckeditor_context']) {
if (null !== $this->configManager) {//NEXT_MAJOR: Remove this case
if (null !== $this->configManager) {// NEXT_MAJOR: Remove this case
$contextConfig = $this->configManager->getConfig($options['ckeditor_context']);
} else {
$contextConfig = $this->ckEditorConfiguration->getConfig($options['ckeditor_context']);
Expand All @@ -230,7 +230,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
if (\is_string($ckeditorConfiguration['toolbar'])) {
$ckeditorConfiguration['toolbar'] = $this->ckEditorConfiguration->getToolbar($ckeditorConfiguration['toolbar']);
}
} else {//NEXT_MAJOR: Remove this case
} else {// NEXT_MAJOR: Remove this case
if ($this->pluginManager->hasPlugins()) {
$options['ckeditor_plugins'] = $this->pluginManager->getPlugins();
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/Type/SimpleFormatterType.php
Expand Up @@ -106,7 +106,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
if (null !== $this->ckEditorConfiguration) {
$defaultConfig = $this->ckEditorConfiguration->getDefaultConfig();
$ckeditorConfiguration = $this->ckEditorConfiguration->getConfig($defaultConfig);
} else {//NEXT_MAJOR: Remove this case
} else {// NEXT_MAJOR: Remove this case
$defaultConfig = $this->configManager->getDefaultConfig();

if ($this->configManager->hasConfig($defaultConfig)) {
Expand All @@ -121,7 +121,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
}

if ($options['ckeditor_context']) {
if (null !== $this->configManager) {//NEXT_MAJOR: Remove this case
if (null !== $this->configManager) {// NEXT_MAJOR: Remove this case
$contextConfig = $this->configManager->getConfig($options['ckeditor_context']);
} else {
$contextConfig = $this->ckEditorConfiguration->getConfig($options['ckeditor_context']);
Expand All @@ -142,7 +142,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
if (\is_string($ckeditorConfiguration['toolbar'])) {
$ckeditorConfiguration['toolbar'] = $this->ckEditorConfiguration->getToolbar($ckeditorConfiguration['toolbar']);
}
} else {//NEXT_MAJOR: Remove this case
} else {// NEXT_MAJOR: Remove this case
if ($this->pluginManager->hasPlugins()) {
$options['ckeditor_plugins'] = $this->pluginManager->getPlugins();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Expand Up @@ -11,14 +11,14 @@
* file that was distributed with this source code.
*/

use Doctrine\Deprecations\Deprecation;

/*
* DO NOT EDIT THIS FILE!
*
* It's auto-generated by sonata-project/dev-kit package.
*/

use Doctrine\Deprecations\Deprecation;

/*
* fix encoding issue while running text on different host with different locale configuration
*/
Expand Down

0 comments on commit 07027f0

Please sign in to comment.