Closed nyamsprod closed 4 years ago
@Shardj do you consider modifying the current output content a BC break or not ?
As in the error messages? No not at all, change them. I don't like the emojis in the current one anyway.
By the way, since there's a shebang for php in the update-psl script you can run it with just bin/update-psl
you don't need to have php
in front.
Ok I'll change the texts too then... Did I miss any other arguments you may want to add 🤔 or does it meet all your requirements? The PR is working but I need to still fine tune it if you could test it for UX that would be great.
Being able to specify cache expiry would be helpful too I suppose. I'll happily test it, for me though I'm no longer bothering to force updates as instead I just have cache expiry set to only a day so it's regularly checked.
the new installer is merged in the develop branch and will be release with the next minor version
summary
The current
update-psl
script is just an update version of the script from v3. when #248 was submitted for review we came to the conclusion that the script needed an overall improvement to meet it's primary goal making it easy to update the local cache of the libraryproposal
The new system will keep the
bin/update-psl
entry point and its current use but will add arguments and flags to better control how the script interact with the library cache.after implementation the following command will be accessible to the end user:
This lines means:
/tmp
directory.;overall implementation
bin/update-psl
will be rewritten to accept argumentsPdp\Installer
class will be refactored to accept on construction:Psr\Log\LoggerInterface
instance;Pdp\Manager
instance;Psr\Log\LoggerInterface
will be provided to record the process.The following arguments will be added:
--cache-dir
: specify the root directory used to save the cached data;h
,--h
,--help
: display the helper message;--psl
: specify that the PSL cache must be updated;--psl-url
: specify that PSL source URL;--rzd
: specify that the RZD cache must be updated;--rzd-url
: specify that RZD source URL;--ttl
: specify the cache TTL;The modification will be made so that the current behaviour stays untouched meaning:
will update both cache system using the default values.