Allow configuration file to specify which commands are available.#69
Merged
Conversation
The command list in this tool is very large, and for many users, APC and APCu will not be used at the same time.
If a configuration file does not define `extensions` then all commands are available.
|
How about just loading/enabling the commands conditionally depending on which extensions are loaded in the process? Then stuff that's useless would be hidden automatically. |
Contributor
Author
|
@Seldaek I considered this, but the PHP executable that runs cachetool can be different from the PHP instance that it is connecting to. A cache extension that isn't available in |
|
Yes I guess that makes sense
…On Tue, 1 May 2018, 12:30 Benjamin Doherty ***@***.***> wrote:
@Seldaek <https://github.com/Seldaek> I considered this, but the PHP
executable that runs cachetool can be different from the PHP instance that
it is connecting to. A cache extension that isn't available in
/usr/bin/php might be the one I want to modify which is running on FPM on
port 9000 mapped to localhost from a Docker container. Is that valid?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALNfku_XbHR5y9A471YI4R9irjErr1Yks5tuEdBgaJpZM4TCfMI>
.
|
gordalina
approved these changes
May 21, 2018
Owner
|
Thanks for your contribution, its part of release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many users will not have
apcandapcuenabled on the same servers. Symfony Console's\Symfony\Component\Console\Application::findmethod will attempt to find commands that match partial names but this cannot work when there are commands whose namespaces are subsets of other commands.For example, when all extensions are enabled, it's not possible to abbreviate most of the commands in either
apcorapcunamespace:When the config file specifies which extensions to support, calling commands with abbreviations is possible:
To avoid breaking backward compatibility,
\CacheTool\Console\Config::__constructnow usesarray_replaceto provide defaults when config properties aren't set in the$configargument.