Skip to content

Deprecation warnings when docker: true extra option is used and there is no docker-compose.yaml #966

@kaznovac

Description

@kaznovac
$ composer recipes:update doctrine/doctrine-bundle
  Updating recipe for doctrine/doctrine-bundle...

Deprecation Notice: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php:324
Deprecation Notice: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php:324
Deprecation Notice: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php:335
Deprecation Notice: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php:336
Deprecation Notice: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php:335
Deprecation Notice: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php:336
                        
   Yes! Recipe updated! 
                        

  The recipe was updated but with one or more conflicts.
  Run git status to see them.
  After resolving, commit your changes like normal.

  NOTE:
  The file config/packages/doctrine.yaml was not updated because it doesn't exist in your app.

  Would you like to save the "diff" to a file so you can review it? (Y/n) 

  Saved diff to doctrine.doctrine-bundle.updates-for-deleted-files.patch

  * Put doctrine proxies in build dir for production (PR 1143)
  * Turn on "doctrine.orm.enable_lazy_ghost_objects" by default (PR 1140)
  * Use PostgreSQL 15 by default (PR 1166)

$

I have in composer.json:

    "extra": {
        "symfony": {
            "allow-contrib": false,
            "docker": true,
            "require": "6.2.*"
        }
    }

and there are no docker-compose.yml and neither docker-compose.override.yml files in the project root (these files are moved to the docker sub-folder)

upon running the update the above-mentioned deprecations are displayed, and some wrongly named docker files get created (docker-composeyaml and docker-composeoverrideyaml - note missing ., along with the the correctly named files)

symfony/flex version 2.2.4

p.s.
ignore the missing config/packages/doctrine.yaml - I've migrated to the php config files (it would be amazing if symfony/flex could update the php config files also)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions