Book Image

PhpStorm Cookbook

By : Mukund Chaudhary
Book Image

PhpStorm Cookbook

By: Mukund Chaudhary

Overview of this book

Table of Contents (16 chapters)
PhpStorm Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

PhpStorm is a smart PHP IDE that gets your code and understands its structures. It provides code autocompletion, refactoring, syntax highlighting, and much more. PhpStorm makes debugging and testing really easy, especially with debugger configuration validation.

PhpStorm Cookbook contains several tutorials that will allow you to run PHP development at a good pace by helping you test and debug, which is often ignored by developers.

The book starts off focusing on how to cook using PhpStorm, gives you an overview of PHP development, and then dives deep into the details of refactoring and building your project using the PhpStorm IDE. After that, it moves to integrating frameworks and testing and debugging them. We then move on to using PhpStorm in a team, using Phing and cooking plugins. We conclude that this book will be of a great help to a PHP programmer who loves to use IDE and looks forward to working faster.

What this book covers

Chapter 1, Cooking with PhpStorm, gives you a quick overview about accessing a project, customizing a view, moving to the previous and next editor locations, and more.

Chapter 2, PHP Development, covers PHP classes; methods, including the getter/setter method; code blocks; commenting; and more.

Chapter 3, Refactoring and Building, includes renaming, copying, moving, and deleting elements; it includes code searching, comparing, and setting the run configuration.

Chapter 4, Integrating Framework, covers the need for a framework and how frameworks such as Symphony and Yii work with PhpStorm.

Chapter 5, Testing and Debugging, gives you an overview about installing PHPUnit, testing an application, setting a breakpoint, changing code on the fly, and much more.

Chapter 6, Using PhpStorm in a Team, includes creating a CVS repository, connecting PhpStorm to a CVS repository, committing a file, checking out projects, and much more.

Chapter 7, PhpStorm and Phing, gives you an overview of connecting Phing to PhpStorm, building an application, setting the Phing editor option, and more.

Chapter 8, Cooking Library Plugins, is about validating a plugin, code hinting for the plugin, and more.

Chapter 9, Code Quality Analysis, covers the mess detector and the code sniffer; it also covers locating code duplicates and code formatting and rearrangement.

What you need for this book

This book assumes you have prior knowledge of PHP and you have a computer with Apache, PHP, and PhpStorm IDE installed.

Who this book is for

This book is for all levels of web application developers who look forward to working faster and efficiently using PhpStorm IDE. It assumes that readers have prior knowledge of PHP development using the LAMP/WAMP environment; however, this book focusses on LAMP.

Sections

This book contains the following sections:

Getting ready

This section tells us what to expect in the recipe and describes how to set up any software or any preliminary settings needed for the recipe.

How to do it…

This section characterizes the steps to be followed to "cook" the recipe.

How it works…

This section usually consists of a brief and detailed explanation of what happened in the previous section.

There's more…

It consists of additional information about the recipe in order to make the reader more anxious about the recipe.

See also

This section may contain references to the recipes.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "If a folder is provided in include path, it will be helpful in auto completion for include(), require(), and so on."

A block of code is set as follows:

class Dish {
/**
* @param string $dishName The name of the dish
*/
protected function addSalt(){ }
}

A command-line input or output is shown as:

svnadmin create /path/to/your/repo/

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "To turn this feature on, you need to select the checkbox adjacent to Sort lookup items lexicographically."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.