On Saturday, the 4th of may, I released a new version of the TYPO3 Codesniffer standard for TYPO3CMS and TYPO3Flow. I am writing this article to reach a bigger audience because it is not just another release. It breaks with old infrastructure, naming and distributing.
Releasing this version means an improvement for the further development, changes the installation a little bit and means a lot for me personally.
After the Quality Assurance Sprint in Linz last year I started with implementing Composer support for the standards. At this time the standards reside within one git repository on forge.typo3.org. That works well with PEAR because it already handles the standards as three packages and it also works for git clones by symlinking the single standards into the PHP_CodeSniffer standards folder - but it doesn't work for Composer. In order to make it work with Composer we have to split the repository into three.
Why three? Because we have three standards:
While I thought about this topic, we (Andy Grunwald and me aka the team aka we) decided this is also a good moment to move the repository to github. There are various reasons for the move:
During this time the rebranding took place and the names of TYPO3v4, FLOW3 and TYPO3v5 changed into that what we know today. I was and I am still not a fan of this change, to the point where it demotivated me and was a large contributing factor as to why I stopped working on this project for five months.
But for some reason I decided to continue with this project and here we are.
Finding a right naming scheme was the hardest task for me. It should express the purpose of every single standard - not too long and noticeable. It needs to be conformed to use it for class names, PEAR packages and Composer libraries and you don't get the impression that it means the product itself.
Ironically, I came to the conclusion to use the new naming scheme one to one and use typo3-ci as namespace when it's necessary.
This renaming topic affects all users who installed the standard via PEAR. This is the most important change and you have to uninstall the old packages and install the new ones.
$ sudo pear uninstall typo3/PHPCS_FLOW3_Standard
$ sudo pear uninstall typo3/PHPCS_TYPO3v4_Standard
$ sudo pear uninstall typo3/PHPCS_TYPO3_SniffPool
$ sudo pear update-channels
$ sudo pear install typo3/TYPO3CMS
$ sudo pear install typo3/TYPO3Flow
If you cloned the standard via Git you have to get it now from our repository on github. The repository on forge.typo3.org will no longer be maintained.
$ sudo git clone --recursive https://github.com/typo3-ci/TYPO3_CodingStandard
You will get the stable version of the three standards.
We are not sure yet if we move completly to github. So for now the issue tracker is still on forge.typo3.org but we welcome every pull request on github.
We offered Greg Sherwood, the author of the PHP_CodeSniffer, some of our sniffs from which we think they could be usefull for other projects. He agreed and Andy Grunwald did the most of the transaction work. Kudos to him :-)
Unfortunately, the PEAR packages were broken for TYPO3Flow (0.0.1, 0.0.2) and TYPO3CMS (0.0.4, 0.0.5), but I was able to fix the packages at least for TYPO3Flow 0.0.2 and TYPO3CMS 0.0.5.
I am proud to announce that we support Composer now. All you have to do is to add a composer.json file to your project and declare the standard as an dependency. Have a look at the documentation.
Follow @typo3_pear or @typo3_qa on twitter.
$ sudo pear install typo3/TYPO3CMS-beta
$ sudo pear install typo3/TYPO3Flow-beta
IMHO the move to github is the wrong approach. You could easily create subprojects in redmine which hold a repository each. We do the same for documentation.