!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

77 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
8 Feb 2024
@drupol:matrix.orgPol *

Elis 🌱, Jan Tojnar how should we deal with this kind of issue? https://discourse.nixos.org/t/php-composer-does-not-find-installed-php-extensions/31164/4
Basically, the xsl extension is not enabled in Composer and it's impossible to install Magento.
Should we:

  1. Override it locally so that it's enabled for all the versoin of PHP (system wide)?
  2. Override it only in Composer derivation ((php.withExtensions ({ enabled, all }: enabled ++ [ all.xsl ])).buildComposerProject (finalAttrs: {... )?
  3. Let the user override it himself?
13:36:49
@drupol:matrix.orgPol *

Elis 🌱, Jan Tojnar how should we deal with this kind of issue? https://discourse.nixos.org/t/php-composer-does-not-find-installed-php-extensions/31164/4
Basically, the xsl extension is not enabled in Composer, making the installation of Magento impossible.

I see 3 possible fix for this:

  1. Override it locally so that it's enabled for all the versoin of PHP (system wide)?
  2. Override it only in Composer derivation ((php.withExtensions ({ enabled, all }: enabled ++ [ all.xsl ])).buildComposerProject (finalAttrs: {... )?
  3. Let the user override it himself?

What do you think fits best in this case?

13:38:32
@drupol:matrix.orgPol *

Elis 🌱, Jan Tojnar how should we deal with this kind of issue? https://discourse.nixos.org/t/php-composer-does-not-find-installed-php-extensions/31164/4
Basically, the xsl extension is not enabled in Composer, making the installation of Magento impossible.

I see 3 possible fix for this:

  1. Override it locally so that it's enabled for all the versoin of PHP (system wide)?
  2. Override it only in Composer derivation ((php.withExtensions ({ enabled, all }: enabled ++ [ all.xsl ])).buildComposerProject (finalAttrs: {... )?
  3. Let the user override it himself? (I propose a solution in the thread)

What do you think fits best in this case?

13:44:03
@philipp:xndr.dephilippAs a best practice I always have a composer local to the project that get's this project's php and it worked well for me so far.13:55:53
@drupol:matrix.orgPol
In reply to @philipp:xndr.de
As a best practice I always have a composer local to the project that get's this project's php and it worked well for me so far.
So your POV is to have a local flake.nix with a customized composer, just like the solution I proposed in the thread?
14:15:25
@philipp:xndr.dephilippYes, pretty much like you said it there.14:19:53
@drupol:matrix.orgPolGood thanks for your input.14:20:15
@patka_123:matrix.org@patka_123:matrix.orgBut then people have to learn that for some projects they have to create their own composer with the extension enabled. From a user perspective the second option seems best?14:54:51
@patka_123:matrix.org@patka_123:matrix.org* I also do the same thing. But I'm not sure it's the "best" way as a default. Because people then have to learn that for some projects they have to create their own composer with the extension enabled. From a user perspective the second option seems best?14:56:43
@philipp:xndr.dephilipp All you'd really need to tell people is to use yourPHP.packages.composer, right? I don't think that's unreasonable when you are start messing with magento. 15:04:56
@philipp:xndr.dephilippI might even go so far and call that a good example to understand how to start thinking in nix for beginners.15:06:39
@drupol:matrix.orgPolI'm in between 2 waters. At the same time I think Composer should be working out of the box and should not fail and at the same time, I like the idea to let user customize their things.15:07:41
@patka_123:matrix.org@patka_123:matrix.orgI think both are fine. But I still gravitate towards creating a working composer out of the box. Because I have a feeling (that might be wrong) that in other places in nixos it seems like a "policy" to enable things by default to get them working, even if it ends up "bloating" the installation for some people.15:20:12
@drupol:matrix.orgPolQuite tricky :)15:27:32
@drupol:matrix.orgPolWe should check how debian or arch are doing15:27:45
@philipp:xndr.dephilipp Debian uses whatever is currently php in the current env. 15:40:38
@drupol:matrix.orgPolOh.15:48:57
@marcus_yallow:matrix.org@marcus_yallow:matrix.org left the room.22:18:48
12 Feb 2024
@drupol:matrix.orgPol Gaël ReyrolShyim ! https://main.elk.zone/mastodon.social/@dunglas/111917772480696360 09:25:05
@drupol:matrix.orgPol tgerbet: GG ! https://github.com/NixOS/nixpkgs/pull/288063 15:05:18
@tgerbet:matrix.orgtgerbetI still need to do an upstream PR to make `composer validate` happy. I do not think they wanted to pin the dep in the composer.json15:09:54
@tgerbet:matrix.orgtgerbetBut in any case it (should 😅) makes the upgrades easier15:11:49
@drupol:matrix.orgPolI wish we could have automated updates16:05:24
@drupol:matrix.orgPol(with r-ryantm for example)16:05:34
@patka_123:matrix.org@patka_123:matrix.orgSame, but I've only dabbled in haskell for a bit and don't have the energy to make it myself. But I think the only non trivial (ish) part would be regenerating the composer.lock. But also can't be too hard16:30:42
@drupol:matrix.orgPol Elis 🌱Jan Tojnar ^^ It would be nice to have your feedback on this! 19:02:10
13 Feb 2024
@etu:failar.nu@etu:failar.nuSorry I'm quite busy these days :)11:16:44
@patka_123:matrix.org@patka_123:matrix.orgHow are we dealing with package updates? It feels a bit random and updates happen by accident?12:45:20
@patka_123:matrix.org@patka_123:matrix.orgI'll at least put the release pages of phpunit, composer and phpstan to my rss feed12:45:42
@drupol:matrix.orgPolI noticed, it's not an emergency anyway. I'll ping you in a week to remind it to you then12:56:42

Show newer messages


Back to Room ListRoom Version: 6