Skip to content

.phar assets cannot be opened, and a failed config generation still writes .rr.yaml #62

Description

@roxblnfk

Description

Two smaller defects found while covering the package with tests. Neither shows up in normal use today.

  • .phar assets cannot be opened. Archive\Factory maps the .phar extension to PharArchive, which opens the file with PharData. PharData refuses that extension: Cannot create phar '.../rr.phar', file extension (or combination) not recognised or the directory does not exist. RoadRunner does not publish .phar assets, so this matcher can never succeed in practice.
  • .rr.yaml is written even when generation fails. In GetBinaryCommand::installConfig(), the error is printed when Generator::generate() throws, but execution continues to file_put_contents($to, $config) with $config undefined. By reading the code, that would emit an undefined-variable warning and write an empty .rr.yaml. MakeConfigCommand returns FAILURE in the same situation. None of the bundled sections throw today, so this path is not reachable with the built-in plugins.

Additional context

Archive handling and binary installation may be replaced by DLoad in #49, in which case this code goes away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions