driftingly / rector-laravel

Rector upgrades rules for Laravel
http://getrector.org
MIT License
500 stars 49 forks source link

Incorrect packagist requirements #150

Closed CornerMonkey closed 8 months ago

CornerMonkey commented 10 months ago

The packagist requirements for this repo do not align with the composer.json.

On packagist for the latest version (https://packagist.org/packages/driftingly/rector-laravel#0.26.2), the requirements are:

However, the repo, has:

This causes issues for composer updates/new installs because it is installing the latest version, even when running older versions of PHP and Rector.

driftingly commented 9 months ago

We have an action that downgrades the tagged release to the lower PHP version. The 0.26.2 tag points to https://github.com/driftingly/rector-laravel/tree/0.26.2 which has been downgraded to support lower versions of PHP.

Can you provide the steps to reproduce? Or the versions in your composer.json and lock files and the errors you are getting when you run composer update/install?

Thanks 🙏

chris-ware commented 8 months ago

Shouldn't the requirement for rector always be included, even if the PHP version support is dropped for some reason? The fact that it isn't included means that it has to be manually required, which means maintaining it separately and then trying to figure out why stuff is broken, because support has been moved to the next 0.* release of rector.

driftingly commented 8 months ago

@CornerMonkey @chris-ware Sorry, yes, that makes sense. Since Rector is also downgraded we will be able to require the same version in both the source and downgraded. I'll update the downgraded composer.json to include Rector.

driftingly commented 8 months ago

Can you try 0.28.1 and let me know if this fixes the issue?

https://packagist.org/packages/driftingly/rector-laravel