Skip to content

Conversation

@saas786
Copy link

@saas786 saas786 commented Jun 21, 2020

Fixes: #109

saas786 added 2 commits June 21, 2020 14:45
In rare situations, if you have theme / plugin with same slug, it can cause issue, which is saved / generated later will overwrite the existing package (specially if version is same).

So this patch will try to avoid such situations.
on windows / wamp server, this throws the issue if file is downloaded directly from dashboard, so this workaround allows for proper download
Copy link

@lkraav lkraav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to break all existing installations, as-in require a change their composer.json for new vendor? If yes, it's probably not going to fly. This package type business probably needs to be an opt-in kind of a thing somehow.

* @throws InvalidFileName If the file name fails validation.
*/
public function __construct( string $filename ) {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably not be changing coding style, remove space-only changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed empty-line change.

src/Release.php Outdated
$this->get_package()->get_slug(),
'/satispress/%s/%s/%s',
$package_type,
$this->get_package()->get_slug(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent problem.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed indent issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.4.1: Repository/Installed{Plugins,Themes}::all() overwrite keys when plugins and themes slugs match

2 participants