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

Add ability to install via composer #65

Closed
chrillep opened this issue Aug 22, 2023 · 6 comments
Closed

Add ability to install via composer #65

chrillep opened this issue Aug 22, 2023 · 6 comments

Comments

@chrillep
Copy link

No description provided.

@mklepaczewski
Copy link
Contributor

mklepaczewski commented Oct 20, 2023

This is currently possible by adding GitHub repository:

...
"repositories": [
    ...
    { "type": "vcs", "url": "https://github.com/crstauf/query-monitor-extend.git" }
    ...
]

and installing the package with dev stability:

composer require --dev crstauf/query-monitor-extend:@dev
# or, if you want specific commit
composer require --dev 'crstauf/query-monitor-extend:dev-master#5e11ab8af42b17c2e5a8fca656c421c8a2a6190e'

I don't know if it's possible to install the package using the version name. query-monitor-extend uses version/<version> tags, which aren't recognized by composer.

@crstauf If I'm not mistaken, switching to vX.Y.Z tag format would allow users to install a specific version as the tags are recognized by composer.

Note #75 is required for this to work.

@crstauf
Copy link
Owner

crstauf commented Oct 20, 2023

Thanks, @mklepaczewski! Added tags with vX.Y.Z to the existing version/X.Y.Z tags, and will use vX.Y.Z moving forward.

That should be it, correct?

@mklepaczewski
Copy link
Contributor

Yup, I just checked. It works:

mkdir test
cd test
composer init
composer config repositories.0 vcs "https://github.com/crstauf/query-monitor-extend.git"
composer require crstauf/query-monitor-extend:1.6.1
./composer.json has been updated
Running composer update crstauf/query-monitor-extend
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking crstauf/query-monitor-extend (v1.6.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
No security vulnerability advisories found

@crstauf
Copy link
Owner

crstauf commented Oct 22, 2023

Thanks!

@crstauf crstauf closed this as completed Oct 22, 2023
@chrillep
Copy link
Author

chrillep commented Jun 7, 2024

if you just log in to packigist you can add the package there.
https://packagist.org/packages/submit

So we dont have to add vcs. ( But ill create another ticket :) )

I dont want to add it as a vcs since it has to be done manually.

I can help with a pipeline but you need to do the initial setup.
This is DX comfort ❤️

to add a repo to composer.json you can run

composer config repositories.crstauf/query-monitor-extend vcs https://github.com/crstauf/query-monitor-extend.git

but you cant remove a repo with the composer config command :(

composer config --unset repositories.crstauf/query-monitor-extend

@chrillep
Copy link
Author

chrillep commented Jun 7, 2024

and btw your ok (it works with composer) with semver tagging with Or without 'v' prefix

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

No branches or pull requests

3 participants