Grandt / PHPePub

PHP Classes for dynamically generating EPub files.
http://www.phpclasses.org/package/6115
241 stars 83 forks source link

composer.json / packagist.org listing #11

Closed pavarnos closed 10 years ago

pavarnos commented 11 years ago

Hi. Thanks for the fantastic package. Lovin' it!

Would you consider adding a composer.json and registering on packagist.org? It will help more people use your library, and help us stay up to date more easily. Thanks!

composer.json

{
    "name": "grandt/phpepub",
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "classmap": [ "" ]
    }
}
Grandt commented 11 years ago

Good idea, I'll look into it asap.

Thanks :)

Cheers A.Grandt

On 07-05-2013 11:32, Steve Pavarno wrote:

Hi. Thanks for the fantastic package. Lovin' it!

Would you consider adding a composer.json and registering on packagist.org? It will help more people use your library, and help us stay up to date more easily. Thanks!

composer.json

{ "name": "grandt/phpepub", "require": { "php": ">=5.3.0" }, "autoload": { "classmap": [ "" ] } }

— Reply to this email directly or view it on GitHub https://github.com/Grandt/PHPePub/issues/11.

pavarnos commented 11 years ago

Thanks very much. Composer uses semantic versioning. Attached are some links that might help (sorry if you already know this!) http://getcomposer.org/doc/02-libraries.md#specifying-the-version http://semver.org/ http://git-scm.com/book/en/Git-Basics-Tagging

For those who want to use PHPePub in composer right now, add

    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "grandt/phpepub",
                "version": "dev-master",
                "source": {
                    "url": "https://github.com/Grandt/PHPePub",
                    "type": "git",
                    "reference": "master"
                },
                "autoload": {
                    "classmap": ["EPub.php", "EPub.HtmlEntities.php", "EPub.NCX.php", "EPub.OPF.php", "EPubChapterSplitter.php", "lib.uuid.php", "Logger.php", "Zip.php"]
                }
            }
        }
    ],
    "require": {
        "grandt/phpepub": "@dev"
    }

to your composer.json Note that I had to make the classmap explicitly list the files because they are not namespaced and there is a second EPub class in EPub.250.php

Grandt commented 11 years ago

Thanks, and I didn't know this. :)

As for EPub.250. It's the next version, though I haven't finished testing it fully. I should probably rename the class inside it to 250 as well, just to keep them distinguishable.

Cheers Asbjørn

On 07-05-2013 23:57, Steve Pavarno wrote:

Thanks very much. Composer uses semantic versioning. Attached are some links that might help (sorry if you already know this!) http://getcomposer.org/doc/02-libraries.md#specifying-the-version http://semver.org/ http://git-scm.com/book/en/Git-Basics-Tagging

For those who want to use PHPePub in composer right now, add

"repositories": [
    {
        "type": "package",
        "package": {
            "name": "grandt/phpepub",
            "version": "dev-master",
            "source": {
                "url": "https://github.com/Grandt/PHPePub",
                "type": "git",
                "reference": "master"
            },
            "autoload": {
                "classmap": ["EPub.php", "EPub.HtmlEntities.php", "EPub.NCX.php", "EPub.OPF.php", "EPubChapterSplitter.php", "lib.uuid.php", "Logger.php", "Zip.php"]
            }
        }
    }
],
"require": {
    "grandt/phpepub": "@dev"
}

to your composer.json Note that I had to make the classmap explicitly list the files because they are not namespaced and there is a second EPub class in EPub.250.php

— Reply to this email directly or view it on GitHub https://github.com/Grandt/PHPePub/issues/11#issuecomment-17573406.

Grandt commented 10 years ago

I hope I did it right. The reason there are two EPub classes at the moment, is that 250 is technically still in beta. Though I'm getting quite confident that it is ready for reality. The EPub.NCX.php and EPub.OPF.php classes belong to EPub250, and are not used in the old EPub.php.

2.50 is a major update to the old one, but I can't call it EPub 3, for fear of causing confussion with the ePub 3.0 specification, which is NOT supported in this class.

On 07-05-2013 23:57, Steve Pavarno wrote:

Thanks very much. Composer uses semantic versioning. Attached are some links that might help (sorry if you already know this!) http://getcomposer.org/doc/02-libraries.md#specifying-the-version http://semver.org/ http://git-scm.com/book/en/Git-Basics-Tagging

For those who want to use PHPePub in composer right now, add

"repositories": [
    {
        "type": "package",
        "package": {
            "name": "grandt/phpepub",
            "version": "dev-master",
            "source": {
                "url": "https://github.com/Grandt/PHPePub",
                "type": "git",
                "reference": "master"
            },
            "autoload": {
                "classmap": ["EPub.php", "EPub.HtmlEntities.php", "EPub.NCX.php", "EPub.OPF.php", "EPubChapterSplitter.php", "lib.uuid.php", "Logger.php", "Zip.php"]
            }
        }
    }
],
"require": {
    "grandt/phpepub": "@dev"
}

to your composer.json Note that I had to make the classmap explicitly list the files because they are not namespaced and there is a second EPub class in EPub.250.php

— Reply to this email directly or view it on GitHub https://github.com/Grandt/PHPePub/issues/11#issuecomment-17573406.

pavarnos commented 10 years ago

It would be very helpful if you had a spare moment to register this project on packagist.org (as the official owner / maintainer). It is aware of releases and dev branches, so your users would know what is the latest version to use and could upgrade to it automatically.

If you wanted to go further, composer has tools for specifying dependencies, so you would no longer have to include lib.uuid.php (https://packagist.org/search/?q=uuid) for example. You could use its autoloader so you'd no longer need to include_once() throughout your code. etc.