Skip to content

Conversation

@7-zete-7
Copy link
Contributor

@7-zete-7 7-zete-7 commented Nov 30, 2025

The latest version of Symfony v7.4 introduces native runner support for FrankenPHP (see symfony/symfony#60503). The current new project initialization script explicitly adds the runtime/frankenphp-symfony dependency, which is no longer needed for projects running the latest version of Symfony.

For Symfony v8.0 (the default version), adding the runtime/frankenphp-symfony package results in an error (see #872).

Details
Creating a "symfony/skeleton " project at "./tmp"
The repository at "/app" does not have the correct ownership and git refuses to use it:

fatal: detected dubious ownership in repository at '/app'
To add an exception for this directory, call:

       git config --global --add safe.directory /app

Installing symfony/skeleton (v8.0.99)
  - Downloading symfony/skeleton (v8.0.99)
  - Installing symfony/skeleton (v8.0.99): Extracting archive
Created project in /app/tmp
/app
The repository at "/app" does not have the correct ownership and git refuses to use it:

fatal: detected dubious ownership in repository at '/app'
To add an exception for this directory, call:

       git config --global --add safe.directory /app

./composer.json has been updated
The repository at "/app" does not have the correct ownership and git refuses to use it:

fatal: detected dubious ownership in repository at '/app'
To add an exception for this directory, call:

       git config --global --add safe.directory /app

Running composer update php runtime/frankenphp-symfony
Loading composer repositories with package information
Updating dependencies
Lock file operations: 18 installs, 0 updates, 0 removals
  - Locking psr/container (2.0.2)
  - Locking psr/event-dispatcher (1.0.0)
  - Locking psr/log (3.0.2)
  - Locking runtime/frankenphp-symfony (0.2.0)
  - Locking symfony/dependency-injection (v7.4.0)
  - Locking symfony/deprecation-contracts (v3.6.0)
  - Locking symfony/error-handler (v8.0.0)
  - Locking symfony/event-dispatcher (v8.0.0)
  - Locking symfony/event-dispatcher-contracts (v3.6.0)
  - Locking symfony/flex (v2.10.0)
  - Locking symfony/http-foundation (v8.0.0)
  - Locking symfony/http-kernel (v7.4.0)
  - Locking symfony/polyfill-mbstring (v1.33.0)
  - Locking symfony/polyfill-php85 (v1.33.0)
  - Locking symfony/runtime (v7.4.0)
  - Locking symfony/service-contracts (v3.6.1)
  - Locking symfony/var-dumper (v8.0.0)
  - Locking symfony/var-exporter (v8.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 18 installs, 0 updates, 0 removals
  - Downloading symfony/runtime (v7.4.0)
  - Downloading symfony/flex (v2.10.0)
  - Downloading symfony/polyfill-mbstring (v1.33.0)
  - Downloading symfony/http-foundation (v8.0.0)
  - Downloading psr/event-dispatcher (1.0.0)
  - Downloading symfony/event-dispatcher-contracts (v3.6.0)
  - Downloading symfony/event-dispatcher (v8.0.0)
  - Downloading symfony/var-dumper (v8.0.0)
  - Downloading symfony/polyfill-php85 (v1.33.0)
  - Downloading psr/log (3.0.2)
  - Downloading symfony/error-handler (v8.0.0)
  - Downloading symfony/deprecation-contracts (v3.6.0)
  - Downloading symfony/http-kernel (v7.4.0)
  - Downloading symfony/var-exporter (v8.0.0)
  - Downloading psr/container (2.0.2)
  - Downloading symfony/service-contracts (v3.6.1)
  - Downloading symfony/dependency-injection (v7.4.0)
  - Downloading runtime/frankenphp-symfony (0.2.0)
  - Installing symfony/runtime (v7.4.0): Extracting archive
  - Installing symfony/flex (v2.10.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.33.0): Extracting archive
  - Installing symfony/http-foundation (v8.0.0): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v3.6.0): Extracting archive
  - Installing symfony/event-dispatcher (v8.0.0): Extracting archive
  - Installing symfony/var-dumper (v8.0.0): Extracting archive
  - Installing symfony/polyfill-php85 (v1.33.0): Extracting archive
  - Installing psr/log (3.0.2): Extracting archive
  - Installing symfony/error-handler (v8.0.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.6.0): Extracting archive
  - Installing symfony/http-kernel (v7.4.0): Extracting archive
  - Installing symfony/var-exporter (v8.0.0): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing symfony/service-contracts (v3.6.1): Extracting archive
  - Installing symfony/dependency-injection (v7.4.0): Extracting archive
  - Installing runtime/frankenphp-symfony (0.2.0): Extracting archive
Generating autoload files
15 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.

The repository at "/app" does not have the correct ownership and git refuses to use it:

fatal: detected dubious ownership in repository at '/app'
To add an exception for this directory, call:

       git config --global --add safe.directory /app

Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "8.0.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires runtime/frankenphp-symfony * -> satisfiable by runtime/frankenphp-symfony[0.1.0, 0.1.1, 0.2.0].
    - runtime/frankenphp-symfony[0.1.0, ..., 0.1.1] require symfony/dependency-injection ^5.4 || ^6.0 -> found symfony/dependency-injection[v5.4.0, ..., v5.4.48, v6.0.0, ..., v6.4.26] but these were not loaded, likely because it conflicts with another require.
    - runtime/frankenphp-symfony 0.2.0 requires symfony/dependency-injection ^5.4 || ^6.0 || ^7.0 -> found symfony/dependency-injection[v5.4.0, ..., v5.4.48, v6.0.0, ..., v6.4.26, v7.0.0, ..., v7.4.0] but these were not loaded, likely because it conflicts with another require.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

No security vulnerability advisories found.
Using version ^0.2.0 for runtime/frankenphp-symfony
The repository at "/app" does not have the correct ownership and git refuses to use it:

fatal: detected dubious ownership in repository at '/app'
To add an exception for this directory, call:

       git config --global --add safe.directory /app

grep: .env: No such file or directory
Could not open input file: bin/console
Could not open input file: bin/console
Could not open input file: bin/console

With this PR, I propose removing the addition of the runtime/frankenphp-symfony dependency and explicitly indicating to Symfony which runtime should be used via the APP_RUNTIME env.

@7-zete-7 7-zete-7 force-pushed the symfony-7.4-support branch from 104e2a8 to 94a9e65 Compare November 30, 2025 21:36
@7-zete-7 7-zete-7 marked this pull request as draft November 30, 2025 22:00
@7-zete-7 7-zete-7 marked this pull request as draft November 30, 2025 22:00
@7-zete-7
Copy link
Contributor Author

CI / Lint failed due the #874.

@shulard
Copy link

shulard commented Dec 2, 2025

If we do this that way, it means that we can't use this repo easily with a version <7.4. Maybe we should introduce a condition :

  • If Symfony < 7.4 is required -> Keep the runtime ;
  • If not, drop it.

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.

2 participants