Forum Feature requests

Release PHP Wrapper as a composer package on packagist

markushausammann
Hi

I think any PHP package nowadays should be published as a composer installable package on packagist. Would you mind doing that?

Another thing that could be improved is to use the @deprecated doc tag for deprecated methods and generally fully document the class for code completion, etc.

Later edit: Actually, there are so many things that can be improved that I decided to write a better wrapper... something like this:

/**
* A better PHP wrapper for PrinceXML
*
* Improvements in comparison to the original wrapper:
* - composer installable
* - PSR-4 compliant
* - no constructor params so automic injection is possible
* - complete block documentation
* - fluent setter interface
*
* Class ServiceWrapper
* @package PrincePHP
* @see http://www.princexml.com
*/

Cheers
Markus
markushausammann
https://github.com/markushausammann/princePhp

This is the start, I think you might actually apply your future changes directly there and replace your download with a link because this will be superior in all respects to the current version.
markushausammann
As for now, it's in alpha. Feedback is welcome.
mikeday
Thanks, we will take a look. :)
nikhiltri
I submitted a pull request to do the same, see here: https://github.com/yeslogic/prince-php-wrapper/pull/2

The only downside I can see is that this refactor uses PHP namespaces, which is only valid in PHP version 5.3 or greater. Not sure if you intend to support earlier versions of PHP or not.
jacobfogg
Considering PHP 5.3 was end of life 6 years ago and even 7.2 is about to hit end of life, I would recommend we not aim for php 5.3 support. If 5.3 support is needed, users can stick with the old package.

@mikeday, any chance @nikhiltri's pull request can be approved and listed on packagist?

I would be happy to help get things set up if you would like.
mikeday
We have updated the Prince PHP wrapper and it is up on Packagist now:

https://packagist.org/packages/yeslogic/prince-php-wrapper

Thank you for your patience! Please let me know if there are any issues with the updated wrapper.
nikhiltri
Great, thanks!