-
Notifications
You must be signed in to change notification settings - Fork 1.4k
use samsonasik/package-versions to get version #371
use samsonasik/package-versions to get version #371
Conversation
@samsonasik it is not the same as before. I don't know if the constant version in the library is important (useful) at all. |
unfortunatelly, the packageversions can't detect its version of project currently used, as if i use zendframework/zend-skeleton-application (not part of vendor), it will return like 999999.dev, probably @Ocramius can give some input about it... Warm regards, Abdul Malik Ikhsan Pada 21 Jul 2016, pukul 21.59, webimpress [email protected] menulis:
|
That simply means "dev-master@dev" On 21 Jul 2016 18:33, "Abdul Malik Ikhsan" [email protected] wrote:
|
@Ocramius any suggestion of what it should be then? Warm regards, Abdul Malik Ikhsan Pada 22 Jul 2016, pukul 02.12, Marco Pivetta [email protected] menulis:
|
|
|
Probably |
I did that :P |
@@ -4,7 +4,7 @@ | |||
<p> | |||
Congratulations! You have successfully installed the | |||
<a href="https://github.com/zendframework/ZendSkeletonApplication" target="_blank">ZF Skeleton Application</a>. | |||
You are currently running Zend Framework version <?= \Application\Module::VERSION ?>. | |||
You are currently running Zend Framework 3 with zend-mvc version <?= \PackageVersions\Versions::getShortVersion('zendframework/zend-mvc') ?>. |
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.
\PackageVersions\Versions::getVersion('zendframework/zend-mvc')
is ok to get full version with hash included
This is a hard one. With ZF1/2 (until 2.5), However, as @samsonasik has noticed, The point we need to discuss is: is the information worthwhile? I'd argue that, to an extent, it is: it tells us where the application began, and most times we're getting that, we're working with developers new to composer and/or ZF; if they report this particular version, it helps us understand that we're likely working with newcomers, and whether or not they started with the latest skeleton version. If that's the case, the only real way we can version is either through a constant in the application somewhere, or one defined in the Thoughts? |
Alternate suggestion: we have a collapsible list detailing all components installed, and at which version... which is something that |
In my opinion if we tried limit number of dependencies in the skeleton we should't include any package version here. Also I can't see big advantage of having the constant version number, even if we are working with newcomers we don't know what steps they did before:
Installed packages we could get from |
@weierophinney I'm ok with show list of zf components installed, if approved. |
507912b
to
61a1ad4
Compare
@weierophinney I added list of zf components installed. |
@weierophinney merge-able now ? |
I'm not a fan of adding it directly into the skeleton as non-dev since it's not aimed at the application the user wants to build...it's a convenience for the developer and for those of us who help them when they run into trouble. Could the package be added to require-dev and still fulfill #356? As for the UI, maybe this is better pushed over to ZendDeveloperTools? It could have a panel which lists all the installed versions.
I do agree this would be useful. The developer isn't likely to continually backport changes from newer versions of the skeleton into their existing apps, so the files provided by the skeleton end up being frozen in time while the Composer-provided dependencies do. Knowing what version of the skeleton they started with, then, is a useful piece of information. I'd argue that the starting versions of the skeleton's dependencies aren't, though (eg: is it useful to know that servicemanager was at 2.6.0 when they installed the skeleton but it's at 2.7.7 now?). Could we instead use composer scripts to cache this information somewhere on install and/or update? The DX around that could be improved by ZendDeveloperTools and/or CLI tooling to display the cached version information. |
for debugging purposes we can ask output from |
Since no one else decided to move forward with this feature and overall consensus is towards dropping version constant altogether, I am going to close this PR without merging. |
samsonasik/package-versions
is a backported version ofocramius/package-versions
that support php 5.6. /cc @Ocramius