From a2a257539e525be590b2463d0262dea2c59eb76d Mon Sep 17 00:00:00 2001 From: Markus Bachmann Date: Tue, 28 May 2019 23:49:51 +0200 Subject: [PATCH 1/4] Add symfony 4 support --- .travis.yml | 6 +++--- DependencyInjection/ApacheTikaExtension.php | 1 + composer.json | 8 +++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c0b006..4974f71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,12 +24,12 @@ before_script: matrix: include: - php: hhvm - - php: 5.4 - - php: 5.5 - - php: 5.6 env: deps=high - php: 7.0 env: deps=low + - php: 7.1 + - php: 7.2 + - php: 7.3 install: - if [ "$deps" = "low" ]; then composer --prefer-source --prefer-lowest update; fi; diff --git a/DependencyInjection/ApacheTikaExtension.php b/DependencyInjection/ApacheTikaExtension.php index 5aebde8..513416e 100644 --- a/DependencyInjection/ApacheTikaExtension.php +++ b/DependencyInjection/ApacheTikaExtension.php @@ -40,6 +40,7 @@ public function load(array $configs, ContainerBuilder $container) )); } + $client->setPublic(true); $container->setDefinition('apache_tika.client', $client); } } diff --git a/composer.json b/composer.json index 45f492f..986588a 100644 --- a/composer.json +++ b/composer.json @@ -14,14 +14,12 @@ "require": { "php": "~5.4|^7.0", "vaites/php-apache-tika": "~0.3", - "symfony/http-kernel": "~2.3|~3.0", - "symfony/framework-bundle": "~2.3|~3.0" + "symfony/http-kernel": "^2.3|^3.0|^4.0", + "symfony/framework-bundle": "^2.3|^3.0|^4.0" }, "require-dev": { "fabpot/php-cs-fixer": "^1.11", - "phpunit/phpunit": "~4.8|~5.1", - "symfony/config": "~2.3|~3.0", - "symfony/dependency-injection": "~2.3|~3.0" + "phpunit/phpunit": "~4.8|~5.1" }, "autoload": { "psr-4": { From a4eff7d934b7f5956006f95069d97cd4c5b90c5f Mon Sep 17 00:00:00 2001 From: Markus Bachmann Date: Tue, 28 May 2019 23:53:12 +0200 Subject: [PATCH 2/4] disable hhvm --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4974f71..7017303 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,13 +23,12 @@ before_script: matrix: include: - - php: hhvm - env: deps=high - php: 7.0 env: deps=low - php: 7.1 - php: 7.2 - php: 7.3 + env: deps=high install: - if [ "$deps" = "low" ]; then composer --prefer-source --prefer-lowest update; fi; From c2e425f84e1877f17331235a92719ac10d151c7b Mon Sep 17 00:00:00 2001 From: Markus Bachmann Date: Wed, 29 May 2019 00:16:00 +0200 Subject: [PATCH 3/4] Fix unit tests --- .travis.yml | 4 ++-- composer.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7017303..1ff2205 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ env: before_script: - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi - - \[ -f $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-app.jar \] || wget -O $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-app.jar http://archive.apache.org/dist/tika/tika-app-1.11.jar - - \[ -f $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-server.jar \] || wget -O $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-server.jar -nc http://archive.apache.org/dist/tika/tika-server-1.11.jar + - \[ -f $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-app.jar \] || wget -O $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-app.jar http://archive.apache.org/dist/tika/tika-app-1.21.jar + - \[ -f $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-server.jar \] || wget -O $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-server.jar -nc http://archive.apache.org/dist/tika/tika-server-1.21.jar - java -jar $HOME/build/jolicode/ApacheTikaBundle/Tests/bin/tika-server.jar & - sleep 5 diff --git a/composer.json b/composer.json index 986588a..6e9e11b 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ "require": { "php": "~5.4|^7.0", "vaites/php-apache-tika": "~0.3", - "symfony/http-kernel": "^2.3|^3.0|^4.0", - "symfony/framework-bundle": "^2.3|^3.0|^4.0" + "symfony/http-kernel": "^2.8|^3.0|^4.0", + "symfony/framework-bundle": "^2.8|^3.0|^4.0" }, "require-dev": { "fabpot/php-cs-fixer": "^1.11", From 8d24bb5625d72476b69f16794a7bc84f064333bf Mon Sep 17 00:00:00 2001 From: Markus Bachmann Date: Wed, 29 May 2019 00:40:32 +0200 Subject: [PATCH 4/4] Update makefile --- .travis.yml | 1 - Makefile | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ff2205..68918e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ sudo: false cache: directories: - $HOME/.composer/cache - - $HOME/build/jolicode/ApacheTikaBundle/Tests/bin env: global: diff --git a/Makefile b/Makefile index 446fce0..385925a 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,13 @@ cs: ./vendor/fabpot/php-cs-fixer/php-cs-fixer fix --verbose start_tika_server: - \[ -f Tests/bin/tika-server.jar \] || wget -O Tests/bin/tika-server.jar http://archive.apache.org/dist/tika/tika-server-1.11.jar + \[ -f Tests/bin/tika-server.jar \] || wget -O Tests/bin/tika-server.jar http://archive.apache.org/dist/tika/tika-server-1.21.jar @make -s stop java -jar Tests/bin/tika-server.jar & sleep 10 get_tika_app: - \[ -f Tests/bin/tika-app.jar \] || wget -O Tests/bin/tika-app.jar http://archive.apache.org/dist/tika/tika-app-1.11.jar + \[ -f Tests/bin/tika-app.jar \] || wget -O Tests/bin/tika-app.jar http://archive.apache.org/dist/tika/tika-app-1.21.jar test: get_tika_app start_tika_server ./vendor/bin/phpunit