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

Docker build for Prejournal fails #11

Open
michielbdejong opened this issue Feb 11, 2023 · 4 comments
Open

Docker build for Prejournal fails #11

michielbdejong opened this issue Feb 11, 2023 · 4 comments

Comments

@michielbdejong
Copy link
Contributor

mkdir test
cd test
git clone  https://github.com/ylebre/prejournal.git
cd prejournal
docker build .
Step 9/10 : RUN composer install
 ---> Running in 290ac668a930
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - phpspec/prophecy is locked to version v1.15.0 and an update of this package was not requested.
    - phpspec/prophecy v1.15.0 requires php ^7.2 || ~8.0, <8.2 -> your php version (8.2.2) does not satisfy that requirement.
  Problem 2
    - phpspec/prophecy v1.15.0 requires php ^7.2 || ~8.0, <8.2 -> your php version (8.2.2) does not satisfy that requirement.
    - phpunit/phpunit 9.5.21 requires phpspec/prophecy ^1.12.1 -> satisfiable by phpspec/prophecy[v1.15.0].
    - phpunit/phpunit is locked to version 9.5.21 and an update of this package was not requested.

The command '/bin/sh -c composer install' returned a non-zero code: 2

It seems the locked version of phpspec/prophecy v1.15.0 is not compatible with PHP 8.2

@michielbdejong
Copy link
Contributor Author

Trying:

rm composer.lock

@michielbdejong
Copy link
Contributor Author

Next problem: php-http/discovery contains a Composer plugin which is blocked by your allo w-plugins config.
Trying:

composer config --no-plugins allow-plugins.php-http/discovery 

@michielbdejong
Copy link
Contributor Author

That command didn't work, but adding this does:

itpod /workspace/federated-timesheets-tests/test/prejournal (main) $ git diff
diff --git a/composer.json b/composer.json
index 1ea6d3e5..f50e3137 100644
--- a/composer.json
+++ b/composer.json
@@ -30,6 +30,11 @@
     "require-dev": {
         "phpunit/phpunit": "^9"
     },
+    "config": {
+       "allow-plugins": {
+                  "php-http/discovery": true
+       }
+    },
     "scripts": {
         "lint": "./vendor/bin/php-cs-fixer fix .",
         "test": "PRE[...]

@michielbdejong
Copy link
Contributor Author

I'll create a PR for this

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

No branches or pull requests

1 participant