szabesz

Changelog support in ProcessWireUpgrade module

8 posts in this topic

As fas as I know, currently there is no way for a module developer to include a changelog in a way that enables us to check out the changes in the admin before upgrading.

11 people like this

Share this post


Link to post
Share on other sites

I would also love to see this - I think it would be great if we could define it in a Github repo changelog.md file and have the automatically imported into the text in the modules directory, and perhaps even displayed in the module info within a PW install. Perhaps it would even be nice to have a way to add a flag about breaking changes that would show up in the ProcessWire Upgrades module so you are warned before upgrading.

@ryan - any thoughts on this? I'd be happy to work on it - obviously I could do the PW side of it from the repo, but would need access to the php files for the modules directory to make that side of things work.

11 people like this

Share this post


Link to post
Share on other sites

is there any progress on having Changelogs for an update, so we can know if some updates are worth updating to. 

1 person likes this

Share this post


Link to post
Share on other sites
On 3/1/2017 at 11:52 PM, adrian said:

I would also love to see this - I think it would be great if we could define it in a Github repo changelog.md file and have the automatically imported into the text in the modules directory, and perhaps even displayed in the module info within a PW install. Perhaps it would even be nice to have a way to add a flag about breaking changes that would show up in the ProcessWire Upgrades module so you are warned before upgrading.

@ryan - any thoughts on this? I'd be happy to work on it - obviously I could do the PW side of it from the repo, but would need access to the php files for the modules directory to make that side of things work.

I thought of a concept and it doesn't have to be as complex infact here's my proposition

There should be a changelog.md and also another changelog.json which contains each version and the text serving as the changes, however this might hard to implement as it means enforcing everyone to do this, another better alternative could be a changelog.md with a specific format to follow, so that a Parser can be read to extract the needed information, it is vital a changelog is seen before uploading to inform user about what has changed and what to expect. 

3 people like this

Share this post


Link to post
Share on other sites

Jump jumping in to support this idea. I can't like it twice ^_^

2 people like this

Share this post


Link to post
Share on other sites

Can't we use upgrade() function inside modules to achieve this? It's not as eloquent as having the changelog available before downloading new version, but developers can use it to display certain info, and request confirmation during/abort if possible. Something like this:

<?php namespace ProcessWire;

class MyModule extends Module
{
  	// ...
  	// (module implementation)
  	// ...
    public function upgrade($from, $to) {
        // TODO: remove after v2.0
        // upgrading to v2.0, show warning about breaking changes
        if(strpos($from, '1.') === 0 && strpos($to, '2.') === 0) {
            $this->warning("New version includes <strong>breaking</strong> changes. See module info page for details.", Notice::allowMarkup);
            // create some info page, display compiled output of README.md
            // not sure how to display info on Process pages
          
            if (!$accepted) {
                throw new WireException('Cannot install without confirmation');
            }
        }
        return $to;
    }
}

 

1 person likes this

Share this post


Link to post
Share on other sites

+1

Displaying a changelog before upgrading a module or even the core is badly needed. Also the changelog should be visible everytime on a module detail page.

2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By FvG
      Hi there!
       
      I haven't used PHP and Processwire for almost four years now, but now I need a good CMS again ;-) I just found an old PW installation (2.3.0), which I would like to update to the current version. What's the best way to do this? It looks like starting from 2.5.0 there is a module which does updates automatically, so would it make sense to update to 2.5.0 and then let PW do it? 
       
      Thanks for your suggestions!
       
    • By CarloC
      Hi everyone,
      I've upgraded one of my pw 2.7 websites to the 2.8 legacy version and I'm encountering some problems.
      As you can see in the image I don't see uploaded images thumbnails anymore, and the repeater fields previously added are no more usable.

      Why I'm having this strange behaviour simply after an upgrade from processwire 2.7 to 2.8?
      Hope you can help me, I'd like to use the 2.8 version features like the front-end inline editing, but it seems like I'll be locked in the 2.7 version forever
      Thank you!
       
    • By holmescreek
      I just posted a question about moving PW from a resting domain to a production domain, after consideration I figure I would create a new post for a second question I have.
      I noticed the coming feature of client size image resizing. This will be really helpful, as I have some clients on a Satellite connection. I'm telling you, them trying to upload 15MB images, or them getting them straight on batch resizers (or Photoshop) to resize before upload is a real chore. Needless to say, Ryan has been doing an excellent job addressing this.
      My question, is that I have several clients on PW 2.x thru 3.x. Is there a really good guide on steps that I need to take to update the core to take advantage of the features of new releases? Are their perils to look out for?
      Yeah, after developing several sites, I feel a bit silly about asking this one, but, the docs doesn't seem to be clear in a "general" sense of upgrading the core across all versions.
      Thanks everyone for your time and assistance.
    • By alexcapes
      Hi,
      I just updated a site to 3.0.61 and it's breaking uploading images from a URL via the API.
      I get the following error:
      Recoverable Fatal Error: Method ProcessWire\Pageimage::__toString() must return a string value The code getting the image is very simple:
      $new_edition->work_cover = $cover_url; $new_edition->save('work_cover'); It works fine on 3.0.42 but returns the error on 3.0.61
       
       
    • By benbyf
      SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hortons.pages' doesn't exist (in /srv/users/serverpilot/apps/hortons/public/wire/core/WireDatabasePDO.php line 439)
      Getting this error after upgrading from 2.4 to 2.8 then exporting the site profile and installing on the latest version of v3. Anything I could do about this, anyone come across this?
      thanks
      Edit:
      The issues started going from 2.4 to 2.8 - I used the upgrading advice on the github, replacing PW files. Im running ubuntu 14.4.x using serverpilot.io. The site hosting was originally not controlled by me so am trying to rehost and upgrade.