TYPO3 PSR-2 setup in your favourite PHP IDE

Category : Extbase , By : Sanjay Chauhan

It's always good practice to write your code with TYPO3 PSR-2 standards of PHP, then why not just integrate to your favourite PHP IDE? To write better code everyday!

1. PHP Storm

Step 1. Go to File -> Settings -> Code style -> PHP and navigate to that menu

Step 2. Choose option of PSR1/PSR2


2. Visual Studio Code

Step 1. Ctrl+P Search ext install kokororin.vscode-phpfmt

Step 2. Install the extensions

Explore at https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt


3. Sublime

Option 1. Install PHPFMT

Step 1. Go to Package Controll (Ctrl + Shift + P)

Step 2. Search "Package Control: Install Package"

Step 3. Install "phpfmt"

Step 4. Go to Preferences -> Package Settings -> phpfmt -> Settings - Settings user

{
    "version": 4,
    "php_bin":"/usr/bin/php",
    "psr1": true,
    "psr2": true,
    "format_on_save":false,
    "option": "value"
}

Option 2. Install Sublime Linter

Step 1. Go to Package Controll (Ctrl + Shift + P)

Step 2. Search "Package Control: Install Package"

Step 3. Install following packages

SublimeLinter
SublimeLinter-php
SublimeLinter-phpcs

Step 4. Go to Preferences -> Package Settings -> SublimeLinter -> Settings

{
    "delay": 0.5,
    "linters": {
        "php": {
            "@disable": false,
            "args": [],
            "excludes": []
        },
        "phpcs": {
            "@disable": false,
            "args": [
                "-n"
            ],
            "excludes": [
                "*.phtml",
                "*.twig"
            ],
            "standard": "PSR2"
        }
    }
}

To keep improving, Do you have feedback and suggestions? Or, Are you facing any issues to implement above TYPO3 tutorial? Feel free to write your comment at below comment box; I'll happy to help you :)

Post Comment

Your email address will not be published. Required fields are marked *

×

Name is required!

Enter valid name

Valid email is required!

Enter valid email address

Comment is required!

Google Captcha Is Required!

Be the First to Comment

Stay up to date with our recent TYPO3 Blogs, news, & updates