Closed rask closed 8 years ago
You should run composer require your/managed-package
after step 4.
I agree, this needs to be documented better.
I see. I thought Studio somehow sidesteps the require blocks there.
So if I require my/package
which is available as a local Studio package and as a remote Git repository, Studio will take preference over the remote one?
Thanks for the clarification, I'll see what happens. :)
That's the idea, yes. There are some situations currently where this does not work that way (see #58), but in general that's the concept.
I'm really struggling to get this to work.
I have a package already in a repo.
I run studio create organisation/repo --git https://www.github.com/organisation/repo
Then I run composer require organisation/repo
and I keep getting a composer error saying organisation/repo
can't be found.
Can't for the life of me figure out what I'm doing wrong.
Help please :)
My bad, had an incorrect field in my composer.json
😒
Yeah...this is clear as mud.
I've just ran
studio load "/home/mpenner/Projects/polymig"
[OK] Packages matching the path /home/mpenner/Projects/polymig will now be loaded by Composer.
But what exactly did that do? Is it supposed to alter my composer.json and add one of those "path" repositories? Because it didn't.
And if that is all it does, what's the benefit of that? Those "path" repos actually don't work well at all in practice; you have to remove them before pushing.
Oh I see...it created studio.json
and now when I run update company/polymig
it symlinks it without mucking up my composer.json
. That is handy. Thank you.
Maybe that [OK]
message can be amended slightly to say that you need to run composer update xxx/yyy
.
@mnpenner Yeah, the read me could do with a simple step-by-step to get a package working. Took me a while of trial and error
Hi folks, thanks for your input!
I finally took the time, merged @rask's suggestions and expanded on them - please check out the new "Workflow" section of the README and let me know what you think!
The documentation is a bit vague in my opinion. Is the following the correct approach to creating a new package using
studio
?studio create <asdf>
.studio load <asdf>
.studio.json
is created containing something likeThis should load the WIP package living in
<asdf>
to the Composer-powered project, am I correct?When I run
composer update
nothing is installed andNothing to install or update
comes up in my terminal.How I understand it should go:
studio create ...
studio load ...
composer update
studio create
should appear tovendor
or similar, either as a link/copy or as a line in the autoloader.Currently nothing happens which resembles number 4 on that list.
I tried to create a package for a Wordpress plugin (
"type": "wordpress-plugin"
) and a regular library package too, but both do not work for me. I'm running latest Composer and my environment is Ubuntu 14.04.