Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems after satis update #377

Closed
sokolnikov911 opened this issue Dec 6, 2016 · 14 comments
Closed

Problems after satis update #377

sokolnikov911 opened this issue Dec 6, 2016 · 14 comments
Labels

Comments

@sokolnikov911
Copy link
Contributor

Few days ago I had a problem. Satis starts to synchronize packages which I don't need.

How to reproduce:

If I install fresh satis version and build with my config it works fine.
But if I'm trying to update satis like:

cd satis
composer update

And after that I'm trying to build repository with my config, like:

php satis/bin/satis -n -vv build config.json .

Even if I use almost clear config, like that:

{
    "name":        "Sample packagist",
    "homepage":    "https://pkg.sample.org",
    "repositories":[
    ],
    "require-all": true,
    "require-dependencies": false,
    "require-dev-dependencies": false
}

It starts synchronize packages which I don't need:

petka@petka-laptop:/www/satis_test$ php satis/bin/satis -n -vv build config.json .
Scanning packages
Selected 0s1r1s/dev-shortcuts-bundle (dev-master)
Selected 11ya/excelbundle (dev-excel-forks)
Selected 11ya/excelbundle (dev-master)
Selected 11ya/excelbundle (v0.0.8)
Selected 11ya/excelbundle (v1.0.0)
Selected 11ya/excelbundle (v1.0.2)
Selected 11ya/excelbundle (v1.0.4)
Selected 11ya/excelbundle (v2.0)
Selected 1stvamp/phpweekly.info (dev-gh-pages)
Selected 2085020/zendframework1 (1.12.0)
Selected 2085020/zendframework1 (1.12.1)
......

It has been tested on PHP 5.6 and 7,
on ubuntu 16.04, 16.10, 12.04,
with composer 1.2.1, 1.2.3.

@alcohol
Copy link
Member

alcohol commented Dec 6, 2016

Since you specified no repositories and have set require-all to true, it will try to mirror packagist.org for you :-)

@sokolnikov911
Copy link
Contributor Author

No, it was for example without repositories. Even if I try to build for example one repository, like:

{
    "name":        "Sample packagist",
    "homepage":    "https://pkg.sample.org",
    "repositories":[
        {
            "type":   "package",
            "package":{
                "name":   "amsul/pickadate.js",
                "version":"3.2.2",
                "source": {
                    "url":      "https://github.com/amsul/pickadate.js",
                    "type":     "git",
                    "reference":"3.2.2"
                },
                "dist":   {
                    "url": "https://github.com/amsul/pickadate.js/archive/3.2.2.zip",
                    "type":"zip"
                }
            }
        }
    ],
    "require-all": true,
    "require-dependencies": false,
    "require-dev-dependencies": false
}

It starts to synchronize some stuff which I don't need after synchronizing package which I need:

petka@petka-laptop:/www/satis_test$ php satis/bin/satis -n -vv build config.json .
Scanning packages
Selected amsul/pickadate.js (3.2.2)
Selected 0s1r1s/dev-shortcuts-bundle (dev-master)
Selected 11ya/excelbundle (dev-excel-forks)
Selected 11ya/excelbundle (dev-master)
Selected 11ya/excelbundle (v0.0.8)
Selected 11ya/excelbundle (v1.0.0)
Selected 11ya/excelbundle (v1.0.2)
......

But if I didn't update satis, it synchronizes only which I need.

@alcohol
Copy link
Member

alcohol commented Dec 6, 2016

I am sorry, but by default packagist is included, and if you specify require-all then it will read all packages from packagist too.

I am not sure why it does not include it for you on older versions. What you are seeing now is expected behaviour. If you do not want to mirror packagist, then you should explicitly disable the packagist repository.

Can you please share which version you were running before the composer update ?

@alcohol alcohol added the support label Dec 6, 2016
@stof
Copy link
Contributor

stof commented Dec 6, 2016

@alcohol are you sure ? Satis used to disable Packagist by default (precisely to avoid mirroring it entirely)

@sokolnikov911
Copy link
Contributor Author

sokolnikov911 commented Dec 6, 2016

I am sorry, but by default packagist is included.

But I use satis about two years, and update it each time when deploy something. And just one week ago I had this problem.

@sokolnikov911
Copy link
Contributor Author

sokolnikov911 commented Dec 6, 2016

Can you please share which version you were running before the composer update ?

It was actual version of satis. Which freshly installed like:
composer create-project composer/satis:dev-master --keep-vcs

@alcohol
Copy link
Member

alcohol commented Dec 6, 2016

@stof it has not for me for quite a while. Not sure why.. need to investigate now.

Doh I was using packagist as my repository for my debugging stuff. Let me switch to a simpler debug satis.json for this particular scenario.

@alcohol
Copy link
Member

alcohol commented Dec 6, 2016

So yeah, using latest composer it does seem to include packagist.org again by default.

@babwar
Copy link

babwar commented Dec 6, 2016

Hello , i've found the trouble :

on Composer\Satis\Console\Command\BuildCommand line 161 :

unset(Config::$defaultRepositories['packagist']);

now its : unset(Config::$defaultRepositories['packagist.org']);

This was the trouble i 've too

@alcohol
Copy link
Member

alcohol commented Dec 6, 2016

Yeah I found that too. Unfortunately it is not really possible to make this change backwards compatible.

@stof
Copy link
Contributor

stof commented Dec 6, 2016

@alcohol it is: #378

@alcohol
Copy link
Member

alcohol commented Dec 6, 2016

@babwar should be solved now if you pull the latest version of satis.
@sokolnikov911 can you check too?

@babwar
Copy link

babwar commented Dec 6, 2016

Thanks a lot. It's working just fine.

@alcohol alcohol closed this as completed Dec 6, 2016
@sokolnikov911
Copy link
Contributor Author

Thank you guys, it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants