Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin/mezzio-tooling is incompatible with mezzio/mezzio-tooling v2 #146

Open
ostrolucky opened this issue Sep 10, 2022 · 7 comments
Open

bin/mezzio-tooling is incompatible with mezzio/mezzio-tooling v2 #146

ostrolucky opened this issue Sep 10, 2022 · 7 comments
Assignees
Labels
Bug Something isn't working Documentation Help Wanted

Comments

@ostrolucky
Copy link

Bug Report

Q A
Version(s) 3.11.0

Summary

mezzio-tooling installation fails on this line

exit(1);
. This is of course because there is no "php" section in https://github.com/mezzio/mezzio-tooling/blob/2.7.x/composer.json. Was this working at some point or how is this meant to work?

How to reproduce

➜  criticker-api git:(master) ✗ php vendor/mezzio/mezzio/bin/mezzio-tooling
Installing mezzio-tooling
Using version ^2.6 for mezzio/mezzio-tooling
./composer.json has been updated
Running composer update mezzio/mezzio-tooling
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
60 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found


Installed tooling package, but package does not contain script information?
Check your installation, and follow the migration documentation to use the tooling.
@ostrolucky ostrolucky added the Bug Something isn't working label Sep 10, 2022
@ostrolucky ostrolucky changed the title mezzio-tooling installation fails mezzio-tooling binary complains about missing script information Sep 10, 2022
@Ocramius Ocramius transferred this issue from mezzio/mezzio Sep 13, 2022
@Ocramius
Copy link
Member

@ostrolucky I moved this to mezzio/mezzio-tooling.

I don't have a clear overview of why this happens.

@settermjd you worked with this codebase last: could you perhaps help out in troubleshooting this?

@settermjd
Copy link
Contributor

@ostrolucky I moved this to mezzio/mezzio-tooling.

I don't have a clear overview of why this happens.

@settermjd you worked with this codebase last: could you perhaps help out in troubleshooting this?

Only just seeing this now, as I'm having the same issue.

@settermjd
Copy link
Contributor

settermjd commented Mar 9, 2023

I've been playing with it tonight and that error seems pointless, as nothing is actually installed from this point onward. Plus, setting a bin directory in the package's composer.json results in the script saying that it worked, yet the mezzio script is still missing. Continuing to look at this. Just wondering where the binary disappeared to.

@settermjd
Copy link
Contributor

settermjd commented Mar 9, 2023

Don't mind me. After some more experimenting, if you add the following to composer.json and run vendor/bin/mezzio-tooling, then the mezzio commands namespace is available when running vendor/bin/laminas. Not confusing, much.

"bin": [
    "bin/laminas"
]

settermjd referenced this issue in settermjd/mezzio-tooling Mar 9, 2023
Without this, when running vendor/bin/mezzio-tooling in projects that
use this package, the mezzio command namespace is missing when running
vendor/bin/laminas. As reported in #30, the following error is printed:

Installed tooling package, but package does not contain script information?
Check your installation, and follow the migration documentation to use the tooling.

After some experimentation, by adding this addition to the
configuration, the error isn't displayed and the namespace is once again
available.

Signed-off-by: Matthew Setter <matthew@matthewsetter.com>
@settermjd
Copy link
Contributor

@Ocramius, I don't know if mezzio/mezzio-tooling#41 is complete, but that changed worked for me locally. Thanks for reporting the issue, @ostrolucky.

@Xerkus
Copy link
Member

Xerkus commented Mar 9, 2023

bin/mezzio-tooling provided by mezzio/mezzio is aimed at 1.x release of mezzio/mezzio-tooling package.

mezzio/mezzio-tooling 2.0 switched to providing commands for laminas/laminas-cli via its vendor/bin/laminas

@Xerkus Xerkus transferred this issue from mezzio/mezzio-tooling Mar 9, 2023
@Xerkus Xerkus changed the title mezzio-tooling binary complains about missing script information bin/mezzio-tooling is incompatible with mezzio/mezzio-tooling v2 Mar 9, 2023
@Xerkus
Copy link
Member

Xerkus commented Mar 9, 2023

bin/mezzio-tooling should be updated with deprecation message saying it is targeting tooling v1. Or may be dropped altogether.

Docs needs to be updated to outline usage with laminas-cli https://docs.mezzio.dev/mezzio/v3/reference/cli-tooling/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Documentation Help Wanted
Projects
None yet
Development

No branches or pull requests

4 participants