Skip to content

Assume php7 #8257

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

Assume php7 #8257

wants to merge 2 commits into from

Conversation

greg0ire
Copy link
Contributor

@greg0ire greg0ire commented Aug 4, 2017

I'm picking the 3.3 branch because it is the branch people starting new projects are going to pick. People reading older docs are less likely to already be using php7, but I can rebase on any branch if you think this is a bit early or late.

We are not going to maintain documentation for all possible versions of
php.
I have no numbers to back that up, but I think it is easy and worth it
upgrading to 7.1 even if 7.0 is the default for your system, especially
in the docker era.
@HeahDude
Copy link
Contributor

HeahDude commented Aug 5, 2017

I'm fine with targeting 3.3 since at the time of its release PHP 5 was not maintained anymore.

@xabbuh
Copy link
Member

xabbuh commented Aug 9, 2017

I am not convinced that we should handle the 2.x branches differently. IMO we could safely merge this into the 2.7 branch.

@greg0ire
Copy link
Contributor Author

greg0ire commented Aug 9, 2017

WDYT @javiereguiluz @Simperfit @HeahDude ? Maybe merge this into 2.7 will mean less differences and thus, less maintenance?

@xabbuh
Copy link
Member

xabbuh commented Aug 29, 2017

@javiereguiluz
Copy link
Member

The real problem I see with this proposal is that the move from PHP 5 to 7 or vice versa is not automatic. Sometimes php5 turns into php7 (e.g. Action php5-fcgi /php5-fcgi -> Action php7-fcgi /php7-fcgi) and sometimes php5 turns into php7.1 (e.g. listen = /var/run/php5-fpm.sock -> listen = /var/run/php7.1-fpm.sock).

If the changes were consistent (php5 -> php7 or php7 -> php5) then I wouldn't see any issue making this change. For now, I have some concerns.

@greg0ire
Copy link
Contributor Author

To be more clear about the "sometimes" part, I think it boils down to how apache and php-fpm are packaged on Ubuntu. Can someone using apache confirm that there is no minor version in apache config files for php 7?

@wouterj
Copy link
Member

wouterj commented Sep 2, 2017

@javiereguiluz I don't really understand your concerns. As I read blog posts, it feels like Apache always will be php7-fcgi and the FPM socket php7.1-fpm.sock. I don't think it'll change, or at least, I don't think we can force the Linux developers to change this naming :)

I'm 👍 for making the docs assume PHP 7 (also in the PHP code examples).

@javiereguiluz
Copy link
Member

@wouterj my concern was that the transform from PHP 7 to 5 is not consistent. If all changes where php7 -> php5 or php5 -> php7 then I can read some config file and transform it into the other PHP version. However, now it looks like a lottery: sometimes is php7 and sometimes php7.1 so I don't know if I have to change everything to php5 or php5 and php5.6 for example.

@wouterj
Copy link
Member

wouterj commented Sep 2, 2017

Well, I think it works just the other way around: If you setup config, I really don't think you should be using PHP 5.x anymore. So you just can read the Symfony docs and see the PHP 7 config.

In the current situation, you see the PHP 5.x config. You don't have any idea how to change this to PHP 7 and changing 5 to 7, it doesn't work (in all cases).

To make both worlds perfect, we can add comments with the PHP 5 way. But I think we it's engouh to make the PHP 7 world perfect :)

@greg0ire
Copy link
Contributor Author

ping @javiereguiluz

@javiereguiluz
Copy link
Member

I don't agree with this comment:

I really don't think you should be using PHP 5.x anymore

Developers are not stupid. They know PHP 7 exists and it's better than PHP 5. They'd love to use PHP 7. But sometimes, for some reasons that can't be changed, you must still use PHP 5.

In any case, Symfony goes full PHP 7.1 in two months, so let's change this! 👍

@Simperfit
Copy link
Contributor

i'm agree with this change too 👍

@greg0ire
Copy link
Contributor Author

Developers are not stupid. They know PHP 7 exists and it's better than PHP 5. They'd love to use PHP 7. But sometimes, for some reasons that can't be changed, you must still use PHP 5.

I don't think @wouterj was suggesting that. I think he was just saying that nowadays, when you start a project, it is more likely that you are using php 7.1 .

@wouterj
Copy link
Member

wouterj commented Oct 13, 2017

Yaaj, merged now :). I've merged it in 2.7, I agree with Christian that we shouldn't make a difference between 2.x and 3.x. It's the setup guide, so people reading it are likely to start a new project and thus use PHP 7.

wouterj added a commit that referenced this pull request Oct 13, 2017
This PR was submitted for the 3.3 branch but it was squashed and merged into the 2.7 branch instead (closes #8257).

Discussion
----------

Assume php7

I'm picking the 3.3 branch because it is the branch people starting new projects are going to pick. People reading older docs are less likely to already be using php7, but I can rebase on any branch if you think this is a bit early or late.

Commits
-------

8a6843c Assume php7
@wouterj wouterj closed this Oct 13, 2017
@greg0ire greg0ire deleted the assume_php7 branch October 13, 2017 15:14
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.

7 participants