- Is ezsystems/apache-tika-bundle compatible with Laravel?
- No. It is an archived Symfony bundle that registers services in Symfony's dependency injection container, and Laravel has no equivalent bundle registration model. You should not install it as a Laravel package. For Laravel, call Apache Tika Server over HTTP from a service class or wrap vaites/php-apache-tika in a Laravel service provider.
- How do I install ezsystems/apache-tika-bundle in a Laravel application?
- You generally cannot install it cleanly in Laravel because it is a Symfony bundle with Symfony2-era dependencies and no Laravel service provider. Composer may resolve the package, but enabling the bundle in AppKernel.php has no meaning in Laravel. Verify the actual Composer package name and namespace first, because the README badges reference jolicode/apache-tika-bundle while the repository is ezsystems/ApacheTikaBundle. The practical path is to install vaites/php-apache-tika directly if you need the PHP client, or skip the package and use Laravel's HTTP client against Tika Server.
- What does ezsystems/apache-tika-bundle actually do?
- It integrates the vaites/php-apache-tika library into Symfony by exposing an apache_tika.client service. You configure either a remote tika-server host and port or a local tika-app JAR path. The bundle is a thin dependency injection wrapper, not the Apache Tika extraction engine itself.
- How do I configure Apache Tika host and port in Laravel?
- The bundle's YAML configuration uses apache_tika host and port keys, but that configuration system is Symfony-specific and does not apply to Laravel. In Laravel, put the Tika Server URL in config/services.php or a dedicated config file and read it with environment variables. Then call the Tika REST endpoints using Laravel's HTTP client with timeouts and retry settings.
- Can I use the apache_tika.client service in Laravel?
- No. The apache_tika.client service ID is registered through Symfony's container and is not available in Laravel's service container. You would need to build your own binding or facade around the underlying PHP client or an HTTP adapter. A small Laravel service class around Tika Server is usually simpler and safer.
- Does ezsystems/apache-tika-bundle support PHP 8, Laravel 10, or Laravel 11?
- There is no indication of modern PHP or Laravel support. The repository is archived and appears Symfony2-era, so PHP 5 or 7 constraints and end-of-life Symfony dependencies are likely. Laravel 10 and 11 require modern PHP versions and would not use Symfony bundle registration anyway. Treat it as incompatible without a fork and significant upgrades.
- What are the best alternatives to ezsystems/apache-tika-bundle for Laravel?
- The strongest option is to run Apache Tika Server as an internal service and call its REST API from Laravel using the HTTP client. If you prefer a PHP-native client, evaluate vaites/php-apache-tika directly and wrap it in a Laravel service provider. You can also use narrower extractors for specific formats when Tika-grade coverage is not required.
- How do I extract text and metadata from documents in Laravel?
- Run Apache Tika Server in a container or internal host, then send document uploads to its tika and meta endpoints from a Laravel service class. Use Laravel's HTTP client with timeouts, payload limits, retries, and structured logging, and move extraction into queued jobs for larger files. Store extracted text and metadata alongside the original document record.
- Is the archived ezsystems/apache-tika-bundle safe for production?
- It carries high maintenance and security risk because archived packages do not receive patches or PHP 8 compatibility work. Apache Tika also introduces a Java runtime dependency and a large untrusted-document parsing attack surface. For production Laravel applications, isolate Tika behind queues, enforce file size and MIME limits, and avoid unmaintained wrappers.
- How do I test Apache Tika extraction in a Laravel application?
- Do not depend on a live Java Tika service in every test. Fake the Laravel HTTP client responses for unit tests and use a small set of representative documents in integration tests against a Tika Server container. Assert extracted text, metadata, timeout handling, and failure paths such as unsupported formats and oversized uploads.