laminas / laminas-cli

Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
https://docs.laminas.dev/laminas-cli
BSD 3-Clause "New" or "Revised" License
55 stars 22 forks source link

[RFC]: Allow installation with Symfony 7.x series #117

Closed gsteel closed 8 months ago

gsteel commented 9 months ago

RFC

Allowing installation along with Symfony v7 components will require dropping support for PHP 8.1 here.

Considering that symfony/console is an important dependency here, it probably makes sense to do that.

What do members of the @laminas/technical-steering-committee think?

froschdesign commented 9 months ago

@gsteel

Allowing installation along with Symfony v7 components will require dropping support for PHP 8.1 here.

Do you see any problem if we allow version 6 and 7? The changelog does not mention any problems in this direction: https://github.com/symfony/console/blob/7.0/CHANGELOG.md#70 – but I could also be wrong!

gsteel commented 9 months ago

@froschdesign - I see no problem with supporting ^6 || ^7 as long as both are installed and tested in CI. config.platform prevents installation of v7 currently: https://github.com/laminas/laminas-cli/actions/runs/7033894740/job/19140722740?pr=116#step:3:218

froschdesign commented 9 months ago

The documentation must be update:

Remove Command::$defaultName and Command::$defaultDescription, use the AsCommand attribute instead

Or it must work/documented for both versions.

Xerkus commented 9 months ago

I pushed dispatcher update to console update PR. We got our test results. You should investigate first if it is possible to support both versions at the same time. There are significant typehint changes across symfony. This might require a new major.

gsteel commented 9 months ago

Addition of parameter types on public methods will necessitate a new major.

IIRC, the new attributes are supported in v6 with a deprecation for the old static properties, so we should be able to migrate that stuff by pinning to a specific v6 minimum.

We'll have to drop support for v5 I expect.

Xerkus commented 9 months ago

There are a lot of final classes. Adding to them won't be a BC. As long as no previously valid types were removed