Skip to content

Improve 3.x backwards-incompatible changes documentation

Created by: dregad

Hello Thomas,

Today I went through the hoops of upgrading a couple of scripts relying on an older version of GetOpt.PHP for the first time.

It was not a very difficult task, but I think it would be nice to make things a bit more obvious and better documented for other users (currently, the only info I could find is a short note in the changelog, which is is not enough IMO and also not so easy to find).

I would suggest adding a note in the README file, linking to more details in the documentation.

For the record, here's a list of issues I faced and what I needed to change in my code to get things to work after updating composer.json and downloading the new version:

  • Change namespace references - replace Ulrichsg\Getopt -> GetOpt [changed in 50818ec7]
  • Change base class name - replace Getopt -> GetOpt [changed in 0b987977]
  • Remove usage of setBanner() method - this has been replaced by the new Help templates, customize those as needed (see also #88 (closed))
  • Remove $padding argument in getHelpText() calls [changed in df81d0d2]
  • Update text passed to setDescription() method - since the new help is automatically wrapping it now