Skip to content

Improve compatibility with Symfony 6.1 / PHP 8.1#131

Closed
mikilian wants to merge 1 commit intoportphp:masterfrom
mikilian:improve-compatibility-for-symfony-6.1-and-php-8.1
Closed

Improve compatibility with Symfony 6.1 / PHP 8.1#131
mikilian wants to merge 1 commit intoportphp:masterfrom
mikilian:improve-compatibility-for-symfony-6.1-and-php-8.1

Conversation

@mikilian
Copy link
Copy Markdown

@mikilian mikilian commented Aug 7, 2022

The latest version cannot be installed within a Symfony 6.1 project (with PHP 8.1). The following error message occurs:

composer require portphp/portphp
Using version ^1.7 for portphp/portphp
./composer.json has been updated
Running composer update portphp/portphp
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires portphp/portphp ^1.7 -> satisfiable by portphp/portphp[1.7.0].
    - portphp/portphp 1.7.0 requires psr/log ~1.0 -> found psr/log[1.0.0, ..., 1.1.4] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require portphp/portphp:*" to figure out if any version is installable, or "composer require portphp/portphp:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Bumping necessary packages does the job here! :)

@mikilian mikilian changed the title Bumped php, psr/log and symfony versions Improve compatibility with Symfony 6.1 / PHP 8.1 Aug 7, 2022
@slashrsm
Copy link
Copy Markdown
Contributor

slashrsm commented Aug 9, 2022

Latest release already supports both Symfony 6 and PHP 8 and I can confirm that I've been able to install Port with those. Have you tried using -W as the error message suggests?

@activeingredient
Copy link
Copy Markdown

activeingredient commented Aug 21, 2022

@slashrsm - this PR is needed to install into Symfony 6.1 (psr/log ^3.0)

@edsrzf
Copy link
Copy Markdown
Contributor

edsrzf commented Sep 21, 2022

I came here to make a similar pull request. But one thing I couldn't figure out was why the psr/log dependency is required at all. I don't see Psr\Log referenced anywhere within this repo. If I remove it, everything installs fine and tests still pass.

@slashrsm
Copy link
Copy Markdown
Contributor

slashrsm commented Oct 2, 2022

This is a great point. Can you check if #133 solves your problem while not breaking anything?

@edsrzf
Copy link
Copy Markdown
Contributor

edsrzf commented Oct 2, 2022

#133 looks great to me. 👍

@slashrsm
Copy link
Copy Markdown
Contributor

slashrsm commented Oct 3, 2022

#133 is merged and I tagged a new release.

@slashrsm slashrsm closed this Oct 3, 2022
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

Successfully merging this pull request may close these issues.

4 participants