SlideShare a Scribd company logo
By Gaurav Agrawal 2017
Configuring PHPCodesniffer for Drupal
7,8 in windows
+
By Gaurav Agrawal 2017
Install PEAR on Windows
Steps:
1) DownloadPEARPHARfile firstfrom: http://pear.php.net/go-pear.phar
Note:Don’t copypaste,save it as textfile andthenchange itsextensionto.phar
2) Save `go-pear file` fromabove pathandsave in PHP folderof xampp/wamp/devdesktop:(orwamp)
ex:C:ProgramFiles(x86)DevDesktopphp5_6
3) Opena commandprompt withadministrative access/permission(Allprograms –> accessoriesand
right-clickcommandpromptandselect“runas administrator”)
4) Nowgo to your PHPinstallationdirectory,install PEARnow,runfollowingcommandtoinstall PEAR:
`php go-pear.phar`
5) Nextyou will have toselectsystemforinstall type (systemisbydefaultselected,soyoucan hitenter
to continue.) (Hitenterfordefault settings)
6) Nownextstepwill askyoufor PHPwhichPEARis goingto use. (Hitenterfordefault settings)
Note:(Hitenterfor defaultsettingswhereverapplicable)
By Gaurav Agrawal 2017
7) On thislaststepyou needtoregistersome environmentvariableinyoursystem, whichcanbe done
by runningPEAR_ENV.regfile.
Install PHPCodeSniffer (PHPCS) on Windows
We have PHPPEAR isinstalledand nowitstime toinstall PHPCodeSnifferwhichisone of the Package of
PEAR.
1) Opencommandpromptwithadministrativeaccess.
2) Move to yourPHP installationdirectory.
3) Start installationof PHPCodeSnifferbyrunningfollowingcommand.
Pear install PHP_Codesniffer-2.9.1
Note: Install 2.9.1 version of codesniffer
Once installationisdone,youcanexecute phpcs-i incommandpromptto see versionof installedPHP
CodeSniffer.
So far whatwe have done isinstallationof PEARandPHP Code Sniffer onwindowsmachine.
By Gaurav Agrawal 2017
Download Coder Module for Drupal 7 or 8
2. Download the Coder module
Note:Downloadthe 8.x branch, evenif youintendtouse iton Drupal 7.
You can downloaditinany 'normal' folder,butnotina Drupal project.
cd /folder/where/i/want/coder
‘drush dl coder’ or downloadmanually.
It shoulddownloadthe latestversionwhichis8.x - if itdoesn'tthenadd --selecttothe drushcommand
and choose the 8.x branch.
3. Add Drupal standards to PHP Code Sniffer
Tell phpcsto use the Drupal standardsfromthe downloadedCodermodule:
phpcs --config-setinstalled_paths/folder/where/i/want/coder/coder/coder_sniffer
Ex: phpcs --config-setinstalled_pathsC:Userscodercoder_sniffer
At thispointyouhave PHP Code Sniffer setupwithDrupal codingstandards.
Run phpcs –i, drupal standardsare addednow. (Drupal andDrupalPractice)
Check Drupal bestpractices
You can use it fromcommandline byrunning:
phpcs --standard=Drupalextensions=php,module,inc,install,test,profile,theme,css,info,txt,md
file/to/check
Example:-
By Gaurav Agrawal 2017
Automaticallyfix codingstandards
phpcbf --standard=Drupal--extensions=php,module,inc,install,test,profile,theme,css,info,txt,md
/file/to/drupal/example_module
For more operationsvisit:
https://www.drupal.org/node/1587138
References:
http://www.xpertdeveloper.com/2014/07/install-php-codesniffer-on-windows-machine/

More Related Content

What's hot

Install odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debianInstall odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debian
Francisco Servera
 
arbol mostaza
arbol mostazaarbol mostaza
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam QuestionsRed Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Study Material
 
Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OS
Siddharth Ram Dinesh
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
franbow
 
Dating Pro Installation Instructions
Dating Pro Installation InstructionsDating Pro Installation Instructions
Dating Pro Installation Instructions
Pilot Group Ltd
 
Anthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationAnthony McKeown Drupal Presentation
Anthony McKeown Drupal Presentation
Tony McKeown
 
nir
nirnir
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using MetasploitPrivileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Vishal Kumar
 
Using strace
Using straceUsing strace
Using strace
Ryan Robson
 
Understanding PHP memory
Understanding PHP memoryUnderstanding PHP memory
Understanding PHP memory
julien pauli
 
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext PasswordsDumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
Vishal Kumar
 
How lve stats2 works for you and your customers
How lve stats2 works for you and your customersHow lve stats2 works for you and your customers
How lve stats2 works for you and your customers
CloudLinux
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.
İbrahim UÇAR
 
Apache
ApacheApache
Apache
HAINIRMALRAJ
 
How to secure ubuntu 12.04
How to secure ubuntu 12.04 How to secure ubuntu 12.04
How to secure ubuntu 12.04
John Richard
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Ajaigururaj R
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
venkatakrishnan k
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deploy
fcrippa
 
DNF Failed To Open Cache
DNF Failed To Open CacheDNF Failed To Open Cache
DNF Failed To Open Cache
VCP Muthukrishna
 

What's hot (20)

Install odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debianInstall odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debian
 
arbol mostaza
arbol mostazaarbol mostaza
arbol mostaza
 
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam QuestionsRed Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
 
Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OS
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
Dating Pro Installation Instructions
Dating Pro Installation InstructionsDating Pro Installation Instructions
Dating Pro Installation Instructions
 
Anthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationAnthony McKeown Drupal Presentation
Anthony McKeown Drupal Presentation
 
nir
nirnir
nir
 
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using MetasploitPrivileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
 
Using strace
Using straceUsing strace
Using strace
 
Understanding PHP memory
Understanding PHP memoryUnderstanding PHP memory
Understanding PHP memory
 
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext PasswordsDumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
 
How lve stats2 works for you and your customers
How lve stats2 works for you and your customersHow lve stats2 works for you and your customers
How lve stats2 works for you and your customers
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.
 
Apache
ApacheApache
Apache
 
How to secure ubuntu 12.04
How to secure ubuntu 12.04 How to secure ubuntu 12.04
How to secure ubuntu 12.04
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deploy
 
DNF Failed To Open Cache
DNF Failed To Open CacheDNF Failed To Open Cache
DNF Failed To Open Cache
 

Similar to Drupal 7,8 Coder and PHPcodesniffer installation guide

Setting up a debugging environment for Drupal
Setting up a debugging environment for DrupalSetting up a debugging environment for Drupal
Setting up a debugging environment for Drupal
jonlee554
 
Php.ppt
Php.pptPhp.ppt
Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009
Helgi Þormar Þorbjörnsson
 
An Introduction to Xdebug for WordPress
An Introduction to Xdebug for WordPressAn Introduction to Xdebug for WordPress
An Introduction to Xdebug for WordPress
Kayleigh Thorpe
 
Php ppt
Php pptPhp ppt
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
Ivelina Dimova
 
Creating a phar
Creating a pharCreating a phar
Creating a phar
Adrian Cardenas
 
Php
PhpPhp
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
Olivia J. Jones
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
usha kannappan
 
Slide 1 - The University of Mississippi
Slide 1 - The University of MississippiSlide 1 - The University of Mississippi
Slide 1 - The University of Mississippi
webhostingguy
 
Php introduction and configuration
Php introduction and configurationPhp introduction and configuration
Php introduction and configuration
Vijay Kumar Verma
 
Mahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud PlatformMahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud Platform
IMC Institute
 
PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
Walter Ebert
 
Sahu
SahuSahu
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
kuldeepakgautam
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confoo
Combell NV
 
Cross-platform development with Pharo - The PharoLauncher case
Cross-platform development with Pharo - The PharoLauncher caseCross-platform development with Pharo - The PharoLauncher case
Cross-platform development with Pharo - The PharoLauncher case
ESUG
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
Jackson F. de A. Mafra
 
Securing Your Web Server
Securing Your Web ServerSecuring Your Web Server
Securing Your Web Server
manugoel2003
 

Similar to Drupal 7,8 Coder and PHPcodesniffer installation guide (20)

Setting up a debugging environment for Drupal
Setting up a debugging environment for DrupalSetting up a debugging environment for Drupal
Setting up a debugging environment for Drupal
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009
 
An Introduction to Xdebug for WordPress
An Introduction to Xdebug for WordPressAn Introduction to Xdebug for WordPress
An Introduction to Xdebug for WordPress
 
Php ppt
Php pptPhp ppt
Php ppt
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
 
Creating a phar
Creating a pharCreating a phar
Creating a phar
 
Php
PhpPhp
Php
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
 
Slide 1 - The University of Mississippi
Slide 1 - The University of MississippiSlide 1 - The University of Mississippi
Slide 1 - The University of Mississippi
 
Php introduction and configuration
Php introduction and configurationPhp introduction and configuration
Php introduction and configuration
 
Mahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud PlatformMahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud Platform
 
PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
 
Sahu
SahuSahu
Sahu
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confoo
 
Cross-platform development with Pharo - The PharoLauncher case
Cross-platform development with Pharo - The PharoLauncher caseCross-platform development with Pharo - The PharoLauncher case
Cross-platform development with Pharo - The PharoLauncher case
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
 
Securing Your Web Server
Securing Your Web ServerSecuring Your Web Server
Securing Your Web Server
 

Recently uploaded

Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 

Recently uploaded (20)

Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 

Drupal 7,8 Coder and PHPcodesniffer installation guide

  • 1. By Gaurav Agrawal 2017 Configuring PHPCodesniffer for Drupal 7,8 in windows +
  • 2. By Gaurav Agrawal 2017 Install PEAR on Windows Steps: 1) DownloadPEARPHARfile firstfrom: http://pear.php.net/go-pear.phar Note:Don’t copypaste,save it as textfile andthenchange itsextensionto.phar 2) Save `go-pear file` fromabove pathandsave in PHP folderof xampp/wamp/devdesktop:(orwamp) ex:C:ProgramFiles(x86)DevDesktopphp5_6 3) Opena commandprompt withadministrative access/permission(Allprograms –> accessoriesand right-clickcommandpromptandselect“runas administrator”) 4) Nowgo to your PHPinstallationdirectory,install PEARnow,runfollowingcommandtoinstall PEAR: `php go-pear.phar` 5) Nextyou will have toselectsystemforinstall type (systemisbydefaultselected,soyoucan hitenter to continue.) (Hitenterfordefault settings) 6) Nownextstepwill askyoufor PHPwhichPEARis goingto use. (Hitenterfordefault settings) Note:(Hitenterfor defaultsettingswhereverapplicable)
  • 3. By Gaurav Agrawal 2017 7) On thislaststepyou needtoregistersome environmentvariableinyoursystem, whichcanbe done by runningPEAR_ENV.regfile. Install PHPCodeSniffer (PHPCS) on Windows We have PHPPEAR isinstalledand nowitstime toinstall PHPCodeSnifferwhichisone of the Package of PEAR. 1) Opencommandpromptwithadministrativeaccess. 2) Move to yourPHP installationdirectory. 3) Start installationof PHPCodeSnifferbyrunningfollowingcommand. Pear install PHP_Codesniffer-2.9.1 Note: Install 2.9.1 version of codesniffer Once installationisdone,youcanexecute phpcs-i incommandpromptto see versionof installedPHP CodeSniffer. So far whatwe have done isinstallationof PEARandPHP Code Sniffer onwindowsmachine.
  • 4. By Gaurav Agrawal 2017 Download Coder Module for Drupal 7 or 8 2. Download the Coder module Note:Downloadthe 8.x branch, evenif youintendtouse iton Drupal 7. You can downloaditinany 'normal' folder,butnotina Drupal project. cd /folder/where/i/want/coder ‘drush dl coder’ or downloadmanually. It shoulddownloadthe latestversionwhichis8.x - if itdoesn'tthenadd --selecttothe drushcommand and choose the 8.x branch. 3. Add Drupal standards to PHP Code Sniffer Tell phpcsto use the Drupal standardsfromthe downloadedCodermodule: phpcs --config-setinstalled_paths/folder/where/i/want/coder/coder/coder_sniffer Ex: phpcs --config-setinstalled_pathsC:Userscodercoder_sniffer At thispointyouhave PHP Code Sniffer setupwithDrupal codingstandards. Run phpcs –i, drupal standardsare addednow. (Drupal andDrupalPractice) Check Drupal bestpractices You can use it fromcommandline byrunning: phpcs --standard=Drupalextensions=php,module,inc,install,test,profile,theme,css,info,txt,md file/to/check Example:-
  • 5. By Gaurav Agrawal 2017 Automaticallyfix codingstandards phpcbf --standard=Drupal--extensions=php,module,inc,install,test,profile,theme,css,info,txt,md /file/to/drupal/example_module For more operationsvisit: https://www.drupal.org/node/1587138 References: http://www.xpertdeveloper.com/2014/07/install-php-codesniffer-on-windows-machine/