Open drzraf opened 5 years ago
Hi Raphaël,
Quite a lot of stuff for Gitlab, great work!
Quick review:
Composer\Util\RemoteFilesystem
class for downloading stuff, it would remove that hard dependency to curl. I would also use Composer\Util\Filesystem
for file handling.json_*()
functions, then, the line "ext-json": "*"
must be added in composer.json
, same goes with "ext-zip" and "ext-curl" (if we really need curl)dist
with the proper URL and let composer download and extract the artifact automatically.What still lack:
./static
for example) and one question: Should we allow to extract artifacts *outside* package directory?
POST_PACKAGE_
events if package actually contains a .gitlab-ci.yml
(artifacts can't exist without it, but I'm not sure because the name of this file can be changed by project owner). [Some heuristic could even be created to extract a suitable job
/ stage
from parsing the yaml.job
, ref
(stage
, tag
) is not foundexpire
after a defined time)composer 2.x
release allows us to, we are stuck using a custom downloader (https://github.com/composer/composer/issues/7929)I mocked Gitlab
class where needed and added the ability to run a mock instead of the real class.
I tried to improve some bits from the unique test I created but can't understand why project is not installed when running through phpunit, to begin with.
It probably has something to do with events dispatched by the TestApplication
that could differ from a real run of composer install
? Any idea?
I will carefully review this next week, first Fosdem this week, then on Monday evening, I'll give it a shot.
Hi @drupol. A friendly reminder that I'd be glad to see this in :)
Haven't forgot you mate :)
Hi Rafael,
I'm setting up a new project based on this one, it will by default includes the plugins.
I suggest you to close this PR for now.
Hi @drupol , you probably have your reasons but it's surprising.
(@ademarco / @dxvargas ?)
Hi @drupol , you probably have your reasons but it's surprising.
No it's no, I'd like to push this forward, but I have no time dedicated to this project at the Commission, so I'm doing the fork in my free time.
* Could you maintain an identical, or at least similar, (copyleft) licensing (eg: GPL)?
Yes.
* Is this a fork while this repository is "maintained" on its own?
Yes, this repo will still be maintained by the European Commission.
* Or is this repository going to be archived?
I don't know what will happen. I don't think it's gonna be archived, it's created and used by the EC, so, there is no reason for that.
* If you're not part of _OpenEuropa_ yourself while the organization is not maintaining actively the project, why not just move it so avoid (confusing) bicephal situation.
The OpenEuropa project created this project and uses it every day, so, there is no reason to move it, it's working well and it does the job :-)
* At least clarifying the reason of the fork (technical, licensing, political, personal) would be a nice clarification (for me, but maybe also for future contributors)
The issue about the provider is open since a couple of months now, and there is nobody to dedicate time in this project anymore.
On my side and as an OpenSource lover, I'm willing to push this forward, this is why the fork.
I don't think that the PR you did some times ago will ever be included in this project because the European Commission doesn't use Gitlab.
Makes perfect sense. As long as the fork goes for a GPL-compatible copyleft license (as the initial codebase) I'm happy to join you there. In term of technical vision, do you confirm that one composer plugin supporting several "artifact providers" is more adequate than one composer plugin per provider?
Yes, this is why the fork make sense it's technically full of sense.
@brummbar : If I rebase the PR, would you merge it?
OPENEUROPA-XXX
Description
Introduced a GitLab provider.
Change log
Notes
Composer->io
, commented herePRE vs POST artifacts (#14 )
PRE_PACKAGE_*
events means that artifacts tarball represent everything needed.POST_PACKAGE_*
events means that artifacts tarball complement the regular tarball (distUrl
) and as such, the artifacts tarball must be extracted by the Provider on top of thedistUrl
tarball (possibly overriding files originating from the regulardistUrl
tarball)Ideally, when a user only bind the GitLab provider on
PRE_PACKAGE_*
events, we could consider simply changing$this->package->setDistUrl()
as Github provider does. But the issue lays in passing the GitLab API authentication token (HTTP header) needed to fetch private artifacts which AFAIK is something Composer downloader does not support.