psliwa/PdfBundle

ZendFramework components

Closed this issue · 8 comments

The PdfBundle requires:

"require": {
    "php": ">=5.3.0",
    "symfony/symfony": ">=2.0",
    "psliwa/php-pdf": ">=1.1.5",
    "sensio/framework-extra-bundle": ">=2.0"
}

Thats oke, but... the psliwa/php-pdf requires:

"zendframework/zendpdf": ">=2.0.0-rc2",
"zend-cache": ">=2.0.0-rc2",
"zend-barcode": ">=2.0.0-rc2",
"zend-memory": ">=2.0.0-rc2",
"zend-validator": ">=2.0.0-rc2",
"imagine/Imagine": ">=v0.2.6"

And the PdfBundle requires only:

"zendframework/zendpdf": ">=2.0.0-rc2",
"zend-cache": ">=2.0.0-rc2",
"zend-memory": ">=2.0.0-rc2",

The zend-validator requires zendframework\/zend-i18n.
zendframework\/zend-i18n requires a PHP extension (not default extension)

Your PDF bundle is a bit overkill for only PDF's.

Is there a way to create a lightweight bundle?
Probably the PHPPdf bundle can do more then creating PDFs? Maybe a idee to split your functionality in more bundles.

zend-barcode is required for barcodes support, zend-validator is required by zend-barcode, Imagine is required for image generating support. Maybe the best solution is to move barcode and imagine to suggest section of composer.js file, because this dependencies are optionally. I will re-think this.

Maybe a idee to split your functionality in more bundles

No, this is not good idea - this bundle is only bridge for PHPPdf library.

It would be nice if you "deliver" the base for the PDF and have some extension on the bundle like your bardcode (so people can choose for it IF they want it ^^).

I think this would be art for the art (creating separate bundles to include additional external dependencies). As I said I have moved those optionally dependencies to suggest section: psliwa/PHPPdf@97871e0. Who want barcodes or Imagine, have to add dependencies to required libraries by themselves.

This change has been made only in master branch, but I will create soon new stable branch 1.2.x, because there was some changes that broke backward compatibility.

Oke nice. Thnx

How can I use the master for composer?
I only require "psliwa/pdf-bundle": "*"

Try to add "psliwa/php-pdf": ">=1.2.0" or "psliwa/php-pdf": "master" to your composer.json file.

Hmm, it does not work.. What to do?

Sorry for late answer. Now it should work. Info about PHPPdf in packagist was outdated - I have fixed it. More details: psliwa/PHPPdf#21