Add /enterprise-version endpoint to return enterprise version as JSON #217
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.
Adds a new
/enterprise-versionendpoint that returns the$enterpriseVersionvalue fromconfig.phpin JSON format.Implementation
PATH_INFOfor/enterprise-versionand exits early before existing update logicJSON_THROW_ON_ERRORflagExample Response
$ curl https://example.com/enterprise-version {"enterpriseVersion":"3.17.4"}The regex pattern
[^'"\r\n]+ensures version extraction stays within a single line, preventing multiline matches if config format changes.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/sebastianbergmann/global-state/zipball/800689427e3e8cf57a8fe38fcd1d4344c9b2f046/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q2Qhoa /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/8fe7e75986a9d24b4cceae847314035df7703a5a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/w1mHXv /usr/bin/composer install --no-interaction(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.