# Merging PHP5/PHP7

- Thread: https://externals.io/message/79802
- Original archive: https://news-web.php.net/php.internals/79802
- Started by Anatol Belski on 2014-12-18T09:25:22+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #79802 — Anatol Belski — 2014-12-18T09:25:22+00:00

URL: https://externals.io/message/79802#79802

Hi,

the native-tls branch was just merged into master. As all the TSRMLS_*
occurrences was removed, some more merge conflicts are to expect when it
comes from PHP5 to PHP7. I would like to suggest a merge strategy to
minimize the negative effects. Also this will be useful to port the
existing patches and extensions.

Here is a tool https://gist.github.com/weltling/8e8e0965bc471d254acc I
used to remove the TSRMLS_. Generally there are two cases:

1. merging from PHP5 and there is no conflict, then
 - just run remove_tsrmls.php on the php-src and commit if needed

2. merging from PHP5 and there is a conflict, then
 - while in conflicted state, run remove_tsrmls.php
 - resolve conflicts and commit

For the case 2. - removing the tsrmls in the conflicted state usualy
allows a better sight on what is happening, IMHO. Of course, one could
merge with TSRMLS_ first and remove it afterwards.

Please also see the UPGRADING.INTERNALS section and the RFC for some details.

Regards

Anatol

---

## #79805 — Ferenc Kovacs — 2014-12-18T11:53:45+00:00

URL: https://externals.io/message/79802#79805 · In reply to: #79802

On Thu, Dec 18, 2014 at 10:25 AM, Anatol Belski <anatol.php@belski.net>
wrote:
>
> Hi,
>
> the native-tls branch was just merged into master. As all the TSRMLS_*
> occurrences was removed, some more merge conflicts are to expect when it
> comes from PHP5 to PHP7. I would like to suggest a merge strategy to
> minimize the negative effects. Also this will be useful to port the
> existing patches and extensions.
>
> Here is a tool https://gist.github.com/weltling/8e8e0965bc471d254acc I
> used to remove the TSRMLS_. Generally there are two cases:
>
> 1. merging from PHP5 and there is no conflict, then
>  - just run remove_tsrmls.php on the php-src and commit if needed
>
> 2. merging from PHP5 and there is a conflict, then
>  - while in conflicted state, run remove_tsrmls.php
>  - resolve conflicts and commit
>
> For the case 2. - removing the tsrmls in the conflicted state usualy
> allows a better sight on what is happening, IMHO. Of course, one could
> merge with TSRMLS_ first and remove it afterwards.
>
> Please also see the UPGRADING.INTERNALS section and the RFC for some
> details.
>
> Regards
>
> Anatol
>
> --
> 
> 
>
>
thanks!

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu
