Git Product home page Git Product logo

garden-cli's Introduction

Vanilla Repo Logo

[![](https://img.shields.io/github/license/vanilla/vanilla.svg)](https://github.com/vanilla/vanilla/blob/master/LICENSE) [![CircleCI](https://circleci.com/gh/vanilla/vanilla/tree/master.svg?style=svg)](https://circleci.com/gh/vanilla/vanilla/tree/master)

Howdy, Stranger!

Vanilla was born out of the desire to create flexible, customizable, and downright entertaining community solutions. Vanilla has been used to power tens of thousands of community forums around the world and we couldn't be happier if you've decided to use Vanilla to grow yours.

Forum Rich Editor Dashboard
image image image

Every community is unique. Vanilla is a finely-crafted platform on which designers and developers can build a custom-tailored environment that meets your community's particular needs.

5 reasons Vanilla is the sweetest forum

  1. We've reimagined traditional forums for mass-appeal.
  2. Our theming flexibility is second-to-none.
  3. Impossibly good integration options with single sign-ons and embedding.
  4. The best tools available for community management.
  5. Curated features with great plugin options, not the kitchen sink.

Installation

The current version of Vanilla requires PHP 7.2+ and MySQL 5.7+. The following PHP extensions are also required: cURL, DOM, Fileinfo, GD, intl, JSON, libxml, PDO

Upgrading from an earlier version of Vanilla? See our upgrade notes.

Changes to Fulltext Indexing

Full-text index support has been disabled by default as of Vanilla 4. To enable full-text index support, add a FullTextIndexing key under the Database section of your site config and set its value to true. Failure to add this config value will result in full-text indexes being removed from Vanilla's database tables.

Contributing

Getting Help

Reporting Security Issues

Please disclose security issues responsibly by emailing [email protected] with a full description or join our bug bounty program. We cannot award bounties outside that program.

We'll work on releasing an updated version as quickly as possible. Please do not email non-security issues; use the issue tracker instead.

Building Releases

Vanilla releases are built using Phing to create a pre-built deploy-ready copies of Vanilla. To build these run the following in the root of the repository.

./bin/release

The following dependenies are all required for building a release.

  • node
  • yarn
  • php
  • composer

License & Legal Stuff

Vanilla is free, open source software distributed under the license gpl-2.0-only. We accept and encourage contributions from our community and sometimes give hugs in return.

Copyright © 2009-2022 Vanilla Forums Inc.

Vanilla Forums is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

Vanilla Forums is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Vanilla Forums.

If not, see http://www.gnu.org/licenses/. Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com

Bonk!

Just kidding, everything's awesome. dance

garden-cli's People

Contributors

charrondev avatar daazku avatar dpiquet avatar figdice avatar kaecyra avatar linc avatar olivierlamycanuel avatar smillerdev avatar tburry avatar yakatz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

garden-cli's Issues

Allow Format -o=value or --option=value

This is more of a feature request than an actual issue, but still:

Please add an option to allow the equals symol to be used as a seperator for option name and value.
Right now you have no seperator at all or space (and thus a new element in argv) as a separator.
Having the = like the getopt from php does would be very welcome here.

Thanks in advance.

Shortform of help doesn't work (on macos with zsh)

If I enter -? to get the help for a registered command as suggested, nothing happens.

$ php cli.php auth:token -? 
zsh: no matches found: -?

The long help with --help works like expected.

$ php cli.php auth:token --help
usage: cli.php auth:token [<options>]

Get token for credentials.

OPTIONS
  --help, -?   Display this help.
  --pass, -p   The Password.
  --user, -u   The Username.

It maybe has to do with macOS Monterey 12.6.5 (21G531) with zsh 5.8.1 (x86_64-apple-darwin21.0) installed.

PHP 8.1 Compatibility

Running garden-cli with PHP 8.1.5 gives me:

Deprecated: Return type of Garden\Cli\Schema\OptSchema::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:_pro\Target\target_web\vendor\vanilla\garden-cli\src\Schema\OptSchema.php on line 231

Deprecated: Return type of Garden\Cli\Args::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:_pro\Target\target_web\vendor\vanilla\garden-cli\src\Args.php on line 219

Deprecated: Return type of Garden\Cli\Args::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:_pro\Target\target_web\vendor\vanilla\garden-cli\src\Args.php on line 236

Deprecated: Return type of Garden\Cli\Args::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:_pro\Target\target_web\vendor\vanilla\garden-cli\src\Args.php on line 247

Deprecated: Return type of Garden\Cli\Args::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:_pro\Target\target_web\vendor\vanilla\garden-cli\src\Args.php on line 259

Deprecated: Return type of Garden\Cli\Args::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:_pro\Target\target_web\vendor\vanilla\garden-cli\src\Args.php on line 270

I can not push to new branch or create pull request. So... If okay, please help me doing these:
src\Schema\OptSchema.php
Line 231: Add return type: mixed
public function jsonSerialize() : mixed {

src\Args.php
Line 219: Add return type: mixed
public function jsonSerialize() : mixed {
Line 236: Add return type: bool
public function offsetExists($offset) : bool {
Line 247: Add return type: mixed
public function offsetGet($offset) : mixed {
Line 259: Add return type: void
public function offsetSet($offset, $value) : void {
Line 270: Add return type: void
public function offsetUnset($offset) : void {

Doing this will break compatibility with PHP below Version 7. But since the requirement for garden-cli is PHP 7 or above, then i think it's safe to do above changes.

multiple arguments

There is a way to make a parameter accept multiple arguments?
Example:
$cli->arg( 'SINGLE', ''...,' true ); $cli->arg( 'MULTIPLE', ''...,' true. true // multiple );
Usage:
$ mycopy source target1 target2 target3....

Setting an option value via array syntax is not permitted

Hi

Why is setting values not permitted? Is there any workaround? Like get a copy of parsed options?
I want to use a "--dry" flag that will automatically activate few other options via boolean flags, so the user doesn't have to type 3 switches but just to use one.

$command= new Commando\Command();

//some optionsare defined here

//--dry flag should enable --skip --run --show flags
if ($command['dry']) {
    $command['skip'] = true;
    $command['run'] = true;
    $command['show'] = true;
}

Fatal error: Uncaught Exception: Setting an option value via array syntax is not permitted in C:\......1
Stack trace:

Turn formatting on/off

I've been trying the library on windows and that doesn't support the bold or colored items you have in there by default. It would be great if there was a way to turn that off without having to fiddle with the libraries code.

is it possible that argument are not checked against required flag?

It seems to me that, while there is code to check for options being required and not being provided, the same thing does not happen for arguments.
I have an example with a cli command requiring 3 arguments and an optional fourth. If I don't provide any argument, the program doesn't stop. Am i doing something wrong?

LogFormatter improvements

The LogFormatter right now is hardcoded to php://output. I want to be able to specify another output stream or even multiple output destinations, some of which may not be a file stream (ex. database, syslog). The garden-cli won't be responsible for doing any of the work or wiring these up; it just needs to make useful classes available to libraries.

Any changes must be backwards compatible.

Print usage on demand

It would be nice if you could ask for the usage / help details programmatically (I.e public methods on the Cli class for: getUsage() or getHelp() / getHelp($command) )

Logger has no fluid interface

This does not work as documented:

$log = new TaskLogger();
$log->info('This is a message.')
    ->error('This is an error.') // outputs in red

The info() method has return type void in the trait. It only works like this:

$log = new TaskLogger();
$log->info('This is a message.');
$log->error('This is an error.');

Error "parseRaw expects an array"

I am trying to run https://github.com/bramus/mixed-content-scan. When I enter the command I get the following error message:

user:/home/www/user > files/swm2/composer/.composer/vendor/bin/mixed-content-scan https://example.com
Content-type: text/html; charset=UTF-8


Fatal error: Uncaught Exception: Garden\Cli\Cli::parseRaw expects an array in /files/swm2/composer/.composer/vendor/bramus/mixed-content-scan/vendor/vanilla/garden-cli/src/Cli.php:385
Stack trace:
#0 /files/swm2/composer/.composer/vendor/bramus/mixed-content-scan/vendor/vanilla/garden-cli/src/Cli.php(338): Garden\Cli\Cli->parseRaw(NULL)
#1 /files/swm2/composer/.composer/vendor/bramus/mixed-content-scan/bin/mixed-content-scan(40): Garden\Cli\Cli->parse(NULL, true)
#2 {main}
thrown in /files/swm2/composer/.composer/vendor/bramus/mixed-content-scan/vendor/vanilla/garden-cli/src/Cli.php on line 385

This error is thrown with both garden-cli version 1.6.3 and 2.0.
Using PHP 7.1.9 (cgi-fcgi).

How to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.