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

Abandoning Packages #421

Merged
merged 2 commits into from
Jul 23, 2014
Merged

Abandoning Packages #421

merged 2 commits into from
Jul 23, 2014

Conversation

rdohms
Copy link
Contributor

@rdohms rdohms commented Jun 9, 2014

This PR adds the abandoned flag to packages, allowing package owners to mark packages as no longer maintained.
A replecement package can also be suggested and will be displayed along with the warning.
Abandoned packages appear normally but with a warning about its current state.

A un-abandon button is also available to revert.

Next steps: in composer we should make installing these packages throw a warning.

Closes #192.

Added abandoned and replacementPackage properties to package
Added visual queue to abandoned packages in view and list.
Added form to collect replacement package
Added buttons for abandoning and un-abandoning packages
@rdohms
Copy link
Contributor Author

rdohms commented Jun 9, 2014

screen shot 2014-06-09 at 11 03 40
screen shot 2014-06-09 at 11 03 56

@@ -34,6 +35,16 @@
<input type="submit" value="Delete" />
</form>
{% endif %}
{% if is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user) and not package.abandoned %}
<form class="action abandon" action="{{ path('abandon_package', {name: package.name}) }}">
<input type="submit" value="Abandon" />
Copy link
Contributor

Choose a reason for hiding this comment

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

this won't work. you need either to render the form, or to make it a link to the page displaying the form rather than a form submitting invalid values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It actually does work, its basically submitting the form via GET and since i need no variables other then the one in the action url, its just working as a link but holding the button styles of packagist. It can easily be replaced with a link or button, its the styling that will need work.

@e-picas
Copy link

e-picas commented Jun 28, 2014

+1 (just to follow this request)

@Seldaek Seldaek added the Feature label Jul 1, 2014
@rdohms
Copy link
Contributor Author

rdohms commented Jul 10, 2014

Any further feedback?

@dereuromark
Copy link

Sounds like a good idea.

@Seldaek Seldaek merged commit 0286738 into composer:master Jul 23, 2014
@Seldaek
Copy link
Member

Seldaek commented Jul 23, 2014

Thanks @rdohms, merged and finalized the missing search bits in a6b6d80! It's live :)

@rdohms
Copy link
Contributor Author

rdohms commented Jul 23, 2014

@Seldaek awesome, will try to get the composer side of this done asap.

@dereuromark
Copy link

Why not allowing composer.json to contain that flag and just read from it? Makes more sense to me as that is the main repo for all the information.

Sth like

"abandoned" : "This package has been replaced by FooBar/Baz"

as new key?
When the value is non-empty it is expected to be abandoned.

@Seldaek
Copy link
Member

Seldaek commented Jul 23, 2014

@rdohms alright, no stress ;)

@dereuromark Not sure. I think it's easier on packagist because it allows admins to do it easily too, and can be supported by a user-based "report" system later on. Also it'd be too easy to end up with abandoned garbage in tags and stuff which I think it kinda nasty.

@Seldaek Seldaek mentioned this pull request Jul 23, 2014
@e-picas
Copy link

e-picas commented Jul 24, 2014

génial, I'll try this asap too !

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

Successfully merging this pull request may close these issues.

Mark packages as Deprecated / "this is not maintained anymore"
6 participants