Feed aggregator

My contribution to Mentoring in the PHP Community

Planet-PHP - Sun, 26/05/2013 - 03:38

After the awesome mentorship summit at php[tek] 2013 a little over a week ago, I decided that as part of my contributions to mentoring in the community I would put out a call:

Anyone and everyone who would like to speak at a conference, I want to review and critique your talk submissions.

As part of this, I’d like to offer an opportunity for to you bounce ideas for talks off me, to work with you on tightening up your title/abstract, and if I have time, to review slides and/or do a google hangout run through prior to you speaking.

To make this process as easy and efficient as possible:

  • If you want to bounce ideas off me, you can find me on #phpmentoring on Freenode IRC, or ping me via Twitter for IM details.
  • For proposal review, please put them in a gist and we can work from there — just ping me on Twitter beforehand, and then once I get back to you I’ll ask for the gist link.
  • For slide review, ask on Twitter/IRC — and don’t be upset if I say no. This is a much more time consuming thing.
  • For hangouts, do one of the first two things and if it’s something I’d like to see, I’ll probably suggest it

I hope in this way I can help a bunch of people in a fairly informal way, and we can bring a bunch of new blood to the speaking circuit.

Also: please don’t limit this to just PHP-related topics. I’m happy to give advice on many more things (that I feel qualified for), soft and hard topics.

Categories: Open Source, PHP Community

Community News: Packagist Latest Releases for 05.25.2013

PHPDeveloper.org - Sat, 25/05/2013 - 15:05
Recent releases from the Packagist:

PHP Subconference at FrOSCon 2013

Planet-PHP - Sat, 25/05/2013 - 08:59
This years FrOSCon – one of the most awesome open source software conferences – is right ahead and we are organizing a PHP project room again this year. Read more for details…
Categories: Open Source, PHP Community

XPath expert needed

Planet-PHP - Fri, 24/05/2013 - 20:27

In the PHPCR implementation using Doctrine DBAL we support search queries by converting the SQL2/QOM statements into XPath queries that we run on the XML stored in an RDBMS. Sounds insane, yes .. but it works pretty well .. obviously will not scale very well .. but it works for smaller data sets and there will be ways to improve performance later. In terms of functionality we have everything working quite well including JOIN support that was added recently.

However we are stuck with multivalue queries. What makes it particularly tricky is that we do not know which properties are multivalue and which are not as illustrated by these tests.

As you can see in the test we have a multivalue property "tags" and in the SQL2 statement we want to test if that multivalue property contains both "foo" and "bar". However inside the query engine we do not know that this property is multivalued or not.

The relevant code is in QOMWalker:: sqlXpathValueExists() and QOMWalker:: sqlXpathExtractValue(). As you can see it currently only looks at "sv:value[1]".

You can find some more information here:
https://github.com/jackalope/jackalope-doctrine-dbal/issues/88

Categories: Open Source, PHP Community

Adam Culp: PHP usage statistics

PHPDeveloper.org - Fri, 24/05/2013 - 18:41

Adam Culp has posted his own look at some of the PHP usage statistics that are out there and how they can be interpreted.

Every once in awhile I stumble across someone who is trying to find their way and decide what they will do in their career. As the organizer of a PHP user group I see many new developers passing through. Of course I always speak of how strong PHP is in the web markets, and encourage new web developers to pursue PHP as a tool in their box of goodies. Because as a web developer it would be a career limiting move to not have any knowledge of PHP. Here is why...

He shares a few different sources including w3tech's overall and PHP-specific information (PHP5 specific here) and the current results of the TIOBE index showing language popularity. For each he talks some about what the results mean (and don't mean) and how, if you're a "professional developer" you should, at the least, know PHP - the most dominant language in the web space.

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

Michelangelo van Dam: UA Testing with Selenium and PHPUnit

PHPDeveloper.org - Fri, 24/05/2013 - 17:18

In this new post to his site Michaelangelo van Dam looks at user acceptance testing with PHPUnit and Selenium.

Last week I spoke at php[tek] 2013 where I explained to people how to get started with Selenium IDE to record user interaction with the web interface, convert them to PHPUnit testcases and automatically execute them on multiple browsers on multiple platforms. The feedback I got was awesome, you're all a great crowd! But on twitter I also received a bunch of questions regarding how to set up multiple platforms and why I used Windows in my presentation to deploy to. So today I deceided it was time to write a full article on this subject.

He introduces Selenium and what kinds of things it can be used to test. He also defines "user acceptance testing" and talks about why they're an important part of the testing ecosystem. He then walks you through the process of getting the testing environment set up, creating a few tests and how to convert them over to PHPUnit tests (using a built-in tool). Screencasts show you each step of the way. He includes a little tweaking you'll need to do to to the test code to get it working with your own Selenium server

Link: http://www.dragonbe.com/2013/05/ua-testing-with-selenium-and-phpunit.html

PHP.net: PHP 5.5.0RC2 is available

PHPDeveloper.org - Fri, 24/05/2013 - 16:55

On PHP.net today they've announced the release of the latest Release Candidate in the PHP 5.5.x series - PHP 5.5.0RC2.

The PHP development team announces the availability of the second release candidate of PHP 5.5. This release fixes some bugs against RC1 and improves overall stability. [...] Please help us to identify bugs in order to ensure that the release is solid and all things behave as expected. Please test this release candidate against your code base and report any problems that you encounter to the QA mailing list and/or the PHP bug tracker.

Issues corrected include a segfault when memory was used up, an issue with mbstring in PHPT tests in Windows x64 and a problem with custom exceptions. You can find the full list of changes in the NEWS file. Please download this latest release candidate (Windows here) and test it out on your systems.

Link: http://php.net/index.php#id2013-05-23-1

Community News: Packagist Latest Releases for 05.24.2013

PHPDeveloper.org - Fri, 24/05/2013 - 15:07
Recent releases from the Packagist:

Phix 0.16.0 Released

Planet-PHP - Thu, 23/05/2013 - 22:10

Phix is a tool for creating and managing PHP components and tools and releasing them as PEAR packages.

I’ve pushed out Phix 0.16.0 this evening, with the following changes:

  • phing build-vendor now removes the component’s own code from the vendor/ folder. (We build the vendor/ folder using PEAR, which installs the component into the vendor/ folder … sigh)
  • An update to Phing changed the default behaviour of the <fileset> tag, breaking backwards-compatibility. I’ve updated our build.xml file to make the <fileset> tag revert back to its original behaviour.

To update your copy of Phix, please run:

pear upgrade phix/phix4componentdev

Any problems, please let me know.

Categories: Open Source, PHP Community

UA Testing with Selenium and PHPUnit

Planet-PHP - Thu, 23/05/2013 - 20:00

Last week I spoke at php[tek] 2013 where I explained to people how to get started with Selenium IDE to record user interaction with the web interface, convert them to PHPUnit testcases and automatically execute them on multiple browsers on multiple platforms.
The feedback I got was awesome, you're all a great crowd! But on twitter I also received a bunch of questions regarding how to set up multiple platforms and why I used Windows in my presentation to deploy to.
So today I deceided it was time to write a full article on this subject.
What is Selenium?
Selenium is a tool that allows you to continuously test user interfaces of web applications. The most common usages for Selenium testing are the following:
  • testing elements are (not) on the web interface
  • users can't break out a certain flow on the web interface
  • calculated values are correct after modification
  • errors appear on screen when mistakes are made by users
  • reported issues are valid
In general we call these type of tests User Acceptance Tests or UAT and are all focused from the point of the end-user, the person using the web interface to accomplish a certain goal.
Why are they important?
UAT have their own right to exist. Just like regular unit, performance and stress tests they have their own agenda and are adressing a particular part of your application that needs testing. All to prevent your customers/visitors from finding issues, bugs or just unfunctional pieces on your web application and loose their trust in your products or services.
Therefor it's always good to invest in the "visibile" part of your web application. Especially when using javascript, you want to ensure it always works as intended.
Disclaimer
Selenium tests are in no way a replacement for regular unit tests. Their focus is on generated output of your web application within a browser. Unit tests are still necessary to ensure the logic of your application is not broken when making modifications or adding new functionality!
Setting things up
You can write your own Selenium tests by hand, but the easiest way is to use the 

Truncated by Planet PHP, read more at the original (another 36325 bytes)

Categories: Open Source, PHP Community

Anna Filina: Full Test Coverage is Impractical

PHPDeveloper.org - Thu, 23/05/2013 - 19:06

In her latest post Anna Filina proposes that full test coverage is an impractical way to measure the quality of your software. It can provide a false sense of security, even if the tests are poorly written.

Many developers claim that to achieve high quality software, developers must create automated tests that ensure that all possible execution routes have been covered. This is also known as full path coverage. I will argue that different types of software require different testing approaches and that full path coverage is impractical in almost every case. Too many tests simply create clutter.

She looks at how it's impractical to expect that all tests will be written efficiently or even correctly. Even simple tests are enough to show up on code coverage reports but may only be painting part of the picture. She also notes that not all software can be tested the same way - things like APIs require different testing skills/methods than something like consumer software.

In the end, there are no exact rules on how much to test. The most important thing to keep in mind is that writing tests for the sake writing tests is futile and costly. [...] Focus on building great software. Tests are a tool to make it better. Just don't overdo it. Link: http://annafilina.com/blog/full-test-impractical

ZFort Group: The Battle of the Titans. Zend vs. Symfony

PHPDeveloper.org - Thu, 23/05/2013 - 18:55

In this new post to the ZFort blog Elena Bizina compares Symfony and Zend Framework from her perspective, looking at things like functionality, general understanding and community.

Zend and Symfony are the two frameworks that are often compared. Which one is more functional? Which one is more preferable in terms of productivity? Which one is better for general understanding? Which of these two has a larger community? I've asked Zfort Group experts to help me with these questions, and here's what we have come to.

She first gives a high-level overview of each framework, pointing out a few of the features and tools they have built-in. She then goes on to answer the questions above, noting that she sees Symfony as coming out in the lead. Some of the questions are a little vague, so it's not entirely clear why one is different than the other. What do you think? Leave a comment here with your opinions.

Link: http://www.zfort.com/blog/zend-vs-symfony

Lorna Mitchell: Simplest PHP Generator Example

PHPDeveloper.org - Thu, 23/05/2013 - 17:31

On her blog Lorna Mitchell has posted an example of a basic generator written in PHP, a feature of the upcoming PHP version 5.5.

I really like the generators feature that's arriving in PHP 5.5, and since we're now into release candidate releases, it's actually not that far away. I've been speaking on this topic and I thought I'd share my trivially simple code example from my slides.

She includes an example of a very basic generator using the new "yield" keyword and how to implement it in a simple foreach loop. There's also a little talk about when is a good time to use generators in your applications (two examples: complex number calculation and working with large data sets a chunk at a time). For more information on how these generators will work, check out this page in the PHP manual.

Link: http://www.lornajane.net/posts/2013/simplest-php-generator-example

Engine Yard: A Conversation About Testing in PHP

PHPDeveloper.org - Thu, 23/05/2013 - 16:42

On the Engine Yard blog today they've posted a conversation about testing between Ed Finkler and Chris Hartjes (also the hosts of the DevHell podcast).

Our friends Ed Finkler and Chris Hartjes recently had a chat about testing in PHP. Read on to get the low down on different testing tools and their relative merits-check it out as Ed and Chris weep for the future, come to some interesting conclusions and get their hands dirty so you don't have to.

They talk some about the current tools for unit testing in PHP applications and show what a sample test looks like. Ed talks about how the current testing tools can make it intimidating for people to get started testing and mentions the built-in testing library in Python that is a bit easier. There's also some mention of acceptance/functional testing and the Behat + Mink combo.

Link: https://blog.engineyard.com/2013/a-conversation-about-testing-in-php

Community News: Packagist Latest Releases for 05.23.2013

PHPDeveloper.org - Thu, 23/05/2013 - 15:03
Recent releases from the Packagist:

Swede From Future Says He Can Code

Planet-PHP - Thu, 23/05/2013 - 11:22
A revaluation today as a Swedish national, who has traveled back in time, says he can code!
Categories: Open Source, PHP Community

PGSQL Cheat Sheet

Planet-PHP - Thu, 23/05/2013 - 11:22
This table provides a simple ready reference to some common commands used in PostgreSQL. Ideal for those more accustomed to MySQL or other databases.
Categories: Open Source, PHP Community

Simple Mysql PHP Menu

Planet-PHP - Thu, 23/05/2013 - 11:22
There are possibly as many menu systems available for PHP and MySQL as there are PHP programmers. Here is yet another way of generating menus from a database.
Categories: Open Source, PHP Community
Syndicate content