: Chad Russell
: PHP Development Tool Essentials
: Apress
: 9781484206836
: 1
: CHF 19.40
:
: Allgemeines, Lexika
: English
: 123
: Wasserzeichen/DRM
: PC/MAC/eReader/Tablet
: PDF

Learn PHP development best practices, such as version control, development environment virtualization, and coding standards. You'll also discover the most useful PHP web frameworks, including the new Laravel, symfony2, and micro-frameworks. As you do so, you'll learn how to use them to write the most productive PHP code possible.

PHP Development Tool Essentialscomplements Jason Gilmore's best-sellingBeginning PHP and MySQL. This book will further expose you to the many different methodologies, tools, and concepts that professional web developers are using more and more each day.

What You'll Learn

  • How to use version control with PHP
  • How to set up virtualized development environments
  • How to maintain PHP coding standards
  • How to manage dependencies
  • How to leverage the best PHP frameworks
W o This Book Is For

< iv>This book is for intermediate to advanced PHP developers looking to advance their skills with new tools, concepts, and approaches.


Chad Russell is a programmer and network administrator who owns his own Internet hosting company. He previously has written on MySQL, PHP, and other topics.
Contents at a Glance4
Contents6
About the Author10
About the Technical Reviewer12
Chapter 1: Version Control13
Using Git13
Git Configuration14
Initializing Your Repository14
Initial Commit15
Staging Changes16
Viewing History17
Ignoring Specific Files18
Removing Files18
Branching and Merging20
Merging21
Stashing Changes22
Tagging23
Lightweight Tags23
Annotated Tags24
Undoing Changes25
Amend25
Un-stage25
File Reset26
Soft Reset26
Mixed Reset27
Hard Reset27
Version Control in the Cloud: Bitbucket and GitHub27
Bitbucket27
SSH Key28
Creating Your First Remote Repository28
GitHub29
Pushing, Pulling, and Conflict Resolution29
Git Tools29
PHPStorm29
SourceTree31
Installing SourceTree31
Adding a Repository31
GitHub GUI32
Installing the GitHub GUI32
Adding a Repository33
gitg33
Installing gitg33
Adding a Repository33
Summary34
Chapter 2: Virtualizing Development Environments35
Introduction to Vagrant36
Installing Vagrant and VirtualBox36
Vagrant Commands37
Setting Up Our First Environment38
Initial VM setup40
Shared Folders41
Networking41
VM Settings41
Removing VMs44
Default Vagrant LAMP box44
Advanced Configurations Using Ansible, Bash, and Puppet45
Bash (Shell) Provisioner45
Puppet Provisioner46
Ansible Provisioner48
Advanced Configuration Conclusion49
Configuration Tools49
PuPHPet50
Accessing PuPHPet50
Setting Up and Using PuPHPet Configurations51
Phansible51
Vagrant Plugins53
Summary53
Chapter 3: Coding Standards54
A Look at PHP-FIG54
PSR-1 Basic Coding Standard55
Files55
PHP Tags55
Character Encoding55
Side Effects55
Namespace and Class Names56
Class Constants, Properties, and Methods56
Constants56
Properties56
Methods57
PSR-2 Coding Style Guide57
General58
Files58
Lines58
Indentation58
Keywords and true, false, and null58
Namespace and Use Declarations59
Classes, Properties, and Methods59
Classes59
Properties59
Methods60
Method Arguments60
Abstract, Final, and Static60
Method and Function Calls60
Control Structures61
if, elseif, else61
switch, case61
while, do while62
for62
foreach63
try, catch (and finally)63
Closures63
Omissions from PSR-265
Checking Coding Standards with PHP Code Sniffer65
Using PHP_CodeSniffer66
PHP_CodeSniffer Configuration68
PHP_CodeSniffer Custom Standard69
PHP_CodeSniffe