Skip to content

Docs: explain how to block packages #128

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

stevenrombauts
Copy link
Contributor

Add an example on how to use custom packages to block a package.

@stevenrombauts stevenrombauts requested a review from a team April 25, 2025 15:30
@stevenrombauts stevenrombauts self-assigned this Apr 25, 2025
Copy link
Contributor

@IgorBenko IgorBenko left a comment

Choose a reason for hiding this comment

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

Looks great! I added 2 suggestions, but you decide if they make sense :)


### Prevent a package from being used with custom packages

While there is no direct "block package" feature in Packagist, you can effectively prevent a specific package from being used by creating a placeholder package.
Copy link
Contributor

Choose a reason for hiding this comment

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

You do mention that on the bottom of this new section, but I felt this was missing up here:

Suggested change
While there is no direct "block package" feature in Packagist, you can effectively prevent a specific package from being used by creating a placeholder package.
While there is no direct "block package" feature in Packagist, you can effectively prevent a specific package from being used in your project by creating a placeholder package.

What do you think?


While there is no direct "block package" feature in Packagist, you can effectively prevent a specific package from being used by creating a placeholder package.

The package type [metapackage](https://getcomposer.org/doc/04-schema.md#type) ensures no code is associated with it. Optionally, you can mark the package as [abandoned](https://getcomposer.org/doc/04-schema.md#abandoned) and suggest an alternative.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The package type [metapackage](https://getcomposer.org/doc/04-schema.md#type) ensures no code is associated with it. Optionally, you can mark the package as [abandoned](https://getcomposer.org/doc/04-schema.md#abandoned) and suggest an alternative.
The package type [metapackage](https://getcomposer.org/doc/04-schema.md#type) ensures no code is associated with it. Optionally, you can mark the package as [abandoned](https://getcomposer.org/doc/04-schema.md#abandoned) and optionally suggest an alternative.

They might not have a suggestion for an alternative package, if they just want to block something. It's all described in the docs you linked, but this might make it clearer that you don't need to suggest an alternative.

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.

3 participants