News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

VG Tech:
Swagger Docs in ZF2 with Examples - Part 1 Setup and Annotations
February 25, 2014 @ 10:33:48

The VG Tech blog has posted the first part of a series they're doing about Zend Framework 2 and Swagger, the auto-generating documentation project for APIs. In this first part of the series, they go through some setup and show the use of annotations to define the Swagger output.

So everyone is building APIs now - parsing and outputting JSON is not that hard. Some people even build truly RESTful APIs, or something not to far from that. Before, when building APIs was about SOAP with XML schemas and WSDL specifications, people spent so much time building their APIs that they had the time to think. Now, building an API is so easy and fast that the documentation is often suffering. [...] Swagger is a popular project providing auto generated API docs based on a service specification. This spec is based on annotation comments in the controllers and models, giving the developer a fairly easy, and close to the code way of keeping the API docs up to date.

He walks you through the process to clone and setup the Zend Framework 2 project first, then pull in the "outeredge/swagger-module" with Composer. This package provides the tools to generate Swagger output from annotations in the PHP code. He also shows you how to set up the Swagger UI project (wordnik/swagger-ui). Finally, he gets into the code examples, showing how to annotate models and use partials.

0 comments voice your opinion now!
swagger api zendframework setup annotation tutorial series part1

Link: http://tech.vg.no/2014/02/24/swagger-docs-in-zf2-with-examples-part-1-setup-and-annotations/

Binary Tides Blog:
Setup Apache 2.4 and Php FPM with mod proxy fcgi on Ubuntu 13.10
December 02, 2013 @ 13:06:17

On the Binary Tides blog there's a new setup tutorial showing how to get Apache 2.3 and PHP FPM up and running with mod_proxy FCGI on Ubuntu (13.10, more specifically).

With the arrival of mod_proxy_fcgi Apache finally gets the ability to neatly talk to external fastcgi process managers making it more efficient at the task. Delegating php requests to external fpm servers greatly reduces the load on web servers like apache resulting into efficient utilisation of machine resources and faster processing speed for users on the other end. Along with all that, php fpm can run opcode caching engines like apc in a very stable manner.

The rest of the post is divided up into the steps you'll need to get things up and running

  • Setup Apache (including VirtualHost)
  • Setup Php-FPM
  • Test the setup
0 comments voice your opinion now!
setup configure apache phpfpm modproxy fcgi ubuntu tutorial

Link: http://www.binarytides.com/setup-apache-php-fpm-mod-proxy-fcgi-ubuntu/

Sameer Borate:
Easy PHP debugging with Kint
November 07, 2013 @ 11:24:02

Sameer Borate has posted about using Kint, a "more powerful debugger" that lets you output more data than just the usual var_dump or print_r provides and in a much more readable format.

My standard debugging tool when using PHP is xdebug. Pairing xdebug with Komodo gives me a very productive environment for building PHP applications. However, testing an application code on a hosted server can be many times frustrating as one has only the print_r and var_dump functions at our disposal. What I need is a library that I can easily install on the server and start using. Although there are a few debugging libraries around, one of my favorites is Kint.

He walks you through the installation of the tool and provides an example of the most basic usage (and output) from a call to the tool's "dump" function. He also gets into some of the additional features the library provides including intelligent formatting, debug tracing and limited theme configuration.

0 comments voice your opinion now!
debug kint output printr vardump example setup

Link: http://www.codediesel.com/tools/easy-php-debugging-with-kint/

Qandidate Blog:
Running symfony standard edition on HHVM
October 23, 2013 @ 12:25:34

On the Qandidate.com blog they have a new post (the second in a series, actually) about getting a Symfony application running on HHVM, the virtual machine version of the HipHop engine originally developed by Facebook. In this second post they show how to install and configure Symfony in a newly installed HHVM instance.

In part one of this series we talked about "Getting started with HHVM" by getting a compiled version of HHVM running in a vagrant box. In this part we'll configure the HHVM webserver to run the symfony standard edition.

They include full instructions for getting the full Standard edition of Symfony, installing Composer and configuring the HHVM server to correctly point to the application's document root. There's also virtual host and static file configurations included too. There's a few changes that need to be made on the Symfony side as well around session storage and timezones. When the server is started up and all goes well, the default Symfony page should come up when you visit the right address.

0 comments voice your opinion now!
symfony standard hhvm configuration setup tutorial

Link: http://labs.qandidate.com/blog/2013/10/21/running-symfony-standard-on-hhvm/

Konrad Podgórski:
Step by Step Guide How to Configure Server for PHP / Symfony Project
October 23, 2013 @ 10:15:25

If you're looking into using Symfony2 for your application and want to be sure your environment is set up correctly, you should definitely check out this new post from Konrad Podgórski. It's a very detailed guide to getting the full environment set up, also including setup of NodeJS and Capifony for deployment.

I decided to publish notes that I have been gathering lately about configuring servers. This is a complete guide how to configure server for production usage with Symfony or any PHP project. Instruction might seem to you very long and I totally agree with you. It took me few months to finish.

His installation includes the full commands and configuration for setting up:

  • Nginx
  • PHP (5.4)
  • MySQL
  • NodeJS
  • Twig
  • Git

He also includes the optional instructions to add in an opcode cache like APC or the Zend OPCache.

0 comments voice your opinion now!
symfony2 environment guide setup configure

Link: http://konradpodgorski.com/blog/2013/10/23/guide-how-to-configure-server-for-symfony/

David Adams:
PuPHPet and Digital Ocean (Screencast)
September 26, 2013 @ 10:39:30

Over on YouTube David Adams has posted a video showing you how to use PuPHPet with Digital Ocean. PuPHPet is a easy to use, graphical tool to help make building Vagrantfiles quick and easy. Digital Ocean bills itself as a cloud service "built for developers" that lets you spin up cloud servers quickly.

The video's about 30 minutes long, but it walks you through the entire process. It's a screencast you can easily follow along with. Unfortunately some of the text is a bit small (and hard to read full-screen) but he talks you through the commands too, which helps.

You can find out more about Digital Ocean's "droplets" here.

0 comments voice your opinion now!
screencast video digitalocean puphpet vagrant setup configuration

Link: https://www.youtube.com/watch?v=dHkTxWffGGA

Adam Culp:
PHPUnit, Composer, PHPStorm, Oh my!
September 03, 2013 @ 12:08:37

In working with the OpenCFP project for the Call for Papers for the Sunshine PHP conference, Adam Culp wanted to integrate it all with his IDE of choice, PHPStorm. He wanted to be able to run the tests from within the IDE and includes the steps of how he did it.

For my CFP I wanted a few more fields of information than the "out of the box" setup, so I quickly added them to the app. However, doing this meant the included unit tests would fail. But wait, I hadn't run the unit tests yet! I realized immediately how spoiled I had become with today's modern frameworks with a testing method built in. This little project did not have that luxury, so I would need to run the tests the old fashioned way, or let an IDE do it for me.

He opted for the latest PHPUnit that the OpenCFP project required (and was installed via Composer) and put the executable path into his project's settings. Then all he needed to do was add a run configuration for the PHPUnit runner and telling it where the actual tests lived.

0 comments voice your opinion now!
opencfp sunshinephp14 phpunit composer phpstorm ide setup unittest

Link: http://www.geekyboy.com/archives/753

Fortrabbit.com:
Integrating Codeship with Fortrabbit
August 29, 2013 @ 10:30:37

On the Fortrabbit blog today they show how to integrate their service with the Codeship.io service, helping make continuous deployment simpler.

We have got a lot of requests concerning continuous integration lately. That's why we've published a new general article in our docs on how to integrate CI in your fortrabbit workflow. Pieter from wercker also just published this great article on how to integrate fortrabbit with wercker. Here is another one from us on how you could something similar combining Codeship with fortrabbit.

They walk you through the full process with a freshly created Fortrabbit application so you can see how to get it set from the start. The article shows you how to set up Codeship with the repository provider and the callback for push notifications. You'll have to set up a ssh key for Codeship to be able to access the repository and a special script that happens on push to trigger the build. There's also a bit at the end about "going multistage" with a different deployment process for each branch.

0 comments voice your opinion now!
codeship fortrabbit continuous deployment tutorial setup configuration

Link: http://blog.fortrabbit.com/integrating-codeship-with-fortrabbit/

VG Tech:
Using PHP's Built-in Web Server in Behat Tests
August 19, 2013 @ 10:13:16

On the VG Tech blog there's a recent post showing you how you can use the built-in PHP web server to help with running your Behat (a behavior-driven development tool) tests.

Behat is a tool for running acceptance tests for your application. If your application is a web application you will need a web server to execute your tests. [...] Some weeks back I wrote a post showing you how to use PHP's built in web server in PHPUnit. This post will show you how to do the same for Behat when running your acceptance tests.

His example (here on github) shows you how to set up Behat via Composer, run it and start in on your first test. In the test's "setUp" method, it calls out to the command line and starts up the built-in web server if it's not already running. It also checks to see if it can connect to the server to make sure it's accessible. Then, in the "tearDown" method, there's a call to kill off the PHP process based on the PID stored on startup.

0 comments voice your opinion now!
builtin webserver bdd tests behat setup teardown

Link: http://tech.vg.no/2013/08/16/using-phps-built-in-web-server-in-behat-tests

Rob Allen:
Setting up Zend Server 6 on OS X for PHP development
August 12, 2013 @ 10:50:18

Rob Allen has posted a full guide to his site today showing how to get Zend Server 6 up and running on an OSX installation:

I recently decided to upgrade my Mac's PHP to 5.4. One of the available options is Zend Server 6.1, Free edition. These are my notes how to set it up so that it works the way I develop.

He goes through each of the steps and includes configuration changes where appropriate:

  • Installation
  • Apache setup
  • Zend Server admin configuration
  • Command line control
  • MySQL setup
  • Apache vhost configuration
  • Fixing sending email (doesn't work "out of the box")

He also points to the section of the Zend Server admin interface that shows the logs - error, access and a php-specific log.

0 comments voice your opinion now!
zendserver osx setup configuration tutorial development

Link: http://akrabat.com/software/setting-up-zend-server-6-on-os-x-for-php-development


Community Events











Don't see your event here?
Let us know!


symfony2 facebook framework introduction podcast language overview composer unittest package opinion release component code hhvm application hack security support install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework