shaneharter / PHP-Daemon

Build production-ready Daemons using PHP 5.3+. Build fault-tolerant applications without the boilerplate.
Other
768 stars 166 forks source link

Integrate With Composer #11

Open etscrivner opened 12 years ago

etscrivner commented 12 years ago

I'm currently looking to migrate away from PEAR's System_Daemon and this looks awesome. We're using Composer (http://getcomposer.org/) for dependency management. Would you be open to adding a composer.json file (http://getcomposer.org/doc/02-libraries.md) to this project so it can be easily added to projects that would like to use it?

shaneharter commented 12 years ago

Sure. If you submit a pull request I'll merge it right in.

You should be able to gather what you need to know about dependencies by checking out the various check_environment() methods. They're a poorly named but concise source of dependency checking.

I'm not 100% ready to tag what's in Master as 2.0, but it is certainly feature-complete and well tested (though still worth noting that a large amount of code there -- the entire Workers api included -- is very new).

The reports I've gotten from a few beta testers (and that I can replicate myself pretty easily) is that workers that pass back and forth very large data sets have a real vulnerability to worker malloc()'s that are too small. In this case "very large data sets" means passing arguments to (and return values from) that are 2MB+. I've recently added a warning message if the library thinks your allocation is too small and improved the shared memory garbage collector to mitigate this, but it's still something that can be a problem and I want to make it clear in the wiki docs and I thought I'd mention it here.

Finally, speaking of docs: They are obviously still developing. More troubling they're a bit out-dated in a few cases (referencing the 1.x version fork() method instead of the new Task API for example).

Anyway, hope this long, long response is at least somewhat helpful!!

Shane

On Wed, Jun 6, 2012 at 7:26 PM, Eric Scrivner < reply@reply.github.com

wrote:

I'm currently looking to migrate away from PEAR's System_Daemon and this look awesome. We're using Composer (http://getcomposer.org/) for dependency management. Would you be open to adding a composer.json file ( http://getcomposer.org/doc/02-libraries.md) to this project so it can be easily added to projects using it?


Reply to this email directly or view it on GitHub: https://github.com/shaneharter/PHP-Daemon/issues/11

desarrolla2 commented 12 years ago

Hi, i send the package to packagist

http://packagist.org/packages/shaneharter/php-daemon

I appear as the maintainer of the package, and obviously I'm not.

I think that you must to send the package to packagist, and then connect it with GitHub Hooks for auto update.

If i can help you ... say me ...

shaneharter commented 12 years ago

Do you need to delete it first so I can add it under my account?

On Tue, Sep 4, 2012 at 7:30 AM, Daniel González notifications@github.comwrote:

Hi, i send the package to packagist

http://packagist.org/packages/shaneharter/php-daemon

I appear as the maintainer of the package, and obviously I'm not.

I think that you must to send the package to packagist, and then connect it with GitHub Hooks for auto update.

If i can help you ... say me ...

— Reply to this email directly or view it on GitHubhttps://github.com/shaneharter/PHP-Daemon/issues/11#issuecomment-8264893.

desarrolla2 commented 12 years ago

I have already delete it!

fbnfgc commented 11 years ago

You should add required dependency "ext-pcntl" to your composer.json file.

ex-nerd commented 11 years ago

what's the status of this? It looks like the package listed links to a fork of this project, not the actual one.

shaneharter commented 11 years ago

I honestly just haven't followed-up. I've been working on the next release in the feature_abstractipc branch.

Two comments in one day suggests some interest. It's a small task, I'll wrap it up soon and close out this issue.

On Tue, Jan 29, 2013 at 2:36 PM, Chris Petersen notifications@github.comwrote:

what's the status of this? It looks like the package listed links to a fork of this project, not the actual one.

— Reply to this email directly or view it on GitHubhttps://github.com/shaneharter/PHP-Daemon/issues/11#issuecomment-12862677.

ex-nerd commented 11 years ago

FWIW, you should be able to install directly from github by adding the following to your own composer.json:

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/shaneharter/PHP-Daemon"
        }
    ],
    "require": {
        "shaneharter/php-daemon": "dev-feature_abstract_ipc"
    }

(in this case, installing from the 2.1 pre-release branch)

iskandar commented 11 years ago

A forked repo is still referenced on packagist.org: https://packagist.org/packages/shaneharter/php-daemon

Here's a diff of the branch I got from packagist vs. master (no major differences, it appears): https://github.com/shaneharter/PHP-Daemon/compare/fc5bbc6627f5f72d28a820ef6df1c4e033a74dbd...master

@ex-nerd's workaround is great - but should be unnecessary.

burci commented 11 years ago

@desarrolla2 can you please edit https://packagist.org/packages/shaneharter/php-daemon and change repository from https://github.com/bmatschullat/PHP-Daemon to https://github.com/shaneharter/PHP-Daemon?

After then add @shaneharter as maintainer (@shaneharter should register to packagist first), I think this will solve the problem. (I did not find any way to delete a package.)

Finaly @shaneharter should setup the service hook. (@desarrolla2 you should turn off if you set it)

desarrolla2 commented 11 years ago

@burci i have`nt permissions for change https://packagist.org/packages/shaneharter/php-daemon, only @shaneharter can do it.

burci commented 11 years ago

Well my mistake, @bmatschullat can change as i see.

bmatschullat commented 11 years ago

@burci i doesn't have the right on the github project for create "github service hooks".

burci commented 11 years ago

@bmatschullat you should edit https://packagist.org/packages/shaneharter/php-daemon and change repository from https://github.com/bmatschullat/PHP-Daemon to https://github.com/shaneharter/PHP-Daemon after then add @shaneharter as maintainer.

bmatschullat commented 11 years ago

allready changed ;) ... but "shaneharter" is not the username. @shaneharter what is your username on packagist?

shaneharter commented 11 years ago

@bmatschullat @desarrolla2 @ex-nerd @burci

Hey Guys, I never followed-through with this partly because when I go to packagist I cannot submit this repo because it's already submitted.

What can I do to make this easier for everybody?

edit: I added the hooks here to github.

burci commented 11 years ago

Hi!

Register yourself to packagist with github account, and you will get admin rights for the package from @bmatschullat. 2013.09.27. 20:41, "Shane Harter" notifications@github.com ezt írta:

@bmatschullat https://github.com/bmatschullat @desarrolla2https://github.com/desarrolla2 @ex-nerd https://github.com/ex-nerd @burci https://github.com/burci

Hey Guys, I never followed-through with this partly because when I go to packagist I cannot submit this repo because it's already submitted.

What can I do to make this easier for everybody?

— Reply to this email directly or view it on GitHubhttps://github.com/shaneharter/PHP-Daemon/issues/11#issuecomment-25267317 .

shaneharter commented 11 years ago

Thanks for the tip @burci. I'm not an intensely active PHP engineer anymore -- spending most of my time writing Python & Go lately. Thanks for the help.

shaneharter commented 11 years ago

Actually, though, I went ahead and did that and I still am not seeing any admin access to the packagist entry for this repo. I'll try back in a little bit, in case they have some cron that reconciles this stuff, though I wouldn't bet on that..

burci commented 11 years ago

@bmatschullat now you can add @shaneharter as admin, i checked the user now and exists... (the only thing i do not know how to revoke it from my repo... :) )

shaneharter commented 11 years ago

@bmatschullat @burci It seems you guys added me as an admin/maintainer to another package? https://packagist.org/packages/netpositive/discriminatormap-bundle ?

bmatschullat commented 11 years ago

@shaneharter i added u as a maintainer at the php-daemon project@packagist. but the other project... @burci is that u're project??

shaneharter commented 11 years ago

I still don't have admin access to php-daemon on packagist. if you have a sec, take a look? Thanks man

On Wed, Oct 2, 2013 at 12:03 PM, Bennet Matschullat < notifications@github.com> wrote:

@shaneharter https://github.com/shaneharter i added u as a maintainer at the php-daemon project@packagist. but the other project... @burcihttps://github.com/burciis that u're project??

— Reply to this email directly or view it on GitHubhttps://github.com/shaneharter/PHP-Daemon/issues/11#issuecomment-25567094 .

bmatschullat commented 11 years ago

at a other project of me i 've got a "delete" button... but i miss him hat the daemon project :S ...

rbalik commented 9 years ago

What's the status of this? I'm trying to use this in my project but the version that composer pulls is outdated. It seems to still require a set_filename call among other things.

JaredBoone commented 9 years ago

There's no need to wait for someone to update packagist. You can configure composer to get php-daemon directly from github. Here's an example of composer.json you could use in your project to deploy the 2.0 release of php-daemon:

    {
      "repositories": [
        {
          "type": "vcs",
          "url": "https://github.com/shaneharter/php-daemon"
        }
      ],
      "require": {
        "shaneharter/php-daemon": "v2.0.0"
      }
    }
rbalik commented 9 years ago

Oh, that's really useful. Thanks.