Download the PHP package 20steps/versioning-bundle without Composer

On this page you can find all versions of the php package 20steps/versioning-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package versioning-bundle

versioning-bundle

SensioLabsInsight Total Downloads

Simple way to version your Symfony2 application.

What it is:

Purpose:

To have parameter in your Symfony2 application with current version of application for various needs:

Handlers implemented:

Install

run composer.phar update

Add bundle to your AppKernel

run in console:

Default configuration

Default configuration of bundle looks like this:

That means in the parameters file the application_version variable will be created and updated on every bump of version, you can change the name to anything you want by writing that in your config.yml file. You may also specify a file other than parameters.yml if you would like to use a custom file. If so, make sure to import it in your config.yml file - you may want to use ignore_errors on the import to avoid issues if the file does not yet exist.

Git Handler

Git handler works only when you have atleast one TAG in your repository, and all TAGS used for versioning should follow SemVer 2.0.0 notation with exception, that git handler allows letter "v" or "V" to be used in your tags, e.g. v1.0.0

Application version from git tag are extracted in following fashion:

This is default behavior and can be easily changed anyway you want (later on that)

Displaying version

To display version for example in page title you can add following to your config.yml:

And then, in your Twig layout display it as global variable:

Alternatively, if you want to display version automatically without having to bump it first, set config.yml to :

And then, in your Twig layout:

The downside is the app version will be computed every time a twig layout is loaded, even if the variable is not used in the template. However, it could be useful if you have rapid succession of new versions or if you fear to forget a version bump.

Adding own handlers

It's easy, write a class that implements HandlerInterface:

For example, lets modify how git handler adds prerelease data to version if tag is outdated, instead just add "build" part with git commit sha. We gonna reuse big part of git handler and just override method for metadata handling:

Add handler to container using your services file (xml in my case):

Take a note on priority attribute, it should be more than 0 if you want to override default git handler as it's default value is 0.

Run in console

And notice your new handler is above old one:

So, next time you execute version bump, your custom git handler will take care for your version building.

Make Composer bump your version on install

Add script handler

to your composer.json file to invoke it on post-install-cmd. Make sure it is above clearCache, it may look like this:

Capifony task for version bump

Add following to your recipe

Capistrano v3 task for version bump

Add following to your recipe

Good luck versioning your project.

Contributions for different SCM's and etc are welcome, use pull request.


All versions of versioning-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
herrera-io/version Version ~1.0
symfony/symfony Version ~2.8|~3.0
symfony/process Version ~2.2|~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package 20steps/versioning-bundle contains the following files

Loading the files please wait ....