P. 1
joshua eichorn-pear2

joshua eichorn-pear2

|Views: 12|Likes:
Published by Dan Previte

More info:

Published by: Dan Previte on Jun 10, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/28/2014

pdf

text

original

May 20, 2008

Sheraton Gateway Suite O'Hare

PEAR2, What’s new and what you can use today

May 20, 2008

Sheraton Gateway Suite O'Hare

PEAR2, What’s new and what you can use today
Joshua Eichorn
PEAR Group, Bluga.net WebThumb Webthumb.bluga.net josh@bluga.net May 20, 2008 Sheraton Gateway Suite O'Hare

What is PEAR

• Structured library of open source code for users • Code distribution system / pear installer • Standard code style • Website, mailing lists and mirrors

May 20, 2008

Sheraton Gateway Suite O'Hare Sheraton Gateway Suite O'Hare

2

2

Current State of PEAR: Stats

• 692 Registered Developers • 275 developers who have fixed bugs • 503 Packages • 3,665 releases • 37 million+ downloads

May 20, 2008

Sheraton Gateway Suite O'Hare

3

3

Current state of PEAR: Last year

• 47 new packages • 2686 opened bug tracker items • 1280 fixed bugs • 521 open bugs • 1.02 bugs per package

May 20, 2008

Sheraton Gateway Suite O'Hare

4

4

Current state of PEAR: New things

• PEAR Group & President elected by developers • PEAR Group Blog • PEAR Wiki • Mirrors (US and Germany) • QA Suite (Test coverage, Doc coverage) • Regular bug triage weekends • More documentation

May 20, 2008

Sheraton Gateway Suite O'Hare

5

5

Current state of PEAR: Problems

• Documentation • My-code-is-mine syndrome (rare) • High bus factor on infrastructure • PEAR2 is waiting on PHP 5.3

May 20, 2008

Sheraton Gateway Suite O'Hare

6

6

What is PEAR2

• A new forward looking library of Code • Technology
–PHP 5.3 focused library –Commitment to use all the new features 5.3 gives us –Pyrus –SVN –PhD

• Process
–New proposal process –Collectives
May 20, 2008 Sheraton Gateway Suite O'Hare 7 7

PEAR2 Collectives

• Groups of developers working on similar packages • Full commit access within your group • Code design support • First line QA, pulling releases etc

May 20, 2008

Sheraton Gateway Suite O'Hare

8

8

New proposal process

• New packages go into the Sandbox • Sandbox available to all • Dev channel for sandbox, PEAR2 channel for stable packages • Move from sandbox to main channel at beta • Rules to go beta/stabe
–Complete docs –50% code coverage in unit tests –API approved by 2/3 of collective –Final package name
May 20, 2008 Sheraton Gateway Suite O'Hare 9 9

SVN for all PEAR2 code

• No cvs.php.net for PEAR2 • http://svn.pear.php.net • All packages required to have code in PEAR2 SVN • Willing to work with devs who want code elsewhere • Full real-time mirror of code at a minimum • Consistent directory setup

May 20, 2008

Sheraton Gateway Suite O'Hare

10 10

Documentation with PhD

• Still Docbook • Easy to setup • Integration of full books possible (TDG)

May 20, 2008

Sheraton Gateway Suite O'Hare

11 11

Pyrus - the new installer

• • • • •

Easier to use No installation of the installer just grab the phar Capable of packaging entire apps in phars Can manage multiple installed PEAR trees easily You can install packages in custom tree while using dependencies from the system install • Easy package creation when using the PEAR2 svn layout • If you extract a PEAR2 package you can upgrade it as if it were installed
May 20, 2008 Sheraton Gateway Suite O'Hare 12 12

What you can use today

• You can run Pyrus and the stuff it needs • Pyrus requires a the newest PHP 5.3 • Some code still works on 5.2 nothing has been named spaced yet
–Pyrus –HTTP_Request –SimpleChannelServer –Autoload –SVN Autoload

• No releases yet but you can run from SVN
May 20, 2008 Sheraton Gateway Suite O'Hare 13 13

PEAR2 from SVN

• Autoloader enabled code + consistent directory structure means using SVN code is easy • Autoloader for running from SVN
• svn co http://svn.pear.php.net/PEAR2/all pear2
• require_once 'pear2/autoload.php'; • Rest of the examples assuming you are running from SVN

May 20, 2008

Sheraton Gateway Suite O'Hare

14 14

Pyrus

• Will be available with 5.3 • Should work from SVN right now (unless Greg broke something) • Usage:
–php pyrus.phar command –php pyrus.phar [directory to manage] command

May 20, 2008

Sheraton Gateway Suite O'Hare

15

Using Pyrus to install a package

• No public servers for Pear2 so we have to start from scratch • Build a package • Setup a Channel server • Release the package • Install it using Pyrus

May 20, 2008

Sheraton Gateway Suite O'Hare

16

Making a package, setup

• Build process is easier then PEAR1, no more editing XML files • Code layout has to follow the PEAR2 rules • Project info goes in Readme file • Developer list goes in Credits file • Release notes go in Release-0.1.0 file • Run makepackage.php • Get a package

May 20, 2008

Sheraton Gateway Suite O'Hare

17

makepackage.php

May 20, 2008

Sheraton Gateway Suite O'Hare

18

Simple Channel Server

• PEAR Channel info REST server • No dependencies except for pyrus • Builds static XML and package files

May 20, 2008

Sheraton Gateway Suite O'Hare

19

Creating a channel

May 20, 2008

Sheraton Gateway Suite O'Hare

20

Install the package

• Grab pyrus.phar
• http://svn.pear.php.net/PEAR2/Pyrus/trunk/pyrus.phar • Run from the root directory of where you want to install

• Discover the new channel • php pyrus.phar channel-discover url
• php pyrus.phar install Packagename

May 20, 2008

Sheraton Gateway Suite O'Hare

21

Pyrus tricks

• Manage any directory
– php pyrus.phar directory_to_manage install

• Set your pear install path
– php pyrus.php config-set my_pear_path path_to_manage

• Set multiple paths to use a different tree for dependencies
– path1:path2:path3 or on windows path1;path2;path3

May 20, 2008

Sheraton Gateway Suite O'Hare

22

Production use

• There is a simple Autoloader for production use • Its automatically packaged with every PEAR2 package • Once you get it included it will handle giving you access to all the PEAR2 code • If PEAR2 is in your include path • require_once ‘PEAR2/Autoload.php’ • Otherwise use the full path • Require_once ‘/fullpath/PEAR2/Autoload.php’;

May 20, 2008

Sheraton Gateway Suite O'Hare

23

PEAR2_HTTP_Request

A 5.2 compatible for now, a 5.2 version will likely remain after a 5.3 version is released • Used by Pyrus, Bluga.net WebThumb wrapper • Uses the best HTTP support available • HTTP extension, Curl extension, PHP streams, Raw sockets

May 20, 2008

Sheraton Gateway Suite O'Hare

24 24

PEAR2_HTTP_Request continued

May 20, 2008

Sheraton Gateway Suite O'Hare

25 25

More code on the way

• Infrastructure for Web Services (Client/ Server) • Input Filtering • Session Management • Logging Autoloader • Projects from PEAR1 • That great new project you’re going to write

May 20, 2008

Sheraton Gateway Suite O'Hare

26

How to get involved

• Request a PEAR developer account if you don’t already have one
–http://pear.php.net/account-request.php –Mention pear2 in your request

• You will get access to the SVN sandbox • Your new code will target 5.3 • Coding standards at:
–http://pear.php.net/manual/en/pear2cs.php

May 20, 2008

Sheraton Gateway Suite O'Hare

27

What’s Next

• PEAR group and president elections start on June 1st
–Write pear-dev@lists.php.net saying why you want to run –All PEAR developers are eligible –PEAR-group members will get a free registration to PHP Appalachia 

May 20, 2008

Sheraton Gateway Suite O'Hare

28 28

Thank you

• Thanks for listening. • Questions?

May 20, 2008

Sheraton Gateway Suite O'Hare

29 29

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->