Skip to content
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

PHP ext - please fix package.xml with real changes #7813

Closed
remicollet opened this issue Aug 15, 2020 · 15 comments
Closed

PHP ext - please fix package.xml with real changes #7813

remicollet opened this issue Aug 15, 2020 · 15 comments
Labels

Comments

@remicollet
Copy link

See:
https://pecl.php.net/package-changelog.php?package=protobuf

All version (including RC) have "GA release" which have no value for users.

Please fix your release process to provide something useful.

@TeBoring TeBoring added the php label Aug 17, 2020
@TeBoring
Copy link
Contributor

If we have a new release to correct those release log, does that work?

@haberman
Copy link
Member

Yes I would echo Bo's question, is it too late to fix all of the existing releases?

If we fix it now, will that fix past releases or only future releases?

@remicollet
Copy link
Author

remicollet commented Aug 18, 2020

If we fix it now, will that fix past releases or only future releases?

On pecl, only fututre release will have new entry
Old changelog cannot be changed (excepted deleting all tarball and uploading thme again, but loosing stat)

BTW, this resquest is mostly for the future versions

@TeBoring
Copy link
Contributor

Currently, we depend on some automated tool to create the change log. It's hard to putting some real change logs using automated tool. Would it be ok to just leave it empty for now?

@remicollet
Copy link
Author

Would it be ok to just leave it empty for now?

As soon as information about changes for the current version are properly set... changelog is optional

@TeBoring
Copy link
Contributor

Considered as fixed by #7832

@remicollet
Copy link
Author

Please reopen, this is obviously NOT fixed

Last notification received

The new PECL package protobuf-3.14.0RC1 (beta) has been released at https://pecl.php.net/.

Release notes
-------------
GA release.

So wrong...

@remicollet
Copy link
Author

In 0.14.0RC1


 <notes>
GA release.
 </notes>

So wrong notes...

And in changelog

  <release>
   <version>
    <release>3.14.0RC1</release>
    <api>3.14.0</api>
   </version>
   <stability>
    <release>beta</release>
    <api>beta</api>
   </stability>
   <date>2020-11-05</date>
   <time>13:39:47</time>
   <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
   <notes>

   </notes>
  </release>

Empty notes...

@acozzette acozzette reopened this Nov 10, 2020
@acozzette
Copy link
Member

#8025 should hopefully fix the incorrect "GA release" notes line, but our release process is not yet set up to populate the release notes with actual updates.

@remicollet
Copy link
Author

For RC2

The new PECL package protobuf-3.14.0RC2 (beta) has been released at https://pecl.php.net/.

Release notes
-------------
PHP protobuf

Which still have no value ;)

@haberman
Copy link
Member

haberman commented Feb 5, 2021

Looks like the code we want to fix is here:

protobuf/update_version.py

Lines 278 to 323 in 1b18833

def Callback(document):
def CreateNode(tagname, indent, children):
elem = document.createElement(tagname)
indent += 1
for child in children:
elem.appendChild(document.createTextNode('\n' + (' ' * indent)))
elem.appendChild(child)
indent -= 1
elem.appendChild(document.createTextNode('\n' + (' ' * indent)))
return elem
root = document.documentElement
now = datetime.datetime.now()
ReplaceText(Find(root, 'date'), now.strftime('%Y-%m-%d'))
ReplaceText(Find(root, 'time'), now.strftime('%H:%M:%S'))
version = Find(root, 'version')
ReplaceText(Find(version, 'release'), GetFullVersion(rc_suffix = 'RC'))
ReplaceText(Find(version, 'api'), NEW_VERSION)
stability = Find(root, 'stability')
ReplaceText(Find(stability, 'release'),
'stable' if RC_VERSION < 0 else 'beta')
ReplaceText(Find(stability, 'api'), 'stable' if RC_VERSION < 0 else 'beta')
changelog = Find(root, 'changelog')
for old_version in changelog.getElementsByTagName('version'):
if Find(old_version, 'release').firstChild.nodeValue == NEW_VERSION:
print ('[WARNING] Version %s already exists in the change log.'
% NEW_VERSION)
return
if RC_VERSION != 0:
changelog.appendChild(document.createTextNode(' '))
release = CreateNode('release', 2, [
CreateNode('version', 3, [
FindAndClone(version, 'release'),
FindAndClone(version, 'api')
]),
CreateNode('stability', 3, [
FindAndClone(stability, 'release'),
FindAndClone(stability, 'api')
]),
FindAndClone(root, 'date'),
FindAndClone(root, 'time'),
FindAndClone(root, 'license'),
CreateNode('notes', 3, []),
])
changelog.appendChild(release)
changelog.appendChild(document.createTextNode('\n '))

@remicollet
Copy link
Author

For 3.15.0RC1, see https://pecl.php.net/package-changelog.php?package=protobuf

So we have only " PHP protobuf "

In package.xml the is 2 part to update

1/ current version changelog (which is wrong)

 <notes>
PHP protobuf
 </notes>

2/ old versions changelog (which seems OK)

  <release>
   <version>
    <release>3.15.0RC1</release>
    <api>3.15.0</api>
   </version>
   <stability>
    <release>beta</release>
    <api>beta</api>
   </stability>
   <date>2021-02-05</date>
   <time>14:15:36</time>
   <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
   <notes>
* unregister INI entries and fix invalid read on shutdown (#8042)
* Fix PhpDoc comments for message accessors to include &quot;|null&quot;. (#8136)
* fix: convert native PHP floats to single precision (#8187)
* Fixed PHP to support field numbers &gt;=2**28. (#8235)
* feat: add support for deprecated fields to PHP compiler (#8223)
* Protect against stack overflow if the user derives from Message. (#8248)
* Fixed clone for Message, RepeatedField, and MapField. (#8245)
* Updated upb to allow nonzero offset minutes in JSON timestamps. (#8258)
   </notes>
  </release>

The old versions list "may" contains the current one, but this is not mandatory, common practice is rather to add it after the release, for next version.

@remicollet
Copy link
Author

Also don't understand what 3.15.1 and 3.15.2 are...
Same changelog than 3.15.0, but NO change in code...

@acozzette
Copy link
Member

The absence of PHP changes in 3.15.1 and 3.15.2 was intentional--we try to keep the version numbers consistent across languages, so sometimes we create a new release with fixes for one or two languages and then all other languages remain unchanged but get a new version number.

I can see how the changelog would be confusing, though--should we clear out the notes field next time we do a PHP release that doesn't contain any new changes?

@deannagarcia
Copy link
Member

This has been fixed to direct to the general github page for release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants