Skip to content

Update PHP composer packages + ran recipes#1727

Closed
melroy89 wants to merge 21 commits intomainfrom
update/packages
Closed

Update PHP composer packages + ran recipes#1727
melroy89 wants to merge 21 commits intomainfrom
update/packages

Conversation

@melroy89
Copy link
Copy Markdown
Member

@melroy89 melroy89 commented Sep 22, 2025

Very long overdue.. But important nonetheless, upgrading several PHP composer packages (meaning also upgrading from Symfony v7.2 to v7.3). Plus ran multiple recipes as well.

Prod Packages Operation Base Target
aws/aws-sdk-php Upgraded 3.337.3 3.356.22
composer/ca-bundle Upgraded 1.5.7 1.5.8
dasprid/enum Upgraded 1.0.6 1.0.7
doctrine/dbal Upgraded 3.9.5 3.10.2
doctrine/doctrine-bundle Upgraded 2.15.0 2.16.2
doctrine/inflector Upgraded 2.0.10 2.1.0
doctrine/migrations Upgraded 3.9.1 3.9.4
doctrine/orm Upgraded 2.20.5 2.20.6
endroid/qr-code Upgraded 6.0.8 6.0.9
gumlet/php-image-resize Upgraded 2.1.0 2.1.2
guzzlehttp/guzzle Upgraded 7.9.3 7.10.0
guzzlehttp/promises Upgraded 2.2.0 2.3.0
guzzlehttp/psr7 Upgraded 2.7.1 2.8.0
knpuniversity/oauth2-client-bundle Upgraded v2.18.3 v2.19.0
league/commonmark Upgraded 2.7.0 2.7.1
liip/imagine-bundle Upgraded 2.13.3 2.14.0
meteo-concept/hcaptcha-bundle Upgraded v4.2.2 v4.3.0
nette/utils Upgraded v4.0.7 v4.0.8
nikic/php-parser Upgraded v5.5.0 v5.6.1
phpdocumentor/reflection-docblock Upgraded 5.6.2 5.6.3
phpstan/phpdoc-parser Upgraded 2.1.0 2.3.0
predis/predis Upgraded v3.0.1 v3.2.0
symfony/amqp-messenger Upgraded v7.2.7 v7.3.2
symfony/asset Upgraded v7.2.0 v7.3.0
symfony/cache Upgraded v7.2.8 v7.3.2
symfony/clock Upgraded v7.2.0 v7.3.0
symfony/config Upgraded v7.2.7 v7.3.2
symfony/console Upgraded v7.2.8 v7.3.3
symfony/css-selector Upgraded v7.2.0 v7.3.0
symfony/dependency-injection Upgraded v7.2.8 v7.3.3
symfony/doctrine-bridge Upgraded v7.2.8 v7.3.3
symfony/doctrine-messenger Upgraded v7.2.5 v7.3.3
symfony/dotenv Upgraded v7.2.0 v7.3.2
symfony/error-handler Upgraded v7.2.8 v7.3.2
symfony/event-dispatcher Upgraded v7.2.0 v7.3.3
symfony/expression-language Upgraded v7.2.0 v7.3.2
symfony/filesystem Upgraded v7.2.0 v7.3.2
symfony/finder Upgraded v7.2.2 v7.3.2
symfony/flex Upgraded v2.8.1 v2.8.2
symfony/form Upgraded v7.2.8 v7.3.3
symfony/framework-bundle Upgraded v7.2.8 v7.3.3
symfony/http-client Upgraded v7.2.8 v7.3.3
symfony/http-foundation Upgraded v7.2.8 v7.3.3
symfony/http-kernel Upgraded v7.2.8 v7.3.3
symfony/intl Upgraded v7.2.8 v7.3.3
symfony/lock Upgraded v7.2.6 v7.3.2
symfony/mailer Upgraded v7.2.8 v7.3.3
symfony/mailgun-mailer Upgraded v7.2.8 v7.3.1
symfony/messenger Upgraded v7.2.8 v7.3.3
symfony/mime Upgraded v7.2.6 v7.3.2
symfony/monolog-bridge Upgraded v7.2.0 v7.3.3
symfony/options-resolver Upgraded v7.2.0 v7.3.3
symfony/password-hasher Upgraded v7.2.0 v7.3.0
symfony/polyfill-intl-grapheme Upgraded v1.32.0 v1.33.0
symfony/polyfill-intl-icu Upgraded v1.32.0 v1.33.0
symfony/polyfill-intl-idn Upgraded v1.32.0 v1.33.0
symfony/polyfill-intl-normalizer Upgraded v1.32.0 v1.33.0
symfony/polyfill-mbstring Upgraded v1.32.0 v1.33.0
symfony/polyfill-php80 Upgraded v1.32.0 v1.33.0
symfony/polyfill-php81 Upgraded v1.32.0 v1.33.0
symfony/polyfill-php83 Upgraded v1.32.0 v1.33.0
symfony/polyfill-php84 Upgraded v1.32.0 v1.33.0
symfony/polyfill-uuid Upgraded v1.32.0 v1.33.0
symfony/process Upgraded v7.2.5 v7.3.3
symfony/property-access Upgraded v7.2.8 v7.3.3
symfony/property-info Upgraded v7.2.8 v7.3.1
symfony/psr-http-message-bridge Upgraded v7.2.0 v7.3.0
symfony/rate-limiter Upgraded v7.2.0 v7.3.2
symfony/redis-messenger Upgraded v7.2.6 v7.3.0
symfony/routing Upgraded v7.2.3 v7.3.2
symfony/runtime Upgraded v7.2.8 v7.3.1
symfony/scheduler Upgraded v7.2.3 v7.3.3
symfony/security-bundle Upgraded v7.2.8 v7.3.3
symfony/security-core Upgraded v7.2.8 v7.3.3
symfony/security-csrf Upgraded v7.2.3 v7.3.0
symfony/security-http Upgraded v7.2.8 v7.3.3
symfony/serializer Upgraded v7.2.8 v7.3.3
symfony/stimulus-bundle Upgraded v2.27.0 v2.30.0
symfony/stopwatch Upgraded v7.2.4 v7.3.0
symfony/string Upgraded v7.2.6 v7.3.3
symfony/translation Upgraded v7.2.8 v7.3.3
symfony/twig-bridge Upgraded v7.2.7 v7.3.3
symfony/twig-bundle Upgraded v7.2.8 v7.3.2
symfony/type-info Upgraded v7.2.8 v7.3.3
symfony/uid Upgraded v7.2.8 v7.3.1
symfony/ux-autocomplete Upgraded v2.27.0 v2.30.0
symfony/ux-chartjs Upgraded v2.27.0 v2.30.0
symfony/ux-twig-component Upgraded v2.27.0 v2.30.0
symfony/validator Upgraded v7.2.8 v7.3.3
symfony/var-dumper Upgraded v7.2.8 v7.3.3
symfony/var-exporter Upgraded v7.2.7 v7.3.3
symfony/web-link Upgraded v7.2.7 v7.3.0
symfony/webpack-encore-bundle Upgraded v2.2.0 v2.3.0
symfony/workflow Upgraded v7.2.6 v7.3.2
symfony/yaml Upgraded v7.2.8 v7.3.3
symfonycasts/reset-password-bundle Upgraded v1.23.1 v1.23.2
symfonycasts/verify-email-bundle Upgraded v1.17.3 v1.17.4
web-token/jwt-library Upgraded 4.0.4 4.0.6
zircote/swagger-php Upgraded 5.1.3 5.3.2
Dev Packages Operation Base Target
brianium/paratest Upgraded v7.10.1 v7.13.0
dama/doctrine-test-bundle Upgraded v8.3.0 v8.3.1
doctrine/data-fixtures Upgraded 2.0.3 2.1.0
fidry/cpu-core-counter Upgraded 1.2.0 1.3.0
justinrainbow/json-schema Upgraded 6.4.2 6.5.2
marc-mabe/php-enum Upgraded v4.7.1 v4.7.2
masterminds/html5 Upgraded 2.9.0 2.10.0
myclabs/deep-copy Upgraded 1.13.3 1.13.4
phpstan/phpstan Upgraded 2.1.17 2.1.28
phpunit/php-code-coverage Upgraded 12.3.1 12.3.8
phpunit/phpunit Upgraded 12.1.6 12.3.12
sebastian/cli-parser Upgraded 4.0.0 4.2.0
sebastian/comparator Upgraded 7.1.0 7.1.3
sebastian/environment Upgraded 8.0.2 8.0.3
sebastian/exporter Upgraded 7.0.0 7.0.1
sebastian/global-state Upgraded 8.0.0 8.0.2
sebastian/recursion-context Upgraded 7.0.0 7.0.1
sebastian/type Upgraded 6.0.2 6.0.3
spatie/phpunit-snapshot-assertions Upgraded 5.2.1 5.2.2
symfony/browser-kit Upgraded v7.2.4 v7.3.2
symfony/debug-bundle Upgraded v7.2.0 v7.3.0
symfony/dom-crawler Upgraded v7.2.8 v7.3.3
symfony/maker-bundle Upgraded v1.63.0 v1.64.0
symfony/phpunit-bridge Upgraded v7.2.8 v7.3.3
symfony/web-profiler-bundle Upgraded v7.2.4 v7.3.3

I also upgraded the friendsofphp/php-cs-fixer CLI within the tools directory from v3.75.0 to v3.87.2 and ran the fix command.

Last but not least, due to the symfony/routing recipe upgrade. A new env var was introduced, called DEFAULT_URI. I notice an issue within your post-upgrade script that first was trying to run composer install (which also does cache:clear at the end), causing issues like:

Generating optimized autoload files
128 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!   // Clearing the cache for the prod environment with debug false                
!!  
!!  
!!  In EnvVarProcessor.php line 221:
!!                                                    
!!    Environment variable not found: "DEFAULT_URI".  
!!                                                    
!!  
!!  cache:clear [--no-warmup] [--no-optional-warmers]
!!  
!!  
Script @auto-scripts was called via post-install-cmd

This can be avoided, by first running the composer dump-env prod, so the new env var is present. Followed by the composer install script :)

@melroy89 melroy89 added dependencies Pull requests that update a dependency file security Issues and pull requests that address security concerns labels Sep 22, 2025
@melroy89 melroy89 changed the title Update PHP composer packages Update PHP composer packages + ran recipes Sep 22, 2025
@melroy89

This comment was marked as outdated.

@melroy89
Copy link
Copy Markdown
Member Author

melroy89 commented Sep 22, 2025

Running the symfony/routing recipe caused issue with requiring to have a new DEFAULT_URI environment variable, also reported here: symfony/recipes#1416 (comment)

Now the question is what should we do..?

1. Keep `default_uri: '%env(DEFAULT_URI)%'` present.. But that means we do need to introduce a `DEFAULT_URI` env var in the `.env`.. Some help needed here. What would be the default value? Or:

2. Uncomment line 7 (`default_uri`) again in `routing.yaml `(just like before the recipe update).

OK.. I went for the first option.. DEFAULT_URI will become a new env var!

Meaning admins do need to change their .env file.. Since by default Mbin is not using the .env with over-loading of .env.local...
But that is our fault, because we added .env to our .gitignore. I will not change this behavior in this PR.

@BentiGorlich
Copy link
Copy Markdown
Member

Apparently I have not read the description or comments close enough, sorry @melroy89

@melroy89
Copy link
Copy Markdown
Member Author

Apparently I have not read the description or comments close enough, sorry @melroy89

No problem ❤️

@BentiGorlich
Copy link
Copy Markdown
Member

Since we previously had issue with symfony 7.3 and docker in production it would be really helpful if someone running docker in prod could test that this is working as expected. Could you maybe do that @jwr1 ?

@melroy89
Copy link
Copy Markdown
Member Author

melroy89 commented Sep 24, 2025

I ran this patch on kbin.melroy.org for two days, but I notice that the content was not federating anymore. Yes RabbitMQ just worked fine and there seems to be a connection. Yet the content does not federate anymore 😢 .

I first saw some error messages regarding http://localhost, so I also tried setting DEFAULT_URI to https://kbin.melroy.org. But yeah that also didn't solve it for now.

I will need to look into deeper why it suddenly stop federating. Or maybe make smaller PRs 🤣

@aaronliu0130
Copy link
Copy Markdown

As one of the users on the instance who were affected, I'd like to note (FWIW; this might just be standard ActivityPub behavior) that unlike federation delays, posts (and comment and whatnot) made during the non-federated period did not federate even after federation started working again

@melroy89
Copy link
Copy Markdown
Member Author

As one of the users on the instance who were affected, I'd like to note (FWIW; this might just be standard ActivityPub behavior) that unlike federation delays, posts (and comment and whatnot) made during the non-federated period did not federate even after federation started working again

yeah sorry about that. I believe the message itself was also wrongly formatted (eg. the url was http://localhost), causing delivery issues on old posts (from the past 2 days) even if federation is working again now.

@BentiGorlich
Copy link
Copy Markdown
Member

BentiGorlich commented Sep 28, 2025

@melroy89 maybe we can set the DEFAULT_URI to KBIN_DOMAIN by default? (or https://${KBIN_DOMAIN})

@melroy89
Copy link
Copy Markdown
Member Author

melroy89 commented Oct 1, 2025

@melroy89 maybe we can set the DEFAULT_URI to KBIN_DOMAIN by default? (or https://${KBIN_DOMAIN})

I'm afraid I will just start over.. since for some reason after this federation doesn't work. Its hard to pin point, unless you know why.

So I will just break up this PR is smaller chunks of upgrades.

@melroy89 melroy89 closed this Oct 1, 2025
@blued-gear blued-gear deleted the update/packages branch January 30, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file security Issues and pull requests that address security concerns

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants