mirror of
https://github.com/code-rhapsodie/FOSCKEditorBundle.git
synced 2026-03-23 22:32:19 +01:00
Merge 1.x (#119)
This commit is contained in:
15
.travis.yml
15
.travis.yml
@@ -37,17 +37,22 @@ matrix:
|
||||
- php: 7.2
|
||||
env: DEPENDENCIES="symfony/lts:^3"
|
||||
|
||||
# Latest commit to master
|
||||
#doc
|
||||
- php: 7.2
|
||||
env: TARGET=docs
|
||||
|
||||
- php: 7.2
|
||||
env: STABILITY="dev"
|
||||
|
||||
#doc
|
||||
- php: '7.2'
|
||||
env: TARGET=docs
|
||||
- php: 7.1
|
||||
env: TARGET=phpstan LEVEL=0
|
||||
|
||||
- php: 7.1
|
||||
env: TARGET=phpstan LEVEL=7
|
||||
|
||||
allow_failures:
|
||||
# Dev-master is allowed to fail.
|
||||
- env: STABILITY="dev"
|
||||
- env: TARGET=phpstan LEVEL=7
|
||||
|
||||
before_install:
|
||||
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
|
||||
|
||||
4
.travis/script_phpstan.sh
Executable file
4
.travis/script_phpstan.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
composer require phpstan/phpstan
|
||||
php vendor/bin/phpstan analyse -l ${LEVEL} src tests -c phpstan.neon
|
||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,2 +1,12 @@
|
||||
# CHANGELOG
|
||||
|
||||
## [1.1.0](https://github.com/FriendsOfSymfony/FOSCKEditorBundle/compare/1.0.0...1.1.0) - 2018-05-25
|
||||
### Added
|
||||
- Deprecation message for IvoryCKEditorBundle
|
||||
|
||||
### Changed
|
||||
- The command is now lazy loaded in Symfony 3.4+
|
||||
|
||||
### Fixed
|
||||
- `ckeditor:install` command not working with `--no-interaction`
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Enable the Templates Plugin
|
||||
|
||||
The bundle offers you the ability to manage extra templates. To use this
|
||||
feature, you need to enable the ``templates`` plugins shipped with the bundle.
|
||||
You can define iy globally in your configuration:
|
||||
You can define it globally in your configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
||||
7
phpstan.neon
Normal file
7
phpstan.neon
Normal file
@@ -0,0 +1,7 @@
|
||||
parameters:
|
||||
bootstrap: %currentWorkingDirectory%/tests/autoload.php
|
||||
excludes_analyse:
|
||||
- %currentWorkingDirectory%/src/Resources/views/Form/*html.php
|
||||
- %currentWorkingDirectory%/tests/autoload.php
|
||||
ignoreErrors:
|
||||
- '#AbstractTestCase::getMock()#'
|
||||
@@ -15,7 +15,6 @@ namespace FOS\CKEditorBundle\Command;
|
||||
use FOS\CKEditorBundle\Installer\CKEditorInstaller;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\ProgressBar;
|
||||
use Symfony\Component\Console\Helper\ProgressHelper;
|
||||
use Symfony\Component\Console\Helper\QuestionHelper;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
@@ -160,9 +159,9 @@ EOF
|
||||
*/
|
||||
private function createNotifier(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$clear = $this->createProgressBar($output);
|
||||
$download = $this->createProgressBar($output);
|
||||
$extract = $this->createProgressBar($output);
|
||||
$clear = new ProgressBar($output);
|
||||
$download = new ProgressBar($output);
|
||||
$extract = new ProgressBar($output);
|
||||
|
||||
return function ($type, $data) use ($input, $output, $clear, $download, $extract) {
|
||||
switch ($type) {
|
||||
@@ -209,7 +208,7 @@ EOF
|
||||
break;
|
||||
|
||||
case CKEditorInstaller::NOTIFY_CLEAR_SIZE:
|
||||
$this->startProgressBar($clear, $output, $data);
|
||||
$clear->start($data);
|
||||
|
||||
break;
|
||||
|
||||
@@ -224,12 +223,12 @@ EOF
|
||||
break;
|
||||
|
||||
case CKEditorInstaller::NOTIFY_DOWNLOAD_PROGRESS:
|
||||
$this->advanceProgressBar($download, $data);
|
||||
$download->advance($data);
|
||||
|
||||
break;
|
||||
|
||||
case CKEditorInstaller::NOTIFY_DOWNLOAD_SIZE:
|
||||
$this->startProgressBar($download, $output, $data);
|
||||
$download->start($data);
|
||||
|
||||
break;
|
||||
|
||||
@@ -249,7 +248,7 @@ EOF
|
||||
break;
|
||||
|
||||
case CKEditorInstaller::NOTIFY_EXTRACT_SIZE:
|
||||
$this->startProgressBar($extract, $output, $data);
|
||||
$extract->start($data);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -348,7 +347,7 @@ EOF
|
||||
$result = $helper->ask(
|
||||
$input,
|
||||
$output,
|
||||
new ChoiceQuestion($question, $choices, $choices[$default])
|
||||
new ChoiceQuestion($question, $choices, $default)
|
||||
);
|
||||
|
||||
$output->writeln('');
|
||||
@@ -357,37 +356,8 @@ EOF
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ProgressBar $progress
|
||||
* @param OutputInterface $output
|
||||
*
|
||||
* @return ProgressBar|ProgressHelper
|
||||
*/
|
||||
private function createProgressBar(OutputInterface $output)
|
||||
{
|
||||
return class_exists(ProgressBar::class) ? new ProgressBar($output) : new ProgressHelper();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ProgressBar|ProgressHelper $progress
|
||||
* @param OutputInterface $output
|
||||
* @param int|null $max
|
||||
*/
|
||||
private function startProgressBar($progress, OutputInterface $output, $max = null)
|
||||
{
|
||||
class_exists(ProgressBar::class) ? $progress->start($max) : $progress->start($output, $max);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ProgressBar|ProgressHelper $progress
|
||||
* @param int $current
|
||||
*/
|
||||
private function advanceProgressBar($progress, $current)
|
||||
{
|
||||
class_exists(ProgressBar::class) ? $progress->setProgress($current) : $progress->setCurrent($current);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ProgressBar|ProgressHelper $progress
|
||||
* @param OutputInterface $output
|
||||
*/
|
||||
private function finishProgressBar($progress, OutputInterface $output)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the FOSCKEditor Bundle.
|
||||
*
|
||||
* (c) 2018 - present Friends of Symfony
|
||||
* (c) 2009 - 2017 Eric GELOEN <geloen.eric@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please read the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use FOS\CKEditorBundle\Renderer\CKEditorRendererInterface;
|
||||
|
||||
/*
|
||||
* @var CKEditorRendererInterface[] $view
|
||||
* @var string $id
|
||||
* @var string $base_path
|
||||
* @var string $js_path
|
||||
* @var string $jquery_path
|
||||
* @var bool $jquery
|
||||
* @var bool $require_js
|
||||
* @var string[][] $styles
|
||||
* @var string[][] $plugins
|
||||
* @var string[][] $templates
|
||||
* @var string $auto_inline
|
||||
* @var string $input_sync
|
||||
* @var string $inline
|
||||
* @var string $filebrowsers
|
||||
* @var array $config
|
||||
*/
|
||||
|
||||
?>
|
||||
<?php if ($autoload) : ?>
|
||||
<script type="text/javascript">
|
||||
var CKEDITOR_BASEPATH = "<?php echo $view['fos_ckeditor']->renderBasePath($base_path); ?>";
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the FOSCKEditor Bundle.
|
||||
*
|
||||
* (c) 2018 - present Friends of Symfony
|
||||
* (c) 2009 - 2017 Eric GELOEN <geloen.eric@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please read the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
* @var bool $async
|
||||
*/
|
||||
?>
|
||||
<?php if ($enable && $async) : ?>
|
||||
<?php include __DIR__.'/_ckeditor_javascript.html.php'; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the FOSCKEditor Bundle.
|
||||
*
|
||||
* (c) 2018 - present Friends of Symfony
|
||||
* (c) 2009 - 2017 Eric GELOEN <geloen.eric@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please read the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var CKEditorRendererInterface|FormView[]
|
||||
* @var object $form
|
||||
* @var string $value
|
||||
* @var bool $enable
|
||||
* @var bool $async
|
||||
*/
|
||||
use FOS\CKEditorBundle\Renderer\CKEditorRendererInterface;
|
||||
use Symfony\Component\Form\FormView;
|
||||
|
||||
?>
|
||||
<textarea <?php echo $view['form']->block($form, 'attributes'); ?>><?php echo htmlspecialchars($value); ?></textarea>
|
||||
|
||||
<?php if ($enable && !$async) : ?>
|
||||
|
||||
@@ -25,7 +25,6 @@ use Symfony\Component\Form\FormRendererInterface;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Symfony\Component\Templating\Helper\CoreAssetsHelper;
|
||||
|
||||
/**
|
||||
* @author GeLo <geloen.eric@gmail.com>
|
||||
@@ -39,7 +38,7 @@ abstract class AbstractFOSCKEditorExtensionTest extends AbstractTestCase
|
||||
private $container;
|
||||
|
||||
/**
|
||||
* @var Packages|CoreAssetsHelper|\PHPUnit_Framework_MockObject_MockObject
|
||||
* @var Packages|\PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
private $packages;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user