!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

76 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
6 Mar 2024
@drupol:matrix.orgPolThank you !08:05:24
@patka_123:matrix.org@patka_123:matrix.org

Pol I was wondering a bit about the backport PR's. I think it's generally not done often to create backport for package updates, unless it's a security update or a situation where you can be 100% sure the update doesn't contain any backwards breaking changes. More info here

I think it's virtually impossible (without auditing all the code) to guarentee that something doesn't contain a backward breaking change for for example phpunit or phpstan. Something somewhere only needs a simple typo fix (just a silly example) in an API and there is always someone somewhere that relies on it being with the typo.

And relying on the blue eyes of upstream to not mess up semver is also not a good idea. (packages have semver violations constantly, and we don't have something like "automated" semver checks like in Rust where it helps a bit in that regard)

11:49:48
@drupol:matrix.orgPol Afk, brb 11:53:08
@drupol:matrix.orgPol I'm also unsure about the approach to take. Exemple in this PR: https://github.com/NixOS/nixpkgs/pull/293574, tgerbet told me to remove some commits. I'm also learning here. 12:11:46
@patka_123:matrix.org@patka_123:matrix.org Maybe someone else in here can chime in with their experiences. I was planning to ask this in #dev:nixos.org as well, but later this week 12:17:30
@drupol:matrix.orgPolI would definitely be interested to know more about it as well.12:36:00
@tgerbet:matrix.orgtgerbet

I tend to limit myself to stuff with security issues and/or annoying bugs when backporting mainly because it is extra work 😅. In this case I merged the PR because:

  • the PR was already done
  • yes Psalm / PHPStan upgrades can always be considered breaking because they can spot new issues but they also tend to fix quite a bunch of issues. It's not a clear cut. Also in this specific case the Psalm upgrade did not imply any configuration changes.
  • Outside of composer itself it is all leaf packages so even if something has a change we missed the impact remains limited
  • For composer the changes listed in the "common upgrade issues" of the 2.7.0 release are mainly related to the change made to fix CVE-2024-24821 (please do not run composer as root 😅) and bumping to it allow us to get the recent fixes/improvements made for buildComposerProject
18:06:51
@drupol:matrix.orgPol tgerbet: I hope you're OK when I ping you about PRs here 18:26:03
@drupol:matrix.orgPolPlease, let me know if you think it's not appropriate.18:26:16
@drupol:matrix.orgPol I don't want people to get bored/burntout/leaving because of me!18:26:33
@patka_123:matrix.org@patka_123:matrix.org
In reply to @drupol:matrix.org
I don't want people to get bored/burntout/leaving because of me!
But you are Pol, this will not happen! :D
18:26:51
@drupol:matrix.orgPolI don't get it!18:27:12
@drupol:matrix.orgPol * I don't get it! What do you mean ?18:27:25
@patka_123:matrix.org@patka_123:matrix.org I meant to say don't worry ^^ 18:27:27
9 Mar 2024
@jee_mj:matrix.orgmj joined the room.03:36:51
10 Mar 2024
@patka_123:matrix.org@patka_123:matrix.org

Jan Tojnar I have two questions you might be able to answer (other people too of course, if they know an answer).

  1. What would the best solution be for all the programs under phpPackages that are not really libraries, but standalone apps? I guess they would be more at home in by-name than within phpPackages. But then where do we draw the line because almost everything currently under phpPackages fits this discription. (for example things like phpstan or psalm etc etc).

  2. If something goes from phpPackages to by-name is an alias in top-level/aliases.nlx the best place, or is there another mechanism to not break anything for existing users, but still being able to house it in by-name?

18:42:50
@jtojnar:matrix.orgJan Tojnar
In reply to @patka_123:matrix.org

Jan Tojnar I have two questions you might be able to answer (other people too of course, if they know an answer).

  1. What would the best solution be for all the programs under phpPackages that are not really libraries, but standalone apps? I guess they would be more at home in by-name than within phpPackages. But then where do we draw the line because almost everything currently under phpPackages fits this discription. (for example things like phpstan or psalm etc etc).

  2. If something goes from phpPackages to by-name is an alias in top-level/aliases.nlx the best place, or is there another mechanism to not break anything for existing users, but still being able to house it in by-name?

I think a package should only go to phpPackages when it changes behaviour based on PHP environment
18:58:19
@jtojnar:matrix.orgJan Tojnar top-level/aliases.nix is only for aliases in top-level, you will need to add the aliases to the phpPackages scope (similarly to how they are done in php extensions) 18:59:30
@patka_123:matrix.org@patka_123:matrix.org
In reply to @jtojnar:matrix.org
I think a package should only go to phpPackages when it changes behaviour based on PHP environment
So then things like phpstan, codesniffer, php-cs-fixer, phpmd etc all belong outside of phpPackages? Or is that a wrong conclusion?
19:01:34
@jtojnar:matrix.orgJan Tojnarit depends on how the tools are implemented19:02:31
@jtojnar:matrix.orgJan Tojnarfor example, I know that php-parallel-linter does depend on PHP version19:03:02
@patka_123:matrix.org@patka_123:matrix.org I'm not sure how to determine that, except for being familiar with the tool itself. Based on what did you determine that about php-parallel-linter for example? I guess something like php-cs-fixer then also changes behaviour based on environment, because it has different rules for different php versions? 19:06:25
@jtojnar:matrix.orgJan Tojnarphp-parallel-linter just calls php's built-in syntax checker IIRC19:07:52
@jtojnar:matrix.orgJan TojnarI would expect phpstan and php-cs-fixer implementing everything themselves (IIRC they have target version config option that might default to the current version when not set but should result in the same output regardless the PHP version)19:09:53
@jtojnar:matrix.orgJan Tojnarthough searching in memory now, I actually recall that PHPStan did have different results depending on PHP version19:11:03
@patka_123:matrix.org@patka_123:matrix.org Alright, that does make sense. Thanks for the explanation! I'm going to stay on the safe side, and leave this topic alone for now. I don't feel confident enough yet about making the decision that a package should go to by-name then 19:13:00
@drupol:matrix.orgPolNew PHP PR for improving the PHP builder warning message in case of Composer validation failure: https://github.com/NixOS/nixpkgs/pull/29483121:29:10
12 Mar 2024
@drupol:matrix.orgPol tgerbet: Are you ok with this? ^^ Eval is red, but that's because of the warning. How to deal with that in nixpkgs? 09:36:31
13 Mar 2024
@patka_123:matrix.org@patka_123:matrix.org There is now a PHP label, so lets have them added automatically for us :) 16:35:23
@patka_123:matrix.org@patka_123:matrix.org

There is now a PHP label, so lets have them added automatically for us :)

https://github.com/NixOS/nixpkgs/pull/295643

16:35:33

Show newer messages


Back to Room ListRoom Version: 6