Hi everybody,
I'm currently adapting the 'PHK' PECL extension for PHP 7. I initially
wanted to keep a single branch for PHP 5 and PHP 7, and enclose differences
in macros and #ifdef blocks, starting with a backport of zend_string.
Unfortunately, PHK interacts a lot with the PHP core and, as changes
accumulate, I see my code become less and less readable. So, I now think
I'll have to create a separate branch.
As many of you probably had to make the same decision, can you tell me how
you numbered your versions for the 2 parallel branches ? Use a different
major number ? minor number ? same version with different suffixes ?
Thanks and regards
François
Hi everybody,
I'm currently adapting the 'PHK' PECL extension for PHP 7. I initially
wanted to keep a single branch for PHP 5 and PHP 7, and enclose
differences
in macros and #ifdef blocks, starting with a backport of zend_string.
Unfortunately, PHK interacts a lot with the PHP core and, as changes
accumulate, I see my code become less and less readable. So, I now think
I'll have to create a separate branch.As many of you probably had to make the same decision, can you tell me how
you numbered your versions for the 2 parallel branches ? Use a different
major number ? minor number ? same version with different suffixes ?
Different branches is painful from a release point of view and development.
Except if the exposed APIs are very different it makes little sense to do
it. Same for using different versions for 5.x and 7.x.
I would recommend to use multiple files when the code is getting unreadable.
Thanks and regards
François
Hi everybody,
I'm currently adapting the 'PHK' PECL extension for PHP 7. I initially
wanted to keep a single branch for PHP 5 and PHP 7, and enclose
differences
in macros and #ifdef blocks, starting with a backport of zend_string.
Unfortunately, PHK interacts a lot with the PHP core and, as changes
accumulate, I see my code become less and less readable. So, I now think
I'll have to create a separate branch.As many of you probably had to make the same decision, can you tell me
how
you numbered your versions for the 2 parallel branches ? Use a different
major number ? minor number ? same version with different suffixes ?
I forgot to mention that starting with suffices is not going to work well,
not semver and this is a job for a dependency manager. Either using pickle,
PECL or configure.
Different branches is painful from a release point of view and
development. Except if the exposed APIs are very different it makes little
sense to do it. Same for using different versions for 5.x and 7.x.I would recommend to use multiple files when the code is getting
unreadable.Thanks and regards
François