{"action":"created","issue":{"url":"https://api.github.com/repos/bobthecow/psysh/issues/146","repository_url":"https://api.github.com/repos/bobthecow/psysh","labels_url":"https://api.github.com/repos/bobthecow/psysh/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/bobthecow/psysh/issues/146/comments","events_url":"https://api.github.com/repos/bobthecow/psysh/issues/146/events","html_url":"https://github.com/bobthecow/psysh/issues/146","id":56223189,"node_id":"MDU6SXNzdWU1NjIyMzE4OQ==","number":146,"title":"Load dynamically a composer dependency","user":{"login":"Taluu","id":239685,"node_id":"MDQ6VXNlcjIzOTY4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/239685?v=4","gravatar_id":"","url":"https://api.github.com/users/Taluu","html_url":"https://github.com/Taluu","followers_url":"https://api.github.com/users/Taluu/followers","following_url":"https://api.github.com/users/Taluu/following{/other_user}","gists_url":"https://api.github.com/users/Taluu/gists{/gist_id}","starred_url":"https://api.github.com/users/Taluu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Taluu/subscriptions","organizations_url":"https://api.github.com/users/Taluu/orgs","repos_url":"https://api.github.com/users/Taluu/repos","events_url":"https://api.github.com/users/Taluu/events{/privacy}","received_events_url":"https://api.github.com/users/Taluu/received_events","type":"User","site_admin":false},"labels":[{"id":6358328,"node_id":"MDU6TGFiZWw2MzU4MzI4","url":"https://api.github.com/repos/bobthecow/psysh/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2015-02-02T11:08:39Z","updated_at":"2018-06-16T14:34:07Z","closed_at":null,"author_association":"NONE","body":"Hi,\n\nI was wondering if psysh could load on demand (and only for the current session) a composer dependency. For example (my last and freshest use case), I need to play around with Symfony's PropertyAccess component to make some tests. \n\nRather than setting up a blank project with this requirement (and go back to good old `php -r` or a test script), it would be a killer feature to have a command like `import package/name`, and be able to play around with whatever was imported, limited to the current session : once the session is killed, the dependency would also be killed (maybe work on a /tmp directory ?)\n\nI know this is huge though...\n"},"comment":{"url":"https://api.github.com/repos/bobthecow/psysh/issues/comments/397816312","html_url":"https://github.com/bobthecow/psysh/issues/146#issuecomment-397816312","issue_url":"https://api.github.com/repos/bobthecow/psysh/issues/146","id":397816312,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzgxNjMxMg==","user":{"login":"castarco","id":251364,"node_id":"MDQ6VXNlcjI1MTM2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/251364?v=4","gravatar_id":"","url":"https://api.github.com/users/castarco","html_url":"https://github.com/castarco","followers_url":"https://api.github.com/users/castarco/followers","following_url":"https://api.github.com/users/castarco/following{/other_user}","gists_url":"https://api.github.com/users/castarco/gists{/gist_id}","starred_url":"https://api.github.com/users/castarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/castarco/subscriptions","organizations_url":"https://api.github.com/users/castarco/orgs","repos_url":"https://api.github.com/users/castarco/repos","events_url":"https://api.github.com/users/castarco/events{/privacy}","received_events_url":"https://api.github.com/users/castarco/received_events","type":"User","site_admin":false},"created_at":"2018-06-16T14:34:07Z","updated_at":"2018-06-16T14:34:07Z","author_association":"CONTRIBUTOR","body":"@Taluu I was working on this problem on a related project ( https://github.com/Litipk/Jupyter-PHP ) , I didn't push my code to the remote repository because it was completely experimental (and because my laptop was stolen with a ton of work :( ), but I can tell that I experimented two major problems:\r\n\r\n  1. Composer is not modular at all, it's very difficult to use its code (in a clean way) for non-CLI\r\n      applications. It seems that they love super-tight coupling. I did it, but I'm not proud of the results...\r\n  2. The auto-generated class used from Composer to handler the autoloading process works as a\r\n      damn singleton, and this makes reusing Composer's autoloading code super-crazy.\r\n\r\nI know that the context should be provided before, but I'll provide the context now: I was interested on dealing with composer dependencies through Jupyter-PHP commands to make easier creating super-portable PHP \"notebooks\" (we have a single file per notebook, so we need alternative ways to declare dependencies)."}}
{"actor":{"display_login":"castarco"}}