Over the summer we made improvements to the package filter and the labels of the installations. The filter for installed packages has been extended with the input of a version constraint. This now makes it possible to search for specific versions of extensions and packages and filter these installations accordingly. In the following post I will show you examples of how you can use this new feature in a useful way.

As soon as you click, data is downloaded from YouTube and thus your IP address is submitted to their servers. For more information on data protection regarding our newsletter, please visit our privacy policy.

Example: Finding old version of extensions

Even though you regularly update with trakked, it may happen that the latest version of an extension is not installed. This can have several reasons. One of them is that the installation of the new version is not allowed at all.

This is because which version of a package (extension) is allowed to be installed depends, among other things, on the definition of a package in composer.json. Depending on the version constraint of a package, only certain versions may be installed by Composer.

Let's assume you are using the terminal42/contao-pageimage extension. Currently version 3.4.3 is installed. However, version 4.1.7 is already available. However, this version is not installed.

In your composer.json there will probably be an entry similar to this:

"terminal42/contao-pageimage": "^3.4"

Specifying "^3.4" determines that Composer is allowed to install all versions from 3.4.0 but smaller than 4.0. And so the new version 4.1.7 will never be installed. You can find more details about this in the documentation of Composer.

Now how can trakked help you?

Using the "installed packages" filter, you can find out which installations have an extension installed. Now you can additionally enter a version constraint and find the installations using an older version of an extension.

Let's stick to our example.

We would restrict trakked by the extension terminal42/contao-pageimage and additionally enter the version condition <4.0.

Now trakked shows you all installations that still use a version lower than 4.0. You can check these installations and change the version via the Contao Manager or directly in composer.json. The next update will always install the latest version of terminal42/contao-pageimage.

Example: Performing targeted updates

Another example would be to search for a specific version of an extension in order to perform targeted updates.

Let's say an extension contains a bug in version 1.2.2 and an update (1.2.3) has been deployed. You now want to find out which installations are affected by this bug and update only these installations.

To do this, you filter for the extension in the first step and then specify the faulty version in the version condition. In our example (=1.2.2).

Now you mark only these installations and let trakked do the update. This will save you time and avoid unnecessary updates.

Example: Finding fixed versions

Sometimes it can happen that a specific version of a package has been fixed. That means in the composer.json a concrete version was specified, which may be installed. However, this prevents a newer version of a package from being installed in the future.

Let's say the terminal42/notification_center extension was fixed to version 1.16.12 due to a problem with multiple installations. A few months later, you remember that you should remove those fixed constraints. The problem: you forgot to document which version you fixed to and on which installations you did that.

Exactly here the version constraint can help again.

In the first step you check via the Contao Manager or Packagist, which is the current version of the Notification Center. As of today, this would be 1.7.2. Then you filter in trakked for the package notification_center and enter <1.7.2 in the version constraint.

Now you just need to check the affected installations. You can use the package list for this and look at the version constraint of composer.json accordingly.

The previously mentioned examples only serve to give you an idea of how you can use the feature. There are certainly many more possibilities.

If you do not immediately see why a package was installed or cannot be installed, you can find out using the command line and Composer. Use these commands:

php composer.phar depends «paketname»
php composer.phar prohibits «paketname» «version»

You can find out more about those commands in the Composer documentation.

Transfer of installation status to labels

Another improvement concerns the generated system labels. So you can see at first sight why an installation was marked as red or orange.

For example, if you are using an outdated Contao or PHP version, you can now see this directly from the label color.

Will we see each other in Kiel?

In a few weeks the Contao Conference will take place in Kiel. We will be there as well and are looking forward to the personal exchange. If you have any questions about trakked, please contact us! We will be happy to show you the features and benefits of trakked in our live demo.

Add a comment

Please calculate 9 plus 9.