Skip to content

Instantly share code, notes, and snippets.

<?php
/*
* This file is part of the Assetic package.
*
* (c) Kris Wallsmith <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
<?php
require_once __DIR__.'/silex.phar';
require_once __DIR__.'/twig/lib/Twig/Autoloader.php';
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Silex\Framework;
Twig_Autoloader::register();
@lox
lox / phark_proposal.md
Created November 23, 2010 04:03
A proposal for a sane php package manager

Proposal for Phark, a sane php package manager

As it stands PEAR sucks. It's complicated, clumsy and is full of utter garbage (sorry).

PHP is rapidly dying because we don't have any decent way of writing code that can easily build on the work of others. What we need is a simple, open package management system like rubygems.

We now have decent support for namespaces, class autoloading and archives. I propose we abandon

Sinatra

ruby 1.9.2 + async_sinatra + thin thin start

ab -n 10000 -c 100 http://localhost:3000/
-> 49ms / request

Node

node server.js

Explaining hooks

Most of you have probably already seen the blog post regarding the RFC process for hooks to be added to ascraeus (phpBB 3.1). And many of you may not know what a hooks system actually is, so I will take the time to explain it.

In olympus (phpBB 3.0) all new additions to the core must be done by editing or patching the core files. The MODification is either installed manually or by using AutoMOD. What a MOD usually does is add some specific code at a specific location, for example database queries, template assignments or loading of language files. This approach worked for 2.0 and it works for 3.0, but frankly it produces a horrible mess. Installing MODifications is a great pain, uninstalling them is almost impossible in some cases.

To solve this issue we are introducing a hooks system. The hook system defines code injection points, giving each one of them a unique identifier. The hooks manager allows MODificati

MODX

  • originally text template (phpBB2)
  • XML based format
  • machine readable
  • xsd schema validation
  • xsl stylesheet
  • pain to write by hand
  • convertor text => modx
  • modx2?