10000 Symfony no longer parses octal numbers starting with 0 alone · Issue #81 · thephpleague/flysystem-bundle · GitHub
[go: up one dir, main page]

Skip to content
Symfony no longer parses octal numbers starting with 0 alone #81
@skon-hh

Description

@skon-hh

Starting with Symfony 5.1 following deprecation is triggered:

php bin/console lint:yaml config --parse-tags
  ERROR  in config/packages/flysystem.yaml
  Since symfony/yaml 5.1: Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0 at line 32 (near "directoryPerm: 0770").

The content of config/packages/flysystem.yaml:

flysystem:
  storages:
    sftp.storage:
      adapter: 'sftp'
      options:
        host: '<host>'
        port: 22
        username: '<user>'
        password: '<password>'
        privateKey: '<privateKey>'
        root: '<root>'
        timeout: 3
        directoryPerm: 0770

If I change 0770 to string representation '0770' I'm getting wrong directory permissions for newly generated folders on my sftp server. I think the issue is in SftpAdapterDefinitionBuilder.php, this should allow string values. If understand the code correctly the used library phpseclib/phpseclib expects directory permissions to be of type integer.

I'm working with Symfony 5.3 and flysystem-bundle 1.5.0

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

      0