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

Gregwar/* packages point at a development branch #3289

Closed
jackthomasatl opened this issue Mar 24, 2021 · 20 comments
Closed

Gregwar/* packages point at a development branch #3289

jackthomasatl opened this issue Mar 24, 2021 · 20 comments
Assignees

Comments

@jackthomasatl
Copy link
Contributor

gregwar/cache: dev-php8
gregwar/image: dev-php8

Gregwar/* dev-php8 branches have been merged, Downloading grav via packagist has been broken since Feb 17.

@jackthomasatl
Copy link
Contributor Author

@rhukster

@jackthomasatl
Copy link
Contributor Author

@mahagr

@mahagr
Copy link
Member

mahagr commented Mar 26, 2021

@jackthomasatl Thank you!

@mahagr mahagr self-assigned this Mar 26, 2021
@mahagr
Copy link
Member

mahagr commented Mar 26, 2021

@jackthomasatl Unfortunately that is not true.

https://github.com/Gregwar/Cache/tags hasn't been released with PHP 8 fix, which breaks the Image component with Grav.

So no, we cannot go back using the official release just yet.

I recommend keeping a lot of noise in Gregwar/Cache#33

@mahagr mahagr added the wontfix label Mar 26, 2021
@jackthomasatl
Copy link
Contributor Author

That branch does not exist on gregwar

@jackthomasatl
Copy link
Contributor Author

Composer is broken past grav 1.7-RC17

@mahagr
Copy link
Member

mahagr commented Mar 30, 2021

I have no idea how you say that composer is broken. I just ran:

composer create-project getgrav/grav

And it works just fine.

@jackthomasatl
Copy link
Contributor Author

If you run composer update on that same project, It breaks. The reason create-project / install works is that your composer.lock is pointed at specific commits on gregwar, When you run composer update it tries to pull the branch php8 on gregwar, Which does not exist.

We're using grav as a dependency, not as the base project.

@jackthomasatl
Copy link
Contributor Author

@mahagr

@mahagr
Copy link
Member

mahagr commented Apr 1, 2021

No, it doesn't. I just ran composer update. If you look at the composer.json it defines which repository to use.

@jackthomasatl
Copy link
Contributor Author

If you put the following composer.json in a directory

{
    "require": {
        "composer/composer": "^1.10",
        "composer/ca-bundle": "^1.0",
        "getgrav/grav": "~1.7",
        "oomphinc/composer-installers-extender": "^2.0"
    },
    "extra": {
        "installer-types": [
            "project"
        ]
    }
}

then run composer update

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - getgrav/grav[1.7.0, 1.7.1, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9] require gregwar/image dev-php8 -> found gregwar/image[dev-master, dev-adapter, 1.0.0, 1.0.1, v1.0.2, v1.0.3, v1.0.4, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.26, v2.0.27, v2.0.28, v2.1.0] but it does not match the constraint.
    - Root composer.json requires getgrav/grav ~1.7 -> satisfiable by getgrav/grav[1.7.0, 1.7.1, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9].

@jackthomasatl
Copy link
Contributor Author

What's going on here, is that under getgrav/grav you have repositories specified in composer.json

"repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator"
        },
        {
            "type": "vcs",
            "url": "https://github.com/getgrav/Cache"
        },
        {
            "type": "vcs",
            "url": "https://github.com/getgrav/Image"
        }
    ],

This only works for the root of the project, any other project using grav as a dependency is broken. You're pointing at a branch on gregwar/image and gregwar/cache that DOES NOT EXIST.

@mahagr
Copy link
Member

mahagr commented Apr 1, 2021

You need to add those. Basically it's the only way to get Grav to work in PHP8.

@jackthomasatl
Copy link
Contributor Author

I'm behind a corporate network with firewalls and what not, where we don't have direct internet access. That sort of thing won't work. Our access to packagist is via artifactory cache server.

The solution I'm using is to point dev-php8 back to the latest version of those libraries.

{
    "require": {
        "composer/composer": "^1.10",
        "composer/ca-bundle": "^1.0",
        "gregwar/image": "2.1.0 as dev-php8",
        "gregwar/cache": "1.0.12 as dev-php8",
        "getgrav/grav": "~1.7",
        "oomphinc/composer-installers-extender": "^2.0"
    },
    "extra": {
        "installer-types": [
            "project"
        ]
    }
}

I think going outside of packagist is hacky. If you're going to fork gregwar, do it properly and publish getgrav/image to packagist and just fork the library until its in a state where its usable again.

@mchljams
Copy link

mchljams commented Apr 1, 2021

I have the same exact problem being behind a corporate firewall. It would solve the problem if the libraries listed in the repositories went through Packagist as @jackthomasatl has suggested.

@jackthomasatl
Copy link
Contributor Author

Can you guys please fix this? Your package is broken if downloaded via normal php channels. Adding in your out of band repository is not an acceptable solution.

If you want to fork the library, that's fine. But go all the way and fork it. The half way, out of band solution does not work.

Please fix this.

@rhukster
Copy link
Member

rhukster commented Apr 6, 2021

We're not interested in forking this package, we just need to use our temporary version with our fixes until the official package maintainer releases a version with the appropriate fixes. We are doing this the 'proper' composer way by referencing our own repo. It 100% works with composer. For example:

➜ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 3 updates, 0 removals
  - Upgrading codeception/codeception (4.1.19 => 4.1.20)
  - Upgrading codeception/lib-innerbrowser (1.4.1 => 1.4.2)
  - Upgrading phpstan/phpstan (0.12.82 => 0.12.83)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 3 updates, 0 removals
  - Downloading codeception/codeception (4.1.20)
  - Downloading codeception/lib-innerbrowser (1.4.2)
  - Downloading phpstan/phpstan (0.12.83)
  - Upgrading codeception/codeception (4.1.19 => 4.1.20): Extracting archive
  - Upgrading codeception/lib-innerbrowser (1.4.1 => 1.4.2): Extracting archive
  - Upgrading phpstan/phpstan (0.12.82 => 0.12.83): Extracting archive
Generating autoload files
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

So update works fine. composer install also works fine.

@rhukster
Copy link
Member

rhukster commented Apr 6, 2021

for good measure i deleted the entire vendor folder and did a fresh update:

➜ composer update
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Package operations: 102 installs, 0 updates, 0 removals
  - Syncing gregwar/cache (dev-php8 49ccdf9) into cache
  - Syncing gregwar/image (dev-php8 ea23859) into cache
  - Syncing victorjonsson/markdowndocs (dev-master c9fa153) into cache
  - Installing antoligy/dom-string-iterators (v1.0.1): Extracting archive
  - Installing behat/gherkin (v4.8.0): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (2.3.1): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/recursion-context (4.0.4): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.2): Extracting archive
  - Installing sebastian/exporter (4.0.3): Extracting archive
  - Installing sebastian/environment (5.1.3): Extracting archive
  - Installing sebastian/diff (4.0.4): Extracting archive
  - Installing sebastian/comparator (4.0.6): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.5): Extracting archive
  - Installing theseer/tokenizer (1.2.0): Extracting archive
  - Installing nikic/php-parser (v4.10.4): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.6): Extracting archive
  - Installing symfony/polyfill-ctype (v1.22.1): Extracting archive
  - Installing webmozart/assert (1.10.0): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing phpdocumentor/type-resolver (1.4.0): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.2.2): Extracting archive
  - Installing doctrine/instantiator (1.4.0): Extracting archive
  - Installing phpspec/prophecy (1.13.0): Extracting archive
  - Installing phar-io/version (3.1.0): Extracting archive
  - Installing phar-io/manifest (2.0.1): Extracting archive
  - Installing myclabs/deep-copy (1.10.2): Extracting archive
  - Installing phpunit/phpunit (9.5.4): Extracting archive
  - Installing codeception/phpunit-wrapper (9.0.6): Extracting archive
  - Installing codeception/lib-asserts (1.13.2): Extracting archive
  - Installing symfony/yaml (v4.4.21): Extracting archive
  - Installing symfony/finder (v5.2.4): Extracting archive
  - Installing psr/container (1.0.0): Extracting archive
  - Installing psr/cache (1.0.1): Extracting archive
  - Installing symfony/contracts (v1.1.10): Extracting archive
  - Installing symfony/event-dispatcher (v4.4.20): Extracting archive
  - Installing symfony/css-selector (v5.2.4): Extracting archive
  - Installing symfony/polyfill-php80 (v1.22.1): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.22.1): Extracting archive
  - Installing symfony/console (v4.4.21): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-message (1.0.1): Extracting archive
  - Installing guzzlehttp/psr7 (1.8.1): Extracting archive
  - Installing codeception/stub (3.7.0): Extracting archive
  - Installing codeception/codeception (4.1.20): Extracting archive
  - Installing codeception/module-asserts (1.3.1): Extracting archive
  - Installing psr/http-client (1.0.1): Extracting archive
  - Installing guzzlehttp/promises (1.4.1): Extracting archive
  - Installing guzzlehttp/guzzle (7.3.0): Extracting archive
  - Installing symfony/dom-crawler (v5.2.4): Extracting archive
  - Installing symfony/browser-kit (v5.2.4): Extracting archive
  - Installing codeception/lib-innerbrowser (1.4.2): Extracting archive
  - Installing codeception/module-phpbrowser (1.0.2): Extracting archive
  - Installing composer/ca-bundle (1.2.9): Extracting archive
  - Installing composer/semver (1.7.2): Extracting archive
  - Installing doctrine/cache (1.10.2): Extracting archive
  - Installing doctrine/collections (1.6.7): Extracting archive
  - Installing donatj/phpuseragentparser (v1.4.0): Extracting archive
  - Installing dragonmantank/cron-expression (v1.2.1): Extracting archive
  - Installing enshrined/svg-sanitize (0.14.0): Extracting archive
  - Installing erusev/parsedown (1.7.4): Extracting archive
  - Installing erusev/parsedown-extra (0.8.1): Extracting archive
  - Installing psr/log (1.1.3): Extracting archive
  - Installing filp/whoops (2.12.0): Extracting archive
  - Installing gregwar/cache (dev-php8 49ccdf9): Cloning 49ccdf9ae7 from cache
  - Installing gregwar/image (dev-php8 ea23859): Cloning ea23859700 from cache
  - Installing itsgoingd/clockwork (v5.0.7): Extracting archive
  - Installing seld/cli-prompt (1.0.4): Extracting archive
  - Installing league/climate (3.7.0): Extracting archive
  - Installing matthiasmullie/path-converter (1.1.3): Extracting archive
  - Installing matthiasmullie/minify (1.3.66): Extracting archive
  - Installing symfony/var-dumper (v4.4.21): Extracting archive
  - Installing maximebf/debugbar (v1.16.5): Extracting archive
  - Installing miljar/php-exif (v0.6.5): Extracting archive
  - Installing monolog/monolog (1.26.0): Extracting archive
  - Installing psr/http-factory (1.0.1): Extracting archive
  - Installing php-http/message-factory (v1.0.2): Extracting archive
  - Installing nyholm/psr7 (1.4.0): Extracting archive
  - Installing nyholm/psr7-server (1.0.1): Extracting archive
  - Installing twig/twig (v1.44.2): Extracting archive
  - Installing phive/twig-extensions-deferred (v1.0.2): Extracting archive
  - Installing phpstan/phpstan (0.12.83): Extracting archive
  - Installing phpstan/phpstan-deprecation-rules (0.12.6): Extracting archive
  - Installing psr/http-server-handler (1.0.1): Extracting archive
  - Installing psr/http-server-middleware (1.0.1): Extracting archive
  - Installing psr/simple-cache (1.0.1): Extracting archive
  - Installing pimple/pimple (v3.3.1): Extracting archive
  - Installing rockettheme/toolbox (1.5.7): Extracting archive
  - Installing symfony/http-client (v4.4.21): Extracting archive
  - Installing symfony/polyfill-iconv (v1.22.1): Extracting archive
  - Installing symfony/polyfill-php74 (v1.22.1): Extracting archive
  - Installing symfony/process (v4.4.20): Extracting archive
  - Installing victorjonsson/markdowndocs (dev-master c9fa153): Cloning c9fa153b28 from cache
  - Installing willdurand/negotiation (3.0.0): Extracting archive
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

If this didn't work our build process would fail. That is used to build Grav on github itself.

@w00fz w00fz assigned w00fz and unassigned mahagr Apr 6, 2021
@w00fz w00fz reopened this Apr 6, 2021
@w00fz
Copy link
Member

w00fz commented Apr 6, 2021

Alright people, I hear what you are saying and I get your point. I will work on making the packages available through the official channel until origin satisfies our needs at which point we'll switch back. This will be under the getgrav official roof and it should resolve the issues of being behind firewall or highly strict environments.

Cheers.

@w00fz w00fz closed this as completed in b9fb284 Apr 20, 2021
@w00fz
Copy link
Member

w00fz commented Apr 20, 2021

This is now sorted and next version will no longer use any VCS.

I did not really appreciate multiple comments in the span of few minutes just to ping the team directly. Be cool and do it once in the main description. Also don't have colleagues piling up echoing the same issue, it's not going to change our perspective of how minor this issue was.

Of course you got what you wanted and at the end of the day, we all just want the project to be better and cover all environments, including your very specific one.

Please next time you open up an issue, be more respectful of this project, and us.

Cheers,

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

No branches or pull requests

5 participants