Closed adjenks closed 4 years ago
To create an example file, just attach a word document to an email and parse it.
Thanks @adjenks, will take a look. I think you're right... This method was implemented to save calls, not thinking on multiple files. Need to think how to implement it...
@vaites Cool, thank you for making the library.
Can I ask you what version of PHP are you using?.
@vaites PHP 7.1.33
Thanks @adjenks, I'm working on the 1.0.0 release that will drop support for PHP 5. The minimum version will be 7.1 and this fix must be added into a new major release because is a breaking change. Do yo agree?
Yes, I think that this feature is required and it is a breaking change, so I think the change should be made and the major version should be rolled up. All sounds good to me.
OK thanks. Will try to release the new version this month.
Make any progress?
Hi @adjenks, this is a breaking change to the 0.x branch so I planned to add it to the 1.x branch, wich will be compatible with PHP 7 and have more breaking changes. The development is going slower than I expected, so I'm sorry.
I've just uploaded an initial version of this feature. The 1.x branch is almost ready (I only need to test more) and you can test it with dev-master
on your composer.json. If you can take a look and tell me if this is the behaviour you expect, will help me a lot.
I apologize for the delay in resolving this issue. Version 1.0 has been published in which a vector with the data of each file is returned when calling Client->getRecursiveMetadata()
.
The returned array looks like this for a file called sample.zip
:
[
'sample.zip' => new Metadata(),
'sample.zip/file.docx' => new DocumentMetadata()
]
Awesome. Sorry I couldn't test it, I haven't been working with Tika for a while. Probably later. Good work.
Don't worry, I added some tests to PHPUnit. Hope it solve your issue.
Let me start by saying great library. Well written.
The issue is that
Client->getRecursiveMetadata()
discards all but the first document.getRecursiveMetadata()
callsMetadata::make($response, $file);
andmake()
is defined like so:(Lines of interest highlighted with
//------
)I would suggest refactoring to have
getRecursiveMetadata()
return an Array, or a new object class like IterableMetadata that implements the Iterable interface.