Skip to content

Add renovate config#369

Merged
alcohol merged 1 commit into
composer:mainfrom
inverse:add-renovate
May 20, 2025
Merged

Add renovate config#369
alcohol merged 1 commit into
composer:mainfrom
inverse:add-renovate

Conversation

@inverse

@inverse inverse commented May 15, 2025

Copy link
Copy Markdown
Contributor

Following on from the discussion on #367 (comment)

Potential solution for #79

Took a bit more tweaking to get it to split out the pull requests but after playing and downgrading the package they should come out like:

The LTS one will need manual changing of the matchStrings to change the 2 to 3 when that happens but until then it should be fine!

You'll need to enable the renovate GitHub app with https://github.com/apps/renovate/

@alcohol

alcohol commented May 16, 2025

Copy link
Copy Markdown
Member

I think only @Seldaek can activate/allow apps on a repository or organization level?

Comment thread .github/renovate.json Outdated
"/lts/Dockerfile$/"
],
"matchStrings": [
"ENV COMPOSER_VERSION=[\"']?(?<currentValue>2\\.\\d+\\.\\d+)[\"']?\\s+"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this not be 2.2.\d+

Not sure why/how this matches lts releases right now. Also note we'll most likely have a second lts branch soon like 2.9 + 2.2 + latest, not sure if this matters yet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wait, 2 LTS branches? That kind of does mess up the current directory structure format; but we can change that of course.

As for the pattern matching, I do think it matters.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure which of those the generic composer:lts tag should target then though 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well not sure what i do with the old lts might drop it too but would be good to make tags more specific anyway to avoid confusion imo. Lts is too generic. 2.2-lts would be nicer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That said, why is anyone using lts with docker.. If php is in the composer container at least then it's kinda no good reason to remain on some outdated php?

@inverse inverse May 16, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Happy to help rework it based on the changes you folks want to make. So would changing it to be 2.2.\d+ make sense now or after the directory changes.

So assuming that there are two lts releases 2.9.x and 2.2.x we could have the following directory structure and tags

latest/Dockerfile

  • composer:latest
  • composer:3.1.1 (example for latest)

lts/Dockerfile

  • composer:lts
  • `composer:2.9-lts
  • composer:2.9.1-lts (example for patch)

2.2-lts/Dockerfile

  • composer:2.2-lts
  • composer:2.2.1-lts (example for patch)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO composer:lts should be deprecated as it is meaningless. Keep it pointing to 2.2-lts for BC then kill it when 2.2 dies.

Other than that sounds good to me but I am only vaguely aware of what happens in this repo so I'll let @alcohol handle the rest :D

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@inverse I would rather drop the lts tag then, and use both 2.2-lts and 2.9-lts. Or even better perhaps, just drop the -lts suffix in general. If getcomposer.org documents which versions or branches are LTS, we can just keep using the branch aliases that already exist. That would be 2.2 and 2.9 in this case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alcohol Updated the config to the new repo structure

Will reference the 2.2/dockerfile ones with 2.2
Will reference latest/Dockerfile ones with Latest

No lts mentions anymore

@Seldaek

Seldaek commented May 16, 2025

Copy link
Copy Markdown
Member

I think only @Seldaek can activate/allow apps on a repository or organization level?

Done!

@alcohol

alcohol commented May 19, 2025

Copy link
Copy Markdown
Member

Thanks @Seldaek . @inverse can you rebase and also remove the default config provided by renovate and update accordingly?

@inverse inverse force-pushed the add-renovate branch 2 times, most recently from 945db18 to 5d8143c Compare May 19, 2025 18:48
Comment thread .github/renovate.json
"dependencies"
],
"extends": [
"config:recommended"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alcohol With this one it'll bring the default renovate rules for things like GitHub actions etc, kinda nice esp if this project doesn't have dependabot enabled.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah that's fine, there is no dependabot setup here if I am not mistaken.

@inverse

inverse commented May 19, 2025

Copy link
Copy Markdown
Contributor Author

@alcohol let me just fix the config - I think there's an issue when trying locally.

Should be fine now 👍

Was testing with the npm package and running

RENOVATE_TOKEN=${RENOVATE_GH_TOKEN} LOG_LEVEL=debug RENOVATE_DRY_RUN=full renovate --platform=local

@alcohol alcohol merged commit 3b779a5 into composer:main May 20, 2025
1 check passed
@inverse inverse deleted the add-renovate branch May 22, 2025 22:09
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