Version numbers for scripts, especially PHP packages

Hi,

I am trying to get my scripts in better order and am starting to add version numbers.

I can break my scripts up into the following:

  1. PHP packages (using namespaces)
  2. Standalone PHP files
  3. JQuery scripts/plugins (a single file each)

For items two and three since they’re only one file I can put the version number in the file header. Simple.

But I have a single framework that I developed myself that has most of my core code in, which breaks down into about 12 packages.

\Vendor\Package1\
\Vendor\Package2\

\Vendor\Package12\

When managing versions for this, at what level do I do it? I can do it for each individual file, each package or for the entire framework. Is there any “standard” way to do this? Instinct tells me you’re better off doing it at the vendor level if all the code will be always together since it’s simpler to manage. Any code specific to a client’s site can go in its own Vendor folder and so will always be kept separate from mine. I haven’t really used any other frameworks but just downloaded CakePHP and that seems to have a version number for the entire package.

Any thoughts or advice would be welcome.

Finally, if you use Git, does it does it add version numbers automatically?

Thanks.

Certainly the framework would get a version number.

if you treat the packages as standalone libraries that can be distributed and used independently of the framework, then those should get a version number too.