Git Product home page Git Product logo

rokka-client-php-cli's People

Contributors

chregu avatar christianriesen avatar dbu avatar dependabot[bot] avatar jeanmonod avatar michellesanver avatar mms-uret avatar thepanz avatar tobion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rokka-client-php-cli's Issues

generate .phar on release

generate the .phar and upload it to the github releases.

replace composer config --unset platform.php with a config setting the php version to the lowest supported so that we generate the correct .phar.

also drop the composer.lock file from git at this point.

reuse commands in symfony

cli: #31

  • adjust service names in command.xml and restricted_commands.xml so that they are fit to be loaded in the symfony bundle (proper namespace prefix)
  • have optional constructor argument to specify a name prefix

bundle rokka-io/rokka-client-bundle#7

  • provide configuration class as service in symfony bundle
  • add the prefix argument when we load the services in the rokka bundle

configuration validation

the app bootstrap should check the configuration and if no credentials are set only allow the commands that make sense to be executed in that case. probably also have a command to interactively set up the configuration with known values.

it would be nice to have a command that verifies that the configuration works, connecting to the server and checking if it can see the default organization.

clone stack commands

move stack cloning operation to ApiHelper (and move that to the library?), then use that from the stack clone command. allow the command to specify a comma separated list of stacks to clone, or just --all to clone all stacks.

should we do the same with the image clone command?

use strict typing

  • bump minimum requirement to a more recent version of php
  • Method type declarations
  • Return type declaration

(also on the rokka-client-php library)

Installation

the README.md should have an Installation section right after the introduction. i guess its just download the .phar, but that should be said explicitly. also that its not meant to be included in your project but used stand alone, to avoid confusion.

unnecessary api calls

many commands check if the specified (or configured default) organization exists. some also check if the image exists. it would be a lot better if the api library would throw proper exceptions instead of just vomiting a guzzle exception at us. then we could stop first doing a call to the api and instead catch OrganizationNotFoundException / StackNotFoundException / ImageNotFoundException and display a nice message for those, while not hiding other problems (connection, credentials etc)

binary command not created into /bin as explain on the doc

In the readme, it says:

run bin/rokka-cli.php

But after a fresh install, there is not bin folder

vagrant@zebra:/vagrant$ mkdir rokka-cli && cd rokka-cli
vagrant@zebra:/vagrant/rokka-cli$ composer require rokka/client-cli
...
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/process ()
Writing lock file
Generating autoload files
vagrant@zebra:/vagrant/rokka-cli$ ll
total 36K
-rw-r--r-- 1 501 dialout  62 Nov 18 11:58 composer.json
-rw-r--r-- 1 501 dialout 28K Nov 18 11:58 composer.lock
drwxr-xr-x 9 501 dialout 306 Nov 18 11:58 vendor

Bug: Image upload does not correctly hash the message body

Hi

When uploading an image with the php cli, the message body's hash is not correctly included in the Api-Signature. In fact the body's hash is always sha1("").

Base.php getEncodedBodyData() seems to return ("") for multipart messages.

I was trying to implement a java client for the image upload functionality. Which never worked when I accidently found out I could upload any image using the same signature, wich was generated with sha1("") as the body hash.
This might be a system wide issue, as it seems to be implemented wrong on the client and the backend side.

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.