cebe / php-openapi

Read and write OpenAPI yaml/json files and make the content accessible in PHP objects.
MIT License
466 stars 87 forks source link

Add `symfony/yaml` 6.0.0 support #134

Closed om4csaba closed 2 years ago

om4csaba commented 2 years ago

Symfony 6 released on November 29, 2021 .

Also, updated Github Action config to include 6, ans use the latest 5.x version

cebe commented 2 years ago

[InvalidArgumentException]
Package symfony/yaml at version 6.0.0 has requirements incompatible with your PHP version, PHP extensions and Composer version:

  • symfony/yaml v6.0.0 requires php >=8.0.2 which does not match your installed version 7.3.33.

need to add combinations with symfony 6 and php versions < 8 to the exclude section.

simPod commented 2 years ago

@cebe there's alternative to excluding in #146

om4csaba commented 2 years ago

@cebe, GH Actions in our fork looks good: https://github.com/OM4/php-openapi/actions/runs/1639869647 Failed from #123 are also fixed

I am happy to update this or my other pull (#123) after you merge one of them. to avoid merge conflict

racastellanosm commented 2 years ago

Anyone knows when this PR will be merged? 🙏 (I need it for my project in SF 6) Thanks so much.

bambamboole commented 2 years ago

I would appreciate if this gets merged, since I can't use it as well because of symfony 6

geekishmatt commented 2 years ago

It would be really awesome if this gets merged otherwise I am not able to update few projects of mine to SF6

victormln commented 2 years ago

Same here! Waiting to be merged...

om4csaba commented 2 years ago

Hi guys, if you need Symfony 6 or PHP 8.1 support right now, we are managing a fork that you can use, which contains changes from #146 and this pull: https://github.com/OM4/php-openapi

Just add the following to the repositories section in your composer.json file:

{
  "repositories": [
    {
      "type": "package",
      "package": {
        "name": "cebe/php-openapi",
        "version": "1.5.3",
        "source": {
          "url": "https://github.com/OM4/php-openapi",
          "type": "git",
          "reference": "428e95d9b0f9f3c8f4a0018cb9690edbc5a3ed6e"
        }
      }
    }
  ]
}

Let me know if you have any problems.

simPod commented 2 years ago

I'm going with

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/simPod/php-openapi"
        }
    ]
}

composer require cebe/php-openapi:"dev-master as 1.6.0"

garethellis36 commented 2 years ago

Unfortunately I'm using another library that has a dependency on this one, so I can't use the forked version instead.

simPod commented 2 years ago

@garethellis36 with those "repositories" overrides mentioned above you can.

cebe commented 2 years ago

Thanks for you contribution. Due to merge conflict with master, I applied similar changes in #151, Symfony 6 is now supported in the upcoming release 1.6.0.