Skip to content

Commit 0d7bf23

Browse files
tranbafguillot
authored andcommitted
Make plugin compatible with PHP 5.6
1 parent 850720a commit 0d7bf23

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ notifications:
55

66
php:
77
- 7.0
8+
- 5.6
89

910
env:
1011
global:

Command/MigrateCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@ protected function configure()
2323
protected function execute(InputInterface $input, OutputInterface $output)
2424
{
2525
if (! file_exists(FILES_DIR)) {
26-
$output->writeln('<error>Directory not found: '.FILES_DIR.'</error>');
26+
$output->writeln('<error>Directory not found: ' . FILES_DIR . '</error>');
2727
} else {
2828
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(FILES_DIR), RecursiveIteratorIterator::SELF_FIRST);
2929
$storage = new DatabaseObjectStorage($this->container['db']);;
3030

3131
foreach($files as $file) {
32-
if ($file->getFilename(){0} !== '.' && ! $file->isDir()) {
32+
$fileName = $file->getFilename();
33+
if ($fileName{0} !== '.' && ! $file->isDir()) {
3334
$key = substr($file->getRealPath(), strlen(FILES_DIR) + 1);
3435

3536
if (! $this->fileExists($storage, $key)) {
36-
$output->writeln('<info>Migrating '.$file->getFilename().'</info>');
37+
$output->writeln('<info>Migrating ' . $fileName . '</info>');
3738
$blob = $this->readFile($file->getRealPath());
3839
$storage->put($key, $blob);
3940
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Author
1414
Requirements
1515
------------
1616

17-
- PHP >= 7.0
17+
- PHP >= 5.6
1818
- Kanboard >= 1.2.1
1919
- Postgres is recommended
2020
- Mysql or Sqlite

0 commit comments

Comments
 (0)