Comments (4)
I think this is at least worth documenting along with the basics of how to make a command. Depends on your answer regarding the use case as to whether this is something we should explicitly enable / set up in the docker image. That would require installing composer on the image too.
from altis-local-server.
Thanks for the detailed reply, it was most definitely number 3 from the list, I simply wanted to test a wp-cli package on my local setup.
I'll test that by composer require
'ing it
from altis-local-server.
Are you happy for me to close this issue in favour of one like "Document installing & creating WP CLI packages" or similar? I think a guide probably makes sense for that.
If you feel like the wp package
command should be supported we can look into that but it's a bit tricky as we use the same php container for local server as we do on production.
We could at least intercept it and indicate it's unsupported thinking about it.
from altis-local-server.
#112 might help with this, however I think it depends on how you're intending to use the package, for instance:
- is it providing tooling you'll need on Vantage / sandbox server?
- is it providing tooling others working on the project need?
- is it just for your own purposes?
If the answer is 3 then supporting packages installed this way makes sense because they won't be supported or available in production. If the answer is 1 or 2 however then installing packages via WP CLI is the wrong approach.
Going from the commands cookbook here all command packages must autoload their main file.
The autoloading does introduce a potential issue, take this usergen package for instance. It doesn't check if the WP_CLI
class exists and will cause things like phpunit
or anything run from vendor/bin
to break. Good quality packages such this dotenv one however do check for this and are safe to install.
Provided the required package checks for the existence of WP_CLI
there's generally no need to explicitly install and load packages using WP CLI via the wp package
commands, the same packages can be required by composer directly using composer require aaemnnosttv/wp-cli-dotenv-command
for example. If the package is not safe to autoload the recommendation is to make a PR or raise an issue with the maintainer, or failing that to fork the package until the problem is resolved.
You can find most packages published to packagist here (some won't have the type
property set to wp-cli-package
as it's not a hard requirement). If the package only exists as a github repo or similar you'll have to add it to the repositories
section of your composer.json
as you would for any other unpublished package.
from altis-local-server.
Related Issues (20)
- docker compose should be docker-compose HOT 2
- Root certificate installation issues HOT 2
- composer server ssl install CLI does not install the root certificate if mckert is already installed HOT 1
- SSL Troubleshooting
- Warnings/error output when mkcert isn't installed on the system
- Update altis-local-server nginx image HOT 2
- `logs` command doesn't handle errors
- `composer server logs php` does not work
- Add support for PHP8.2 HOT 2
- Kibana throws 500 error on a new install HOT 5
- Bump nginx docker image to 3.5.2 HOT 1
- SSL cert should be removed now it is now longer used.
- Sometimes S3 Bucket doesn't get created
- PHP images version should be up to date with infrastructure version
- COMPOSE_PROJECT_NAME is set incorrectly in shell
- A fresh Altis installation consistently fails on first `server start` HOT 2
- A first proper start up of local server throws some ES errors
- WP-CLI cannot write to its own cache directory HOT 1
- MySQL 8.0 support
- Add favicon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from altis-local-server.