Skip to content

Update dotenv.rst #10971

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

Closed
wants to merge 2 commits into from
Closed

Update dotenv.rst #10971

wants to merge 2 commits into from

Conversation

JackPotte
Copy link

By default it tries to install an incompatible version with SF 3.4:

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

  Problem 1
    - Conclusion: don't install symfony/symfony v3.4.22
    - Conclusion: remove symfony/symfony v3.4.21
...

By default it tries to install an incompatible version with SF 3.4.
@xabbuh xabbuh added this to the 3.4 milestone Feb 8, 2019
@xabbuh
Copy link
Member

xabbuh commented Feb 8, 2019

Can you show how your composer.json file looked like when you ran that command?

@JackPotte
Copy link
Author

It's my employer one so I can just reveal this:

    "require": {
        "php": "~7.2",
        "symfony/symfony": "~3.4",
...

@xabbuh
Copy link
Member

xabbuh commented Feb 8, 2019

Well, we could update the command to look like this:

composer require --dev symfony/dotenv:^3.4

But, I still wonder why you would want to do that in your case. The symfony/symfony package already includes the Dotenv component.

@JackPotte
Copy link
Author

JackPotte commented Feb 8, 2019

We are just migrating from SF2 to 3, and we've decided to install Dotenv in a second time.

Larger compatibility
@xabbuh
Copy link
Member

xabbuh commented Feb 8, 2019

Be careful with this though. The fact that you are able to do so is only because you are using an older version of Composer that had a bug which allowed it. Once you update to IIRC Composer 1.7.2 or higher you won't be able to install packages from the lock file you create with that anymore.

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xabbuh I disagree with this change. We can't do this just for one component. Also, I don't understand why we need this.

@xabbuh
Copy link
Member

xabbuh commented Feb 8, 2019

Without any version constraint Composer will try to install the version 4 of the Dotenv component. But yes we probably need to make that change in other places then too for consistency.

@OskarStark
Copy link
Contributor

But you pointed out that Symfony already included the dotenv component in a working version. If they want to update it, it’s a user land problem which should not be reflected in the docs

I share the opinion of Javier and I am against merging this change.

@xabbuh
Copy link
Member

xabbuh commented Feb 9, 2019

The whole installation command is only necessary if you do not have the symfony/symfony package installed. But for these cases we should have instructions that install package versions which are compatible with the version of the docs.

@JackPotte
Copy link
Author

JackPotte commented Feb 14, 2019

@javiereguiluz so let me rephrase the bug: anyone who has SF 3.4.21 and copies the SF 3.4 dotenv installation command from the current doc will get a blocking, misleading and anxiogenic error message: "remove symfony/symfony v3.4.21"!

It's general: it has nothing to see with a particular user environment.

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done throughout the whole docs at once to have “consistent” state

@OskarStark
Copy link
Contributor

@javiereguiluz shall the —dev option be on the end?

@javiereguiluz
Copy link
Member

If we're going to do this, we'll need to do it for all components, so we've created #12347 to replace this one.

@JackPotte thanks for reporting this issue and I'm sorry it took us so long to deal with this.

javiereguiluz added a commit that referenced this pull request Sep 23, 2019
…ents (javiereguiluz)

This PR was merged into the 3.4 branch.

Discussion
----------

Tweak the version constraints when installing 3.4 components

This continues the idea proposed in #10971.

@xabbuh could you please review if this is correct? (for example, I didn't add this to polyfill packages, is that correct to you?).

Also, if this is merged, could you please verify that we should revert these changes in the other branches (4.3, 4.4 and master)?

Thanks!

Commits
-------

cdc9e76 Tweak the version constraints when installing 3.4 components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants