-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add java and JSignPdf fallback #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
It looks good. What do you think about setting default parameters? Something like this: Since the Other points:
|
Good idea! |
|
The required Java version needs to be slightly higher than this one, because the |
|
What do you think about checking the Java version every time to determine whether it's necessary to update the binary when a new release is available? I implemented this approach, but I'm concerned it might cause unnecessary resource usage, such as CPU, I/O, and memory. Only by example, I implemented the version check at Java flow and not at JSignPdf flow. |
Done! |
Usage:
Will be necessary identify the Java Version to configure the fallback and also add the URL to download the .tar.gz file.
```php
$jsignParam = new JSignParam();
$jsignParam->setJavaVersion('21.0.0');
$jsignParam->setJavaDownloadUrl('');
$jsignParam->setJavaPath('/the/path/of/bin/java');
```
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
4541422 to
bf332d2
Compare
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
23e0cd3 to
dff13e8
Compare
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
When the days is zero, the expire date will be exactly the same date that the certificate is generated. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This already was covered at another place Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
|
@jeidison ready for review |
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Hmm, I'm not sure about this. I think it's a bit risky. It might use unnecessary resources and break if a future version is incompatible with some parameter or something else. |
|
Maybe we could create a cache file and simply check for its existence, without reading its content. The file name could include the version identifier of the current package. If the file doesn't exist, we proceed with the setup: clean the folder, download the resources, and complete the process. For example: The cache file name could follow the same naming pattern as the original download URL, just prefixed with a dot to make it hidden. |
|
@jeidison could I go ahead with the last idea? |
51db656 to
e0c612b
Compare
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
e0c612b to
9187d8c
Compare
|
@jeidison I already implemented the version check using a cache file. |
Ok, let's try it. |
Usage:
Will be necessary identify the Java Version to configure the fallback and also add the URL to download the .tar.gz file.
Was created from this other PR:
to-do
jsignpdf/jsignpdf-bin