layh.com

Web...TYPO3...TYPO3 Flow...and more...TYPO3 Stuff

Use the file watch function from PHPStorm on Mac OS X

This is a short tutorial how you can use the compass watch function that is new in PHPStorm, beginning with creating a gemset for compass and using this for PHPStorm.

  1. Create a new gemset using rvm [1] and install compass [2]
    # create a new gemset and select it, using the short syntax from rvm
    rvm use ruby-1.9.3-p374@compass --create
    
    # validate that you use the correct gemset
    rvm gemset list
    
    # install compass
    gem install compass
  2. Open PHPStorm and select a scss file
  3. Now PHPStorm will ask if you want to add a FileWatcher
    filewatcher e1365766116511 Use the file watch function from PHPStorm on Mac OS X
  4. In the following dialog, enter the data:filewatcher1 Use the file watch function from PHPStorm on Mac OS X1:  The full path to your compass binary inside the gemset. For example:
    /Users/tlayh/.rvm/gems/ruby-1.9.3-p374@compass/bin/compass

    2: The argument is “compile“3: Working directory is where you config.rb file is located. Make sure that all data like css_dir and sass_dir and so on is configured there.4: Set environment variable to select the gemset as follows:
    GEM_HOME = /Users/tlayh/.rvm/gems/ruby-1.9.3-p374@compass
  5. Thats all icon wink Use the file watch function from PHPStorm on Mac OS X Enjoy.

Thanks @sritterkh

 

Resource:

[1] rvm

[2] compass

Vagrant Setup for TYPO3 Neos

One more. The differences are really not much. All I had to change is to change the git repository where I take the composer file from. The server setup is identically with the one form the TYPO3 Flow setup.

If you want to check out TYPO3 Neos, boot up your VirtualBox and play around.

I have to say, I haven’t checked on the status of Neos for a while now, but after setting this up today, I was surprised.  I did not try much, but all the content editing stuff and creating pages works well and I think it is time to start playing around with Neos a little bit more.

Have fun with this one: https://github.com/tlayh/vagrant-typo3neos

Greetings,
Thomas

Vagrant Setup for TYPO3 Flow

Since I started to work with TYPO3 Flow there are this moments where I require a clean installation of TYPO3 Flow to test something. For this reason I spent some of my free time during the holidays to setup a vagrant box that will provide that for me.

This box is also useful if you want to get some first experience with TYPO3 Flow and you don’t have a server environment where you can install it. Just install VirtualBox, Ruby, Rubygems and follow the instruction in the Readme file. The setup will take some time the first time (without download about 433 seconds) and the required base box (Quantal 64bit) will be downloaded automatically the first time. If everything worked you should be able to call http://typo3.flow and you should see the welcome screen from TYPO3 Flow.

welcome screen 300x180 Vagrant Setup for TYPO3 Flow

I only tested it on Ubuntu, but normally it should work with Mac and Windows also. If there is something not working, feel free to contact me and I will try to help.

Happy New Year and happy cloning: https://github.com/tlayh/vagrant-typo3flow

Thomas

PHPUnit Setup in PHPStorm with local PHPUnit (composer)

After switching to Ubuntu for my PC I had a real clean setup. After starting the first TYPO3Flow project I wanted to run my UnitTests without installing PHPUnit on my system. With the support of composer you can easily add the PHPUnit libraries to your project in “dev”-context and this way you can make sure to run on the same PHPUnit version on all servers.

Adding PHPUnit to your setup is the easy part. But if you want to run this Unit Tests in PHPStorm, I faced the problem that the PHPUnit installation could not be found.

So, what you have to do is to tell your PHPStorm where to find the autoloader.php that includes all required stuff.

After searching for a while I found this on the bug tracker from Jetbrains:

phpunit setup 300x173 PHPUnit Setup in PHPStorm with local PHPUnit (composer)

Source: http://youtrack.jetbrains.com/issue/WI-13429#

If you work with TYPO3Flow, change the path to /foo/bar/myProject/Packages/Libraries/autoload.php and you are fine.

Hopefully I can save some time for someone out there.

Windows 8 – Apps have no internet access

Well yes, it is true, I just updated to Windows 8. Looks good so far but one problem I had for the last two days now is, that my Apps have no internet access. My browser and everything else was working just fine. Searching the internet did not result in success so I kept searching for some time now.

Finally, this morning I found something and it worked. All apps have internet access now. So this post is just for the people having the same trouble.

The problem can be, that your DNS Client is not running. To fix that do the following:

- run cmd.exe as administrator.
- run “service.msc”
- search for DNS Client
- Set the start type to “automatic”
- start the dns client.

Have fun using the your Apps.

The problem is also described in:  http://support.microsoft.com/kb/919746

 

Really, I did it again – TYPO3 Flow tutorials updated ;)

Well, what should I say. I tried to update all the TYPO3 Flow tutorials on my page to run with the current master. I have not tested everything in detail, but as far as I am up to date it should run. If you find any errors or something is not working, just let me know, write a comment, send an email, tweet me.

Have fun with the tutorials, every feedback is appreciated.

Step-by-step

Standalone

Use twitcode.org and get flattred

It is a long time since I worked on twitcode.org but finally, after some hard times with the data migration, twitcode.org is up and running again. This time it is not running on FLOW3 anymore, it is using TYPO3 Flow now icon wink Use twitcode.org and get flattred
Besides some bugfixes, the biggest new feature is the flattr support now. No, not all your money comes to me, but everyone who adds his flattr-id in his profile can be flattred now.

So, go ahead and earn some money by sharing some fancy code.

That is what you have to do:

Go to http://twitcode.org

Login

Follow the screens.

twitcode flattr 1 300x174 Use twitcode.org and get flattred

twitcode flattr 2 300x245 Use twitcode.org and get flattred

Btw., there is still one stupid bug. OAuth is not working like expected and from time to time you have to login twice before it is working. Will be the first bug I will try to eliminate in the next release.

Have fun!! And if you like the project, feel free to click the flattr button on the homepage and keep me motivated.

http://twitcode.org

FLOW3 Tutorials updated…..

Finally after a long time I updated all my FLOW3 Tutorials to work with the current master.

To be honest, it was not me who updated the tutorials. Big thanks to Linh, our trainee at AOE, who used my tutorials to get into the FLOW3 . Hey checked each part and told me what I have to change.

Hopefully I will have some time in the near future to add some new stuff.

 

 

Using the TYPO3/FLOW3 Coding Guidlines with PHPStorm and PHP_CodeSniffer (Windows)

With the new release of PHPStorm 4 there is a CodeSniffer integrated. Since for us TYPO3 developers it doesn’t make much sense to us another coding standard than our own, here a short how-to for the usage of the TYPO3 Coding Guidlines in PHPStorm.

First thing, you have to install PHP and PHP_CodeSniffer on your machine. I had trouble with the CodeSniffer after installing it in C:\Programs (X86) so after uninstalling everything and installing it in C:\PHP the CodeSniffer started to work. Before you enter something in your IDE, verify that your CodeSniffer works by running

phpcs.bat --version

The expected result should be:

PHP_CodeSniffer version 1.3.3 (stable) by Squiz Pty Ltd. (http://www.squiz.net)

Next thing is to install the guidelines for TYPO3. For that, clone the repository on git.typo3.org to get the right standards:

git clone git://git.typo3.org/Teams/forge.typo3.org/hudson-helpers/tools/PHP_CodeSniffer.git

Now copy the folders FLOW3, TYPO3, TYPO3v4 to (in my example):

C:\PHP\PEAR\PHP\CodeSniffer\Standards

Update:

Another option is to get the TYPO3 Standards from pear.typo3.org. (Thx @ctrabold for the hint)

Open PHPStorm and go to the settings. Settings->Inspections

PHP CodeSniffer 300x137 Using the TYPO3/FLOW3 Coding Guidlines with PHPStorm and PHP CodeSniffer (Windows)

Select the path to the phpcs.bat file and click “Validate”. If everything works fine you should be able to select a Coding standard in the select box below.

Update:

If you work with TYPO3, select TYPO3v4, if you work with FLOW3, select the FLOW3 Standard. The TYPO3 folder contains the common Codesniffs.

Links:

TYPO3 Codesniffer page on forge: http://forge.typo3.org/projects/team-php_codesniffer/wiki/Using_the_TYPO3_Coding_Standard

PHP_CodeSniffer package on pear: http://pear.php.net/package/PHP_CodeSniffer/

PHP Download for Windows: http://windows.php.net/download/

PHP Codesniffer on forge: http://forge.typo3.org/projects/team-php_codesniffer/wiki/Folder_structure

And now: Have fun writing clean and good code icon wink Using the TYPO3/FLOW3 Coding Guidlines with PHPStorm and PHP CodeSniffer (Windows)

Marktkirche Wiesbaden – a small photo experiment

I always get bored on my way to my car in the morning so I started to make a picture of this church every morning. I don’t take this to serious, so I only take pictures when I have to go to work. This means in my vacation and during the weekend there are some pictures missing in this series. But as long as I have the same way every morning, I will continue to make this pictures and add them to the slideshow.

For now there are more than 30 pictures and the are all dated, so you can check on the weather on this days icon wink Marktkirche Wiesbaden a small photo experiment

I started this end of October. I have no idea how long I will do this, but I think the more images there are, the more interesting is this experiment.

And now, have fun watching those pictures:

marktkirche wiesbaden Marktkirche Wiesbaden a small photo experiment