Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Colin O'Dell:
Avoid Unsupported Symfony Component Versions With This Composer Metapackage
Sep 12, 2018 @ 16:55:05

In a new post to his site Colin O'Dell has shared a Composer "metapackage" that can help you avoid unsupported Symfony component versions with the help of Composer's own internal version checking system.

Using symfony/symfony makes Composer install all Symfony Components in the same version. But when using the standalone packages, Composer might install dependencies in a different major version - for example, symfony/validator v2.8 is compatible with symfony/translation v3.0.

This is fine if you don't want to stick strictly to Symfony LTS versions, but it does mean that you could end up using versions of components which no longer receive security updates.

Rather than having to specifically define (and manage) the versions of package you want to install, you could opt to install his package that will do the hard work for you. It uses the "conflict" handling in the Composer configuration to limit version numbers on many of the popular Symfony packages and requires them to be greater than or equal to certain versions.

tagged: symfony component composer metapackage unsupported versions check

Link: https://www.colinodell.com/blog/201809/avoid-unsupported-symfony-component-versions-composer-metapackage

Community News:
PHPUnit 5.0 Drops Support for PHP 5.3, 5.4 and 5.5
Jun 05, 2015 @ 15:15:58

According to a wiki announcement made on the PHPUnint GitHib repository, the next major version of the popular unit testing tool will only support PHP 5.6 and above.

According to our release process, PHPUnit must be compatible with all versions of PHP that are actively supported by the PHP project.

Active support for PHP 5.4 ended on September 14, 2014 and active support for PHP 5.5 will end on June 20, 2015. The active support for PHP 5.3 already ended on July 11, 2013. By the time PHPUnit 4.8 will be released, the only actively supported version of PHP will be PHP 5.6. The next version after PHPUnit 4.8 will not support PHP 5.3, PHP 5.4, and PHP 5.5 anymore. As PHPUnit follows Semantic Versioning the major version number must be incremented when the minimum required version of PHP is increased.

This will be a major change for many projects out there used to just fetching the latest version of PHPUnit for their projects. With PHP 5.3 and 5.4 making up such a major part of the currently installed versions, this could really help to push those hosts/companies using these unsupported versions for upgrades. It's good to see a prominent project like PHPUnit pushing the community to supported versions.

tagged: phpunit release announcement unsupported deprecated version compatibility

Link: https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-4.7.0#phpunit-50

PEAR Blog:
Fixing "unsupported protocol"
Aug 28, 2009 @ 12:55:49

If you've had issues with an "unsupported protocol" message when working with the PEAR installation on your PHP instance, you should check out this quick post from the PEAR blog with a tip on how to fix it.

When trying to install something, you will get the error: pear.php.net is using a unsupported protocal – This should never happen. install failed. This problem comes from corrupted channel files. Go into your PEAR php directory and backup .channels directory.

If you go into your PEAR installation and move the .channels directory out of the way then run an "update-channels" the issue should be corrected. Unfortunately, this also means you loose all channels you'd subscribed to, but does save you from having to reinstall PEAR completely.

tagged: pear unsupported protocol error

Link:

Hasin Hayder's Blog:
Did you know 'you can have cheese burger' could be a variable name?
Oct 24, 2007 @ 13:57:00

Hasin Hayder has a quick tip for users of SimpleXML - a handy way to access a node in an XML document that has unsupported characters in its name.

I was finding a way to refer that element as a SimpleXMLElement and found a nifty note in PHP Manual. It says if you have unsupported (unsupported in PHP Lexicon for a variable name) characters inside the name of a node, you can access it using a special pattern {'name'}.

In his example, he shows how a popular phrase ("i can have cheese burger") can be used as the variable name despite having spaces in it.

tagged: variable name unsupported character special pattern variable name unsupported character special pattern

Link:

Hasin Hayder's Blog:
Did you know 'you can have cheese burger' could be a variable name?
Oct 24, 2007 @ 13:57:00

Hasin Hayder has a quick tip for users of SimpleXML - a handy way to access a node in an XML document that has unsupported characters in its name.

I was finding a way to refer that element as a SimpleXMLElement and found a nifty note in PHP Manual. It says if you have unsupported (unsupported in PHP Lexicon for a variable name) characters inside the name of a node, you can access it using a special pattern {'name'}.

In his example, he shows how a popular phrase ("i can have cheese burger") can be used as the variable name despite having spaces in it.

tagged: variable name unsupported character special pattern variable name unsupported character special pattern

Link:


Trending Topics: