Download the PHP package mistralys/changelog-parser without Composer

On this page you can find all versions of the php package mistralys/changelog-parser. 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 changelog-parser

Changelog Parser

PHP library to parse Markdown-formatted change log files.

Requirements

Installation

Add the package to your composer.json file with the following command:

Also see the Packagist page.

Supported changelog formats

The parser expects all versions to be listed as headers with the same header level, and individual changes to be added as a list. Both of these examples will work:

Version heading formats

All the following headings are valid formats that the parser will recognize:

For more information on the spectrum of version strings that can be used, have a look at the supported formats in the mistralys/version-parser package, which is used to read them.

Nesting the changelog in a document

The way the parser analyzes the Markdown document means that the changelog can be nested anywhere. The heading level will be inferred from the first version heading it encounters.

In this example, the changelog is not a separate document, but is nested in a subsection.

The changelog parser will stick to the first changelog it finds in the document, meaning that only the first of multiple, separate version lists will be used, even if they have the same heading level.

Subheaders within versions

The parser will recognize subheaders within a version entry, and add collect these as plain text to be accessed again later. This makes it possible to further document things like breaking changes for example.

Only the items below the version will be considered changes in the version. The "Breaking changes" subheader and any additional content is captured as text, which can be accessed via getFreeformText():

This will output:

Usage examples

Fetch all versions

Fetch the latest version

Get a version by number

This will throw an exception if the version is not found. To check if a version number exists beforehand

Check if a version exists

Note that this requires the exact version number to be known (major, minor and patch version numbers). For a more flexible way to find versions, the version info is best used instead.

For example, to find all versions matching v4.2.x:

Go through individual changes in a version

Note the use of the requireLatestVersion() method: This will throw an exception instead of NULL if no versions are found in the change log. Handy to avoid checking for a null value.

Persisting and caching

To easily store or transmit changelog information, the parser offers the possibility to serialize the data to JSON. This can be decoded again later instead of parsing the source file each time.

This example will automatically create a JSON cache file, which performs better than parsing the source markdown file each time, especially for large files.


All versions of changelog-parser with dependencies

PHP Build Version
Package Version
Requires mistralys/application-utils Version >=2.3.2
mistralys/version-parser Version >=2.0
ext-json Version *
php Version >=7.4
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 mistralys/changelog-parser contains the following files

Loading the files please wait ....