Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

remove pre-configured platform PHP version #236

Merged
merged 1 commit into from
Apr 1, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jan 30, 2016

This resolves #234.

@wouterj
Copy link
Member

wouterj commented Jan 30, 2016

👍

unset($contents['config']['platform']);
}

if (empty($contents['config'])) {

Choose a reason for hiding this comment

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

What about to make it nested to the previous if statement? The $contents['config'] could be empty only when we unset $contents['config']['platform'], otherwise it probably has at least one item.

            if (empty($contents['config']['platform'])) {
                unset($contents['config']['platform']);

                if (empty($contents['config'])) {
                    unset($contents['config']);
                }
            }

We should use cascade checks here, I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to avoid nesting control structures too deeply.

Choose a reason for hiding this comment

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

What purpose to do it? Only to reduce complexity?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but I am happy to change it if others feel uncomfortable too with how it is right now.

Choose a reason for hiding this comment

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

OK, let's wait for others a bit, but I think I'm fine to keep it as is

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this does not complexify the behavior, it just simplifies the outputted JSON

@xabbuh
Copy link
Member Author

xabbuh commented Feb 5, 2016

ping @symfony/deciders

This seems to cause issues for people not familiar with the platform config in Composer (see composer/composer#4319 (comment)).

@Tobion
Copy link

Tobion commented Feb 5, 2016

Does this result in a warning that "composer.json is not in sync with lock file"? Or is this config option not considered for this sync check by composer?

@xabbuh
Copy link
Member Author

xabbuh commented Feb 5, 2016

The lock file is synchronised after the composer.json file has been changed: https://github.com/xabbuh/symfony-installer/blob/issue-234/src/Symfony/Installer/NewCommand.php#L371

@Tobion
Copy link

Tobion commented Feb 5, 2016

LGTM 👍

@Pierstoval
Copy link
Contributor

👍

@Seldaek
Copy link
Member

Seldaek commented Feb 5, 2016

Just FYI composer/composer#4881 should solve the confusion side.. I'd argue having platform config is a good thing but obviously if people don't take care of setting it correctly it's a bad idea, so maybe not having one by default is better.

@stof
Copy link
Member

stof commented Feb 5, 2016

@Seldaek but having it set to 5.3 in new Symfony 2.8 projects is not a good idea. symfony standard-edition needs this value because of its min supported version, but I hope new projects actually target higher PHP runtimes when deploying.
So keeping the Symfony setting is not a good idea. People needing this setting would need to configure it according to their need anyway. and relying on the current runtime is a better behavior for people not aware of this composer feature.

So 👍 for this change

@xabbuh
Copy link
Member Author

xabbuh commented Feb 9, 2016

@javiereguiluz What do you think?

@Pierstoval
Copy link
Contributor

I think it can be merged now and released for newcomers to avoid this issue 👍

@dunglas
Copy link
Member

dunglas commented Feb 10, 2016

👍

@javiereguiluz
Copy link
Member

@xabbuh I'm sorry it took me so long to merge your contribution. It's merged now.

@javiereguiluz javiereguiluz merged commit be7d2dd into symfony:master Apr 1, 2016
javiereguiluz added a commit that referenced this pull request Apr 1, 2016
This PR was merged into the 1.0-dev branch.

Discussion
----------

remove pre-configured platform PHP version

This resolves #234.

Commits
-------

be7d2dd remove pre-configured platform PHP version
@xabbuh xabbuh deleted the issue-234 branch April 1, 2016 15:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove pre-configured platform PHP version
9 participants