-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
added docs to Versions::VERSION #81
Conversation
the constant is public for technical reasons, therefore should be documented as `@internal`. Added a hint for the public api to use
lead by my IDEs autocomplete feature I accidentally read from this public array, instead of using the proper API. this mistake on my end resulted in PackageVersions not using the proper Fallback for the |
@@ -48,6 +48,12 @@ final class Installer implements PluginInterface, EventSubscriberInterface | |||
%s | |||
{ | |||
public const ROOT_PACKAGE_NAME = '%s'; | |||
/** | |||
* Array of all available composer packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add the type of this array? It is array<string, string>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
should I adjust test expectations or is this something you can do easily? |
Yeah, test expectations also need adjusting |
Thanks @staabm! |
* Array of all available composer packages. | ||
* Dont read this array from your calling code, but use the \PackageVersions\Versions::getVersion() method instead. | ||
* | ||
* @var array<string, string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@var
is invalid for constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer keeping it anyway
the constant is public for technical reasons, therefore should be documented as
@internal
.Added a hint for the public api to use