Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The only fully supported Zend Framework 1 Composer on Github!
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
extras
library/Zend
resources/languages removing .DS_Store
tests
.gitignore
INSTALL.txt
LICENSE.txt
README.md Update master
README.txt adding ZF 1.11.11
composer.json

README.md

Zend Framework 1 for Composer

This is a maintained mirror of ZF1 for use with Packagist. You can find the original ZF1 readme in README.txt

Why maintain a mirror? Because we love Github & Composer - it's just a better experience than the official Subversion Repository.

Installation

To install, add the following to composer.json at the root of your project:

{
    "require": {
        "breerly/zf1": "1.11.*",
    }
}

Then download composer and install the dependencies.

curl -s http://getcomposer.org/installer | php
php composer.phar install

Using ZF Components standalone

Require the autoloader and you're good to go.

<?php
require 'vendor/autoload.php';
Zend_Debug::dump('it worked!');

Setting up an entire Zend Framework Project

Use ZF's cli to setup your project.

php vendor/bin/zf.php --help
php vendor/bin/zf.php create project . myproject

Now install vendors.

curl -s http://getcomposer.org/installer | php
php composer.phar install

You'll want to add the vendors folder to your .gitignore

echo vendors >> .gitignore

Then at the top of public/index.php require the autoloader.

<?php
require_once __DIR__ . '/../vendor/autoload.php';
// ...

You're good to go!

Bonus: Optimizing Autoload

If you do not plan on using ZF's library convention for autoloading and instead plan on using Composer across the board, you should disable Zend_Loader_Autoloader by adding this line in public/index.php before the application is bootstrapped.

<?php
// ...
spl_autoload_unregister(array('Zend_Loader_Autoloader','autoload'));
$application->bootstrap()->run();
Something went wrong with that request. Please try again.