-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Symfony 5 Compatibility
- Loading branch information
Showing
50 changed files
with
885 additions
and
968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,39 +6,24 @@ cache: | |
- $HOME/.composer/cache | ||
- $HOME/symfony-bridge/.phpunit | ||
|
||
env: | ||
global: | ||
- COMPOSER_PREFER_LOWEST=false | ||
- SYMFONY_DEPRECATIONS_HELPER=weak_vendors | ||
- SYMFONY_PHPUNIT_BRIDGE_VERSION=4.0.* | ||
- SYMFONY_VERSION=3.4.* | ||
- PHPUNIT_FLAGS="-v" | ||
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" | ||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 7.2 | ||
env: SYMFONY_VERSION=4.1.* SYMFONY_PHPUNIT_BRIDGE_VERSION=4.1.* SYMFONY_DEPRECATIONS_HELPER=weak_vendors LEVEL=0 | ||
- php: 7.3 | ||
env: SYMFONY_VERSION=4.1.* SYMFONY_PHPUNIT_BRIDGE_VERSION=4.1.* SYMFONY_DEPRECATIONS_HELPER=weak_vendors LEVEL=0 | ||
- php: 7.1 | ||
env: SYMFONY_VERSION=4.2.* SYMFONY_PHPUNIT_BRIDGE_VERSION=4.2.* SYMFONY_DEPRECATIONS_HELPER=weak_vendors LEVEL=0 | ||
- php: 7.2 | ||
env: SYMFONY_VERSION=4.2.* SYMFONY_PHPUNIT_BRIDGE_VERSION=4.2.* SYMFONY_DEPRECATIONS_HELPER=weak_vendors LEVEL=0 | ||
- php: 7.3 | ||
env: SYMFONY_VERSION=4.2.* SYMFONY_PHPUNIT_BRIDGE_VERSION=4.2.* SYMFONY_DEPRECATIONS_HELPER=weak_vendors LEVEL=0 | ||
- php: 7.2 | ||
env: SYMFONY_VERSION="^4.4.0" | ||
- php: 7.3 | ||
env: SYMFONY_VERSION="^5.0.0" | ||
|
||
before_install: | ||
- echo "memory_limit=2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- echo "memory_limit=4G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- phpenv config-rm xdebug.ini || true | ||
- composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master | ||
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update "symfony/framework-bundle:${SYMFONY_VERSION}"; fi; | ||
|
||
install: | ||
- composer require --no-update symfony/symfony:${SYMFONY_VERSION} | ||
- composer require --no-update symfony/form:${SYMFONY_VERSION} | ||
- composer require --dev --no-update symfony/phpunit-bridge:${SYMFONY_PHPUNIT_BRIDGE_VERSION} | ||
- composer update --prefer-source `if [[ $COMPOSER_PREFER_LOWEST = true ]]; then echo "--prefer-lowest --prefer-stable"; fi` | ||
install: php -d memory_limit=-1 $(phpenv which composer) update $COMPOSER_FLAGS --no-suggest | ||
|
||
script: | ||
- SYMFONY_PHPUNIT_VERSION=6.5 ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS | ||
- ./vendor/bin/phpunit --coverage-text --colors | ||
|
||
notifications: | ||
email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FM\ElfinderBundle\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | ||
use Symfony\Component\Filesystem\Filesystem; | ||
|
||
final class ElFinderInstallerCommand extends Command | ||
{ | ||
private const ELFINDER_CSS_DIR = 'vendor/studio-42/elfinder/css'; | ||
|
||
private const ELFINDER_JS_DIR = 'vendor/studio-42/elfinder/js'; | ||
|
||
private const ELFINDER_SOUNDS_DIR = 'vendor/studio-42/elfinder/sounds'; | ||
|
||
private const ELFINDER_IMG_DIR = 'vendor/studio-42/elfinder/img'; | ||
|
||
protected static $defaultName = 'elfinder:install'; | ||
|
||
protected $fileSystem; | ||
|
||
protected $parameterBag; | ||
|
||
public function __construct(Filesystem $filesystem, ParameterBagInterface $parameterBag) | ||
{ | ||
$this->fileSystem = $filesystem; | ||
$this->parameterBag = $parameterBag; | ||
parent::__construct(); | ||
} | ||
|
||
protected function configure(): void | ||
{ | ||
$this | ||
->setDescription('Copies elfinder assets to public directory') | ||
; | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
$publicDir = $this->parameterBag->get('kernel.project_dir').'/public/bundles/fmelfinder'; | ||
|
||
$this->fileSystem->mirror(self::ELFINDER_CSS_DIR, $publicDir.'/css'); | ||
$this->fileSystem->mirror(self::ELFINDER_IMG_DIR, $publicDir.'/img'); | ||
$this->fileSystem->mirror(self::ELFINDER_JS_DIR, $publicDir.'/js'); | ||
$this->fileSystem->mirror(self::ELFINDER_SOUNDS_DIR, $publicDir.'/sounds'); | ||
|
||
$output->writeln('elFinder assets successfully installed'); | ||
|
||
return 0; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Configuration/ElFinderConfigurationProviderInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FM\ElfinderBundle\Configuration; | ||
|
||
/** | ||
* Interface ElFinderConfigurationProviderInterface. | ||
*/ | ||
interface ElFinderConfigurationProviderInterface | ||
{ | ||
public function getConfiguration(string $instance): array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.