Coder Social home page Coder Social logo

acquia-sdk-php's People

Contributors

aaronpacheco avatar bjeavons avatar cpliakas avatar daphneacquia avatar deviantintegral avatar eporama avatar ilyapokamestov avatar jacobbednarz avatar jakubsuchy avatar lahoosascoots avatar scrutinizer-auto-fixer avatar smatyas avatar webbj74 avatar webbj74-acquia avatar weitzman avatar zlender 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

Watchers

 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

acquia-sdk-php's Issues

Fix component download issue where entire SDK is returned

For some reason downloading a component via composer downloads the entire SDK. This is a similar symptom to what the Zend Framework was going through, might be something we can learn from that.

Working hypothesis is that every sub-component will require the PEAR repository.

Implement pluggable storage for the service manager

Guzzle's service builder stuff is awesome, however for applications like Drupal configs are likely to be stored elsewhere. Therefore we should provide a pluggable mechanism that reads and writes the service builder definition to alternate locations.

Validate that all variables are present when generating the DSN

Via @jfarrell: In the Database component, we should be a little more defensive than usual and check that the variables are set prior to generating the string. This will prevent malformed connection strings and will allow developers to catch errors on the off chance that the server returns malformed data.

Swap out getenv() calls for $_ENV

After setting up the Acquia SDK for our use our SSO, I have found a few errors popping up around calls to PHP's getenv() for the Acquia environment variables which end up not being available and they fall back to 'local' in most cases.

Consider the following:

$ drush php-eval "var_dump(getenv('AH_SITE_ENVIRONMENT'))"
bool(false)

$ drush php-eval "var_dump(\$_ENV['AH_SITE_ENVIRONMENT'])"
string(3) "dev"

Happy to provide you with the patch that we have rolled for our installation if you're happy to take this.

Only call Acquia\Common\Json::prettyPrint() when native options are not available

As a follow-up to https://github.com/cpliakas/acquia-sdk-php/pull/17, we should explore adding logic that only calls Acquia\Common\Json::prettyPrint() when the native options are not present. The method is smart enough not to pretty print JSON that is already formatted through the if (strpos($json, $newline)) { condition, however Acquia\Common\Json::encode() could be optimized to eliminate a method call when the native options are present.

This is more-or-less a micro-optimization.

Rethink the send*() methods in CloudApiClient

Currently we have send*() methods in CloudApiClient that wrap the request sending. We should explore removing these methods in favor of passing a request to the constructor of the response objects and having the response execute the request and get the format that it expects.

See the https://github.com/cpliakas/bigoven-php repository, specifically https://github.com/cpliakas/bigoven-php/blob/master/src/BigOven/Response/Response.php#L30 for an example.

Complete CloudApiClient

The CloudApiClient class is missing methods for the following API functions

  • List a site’s tasks. [See #11]
    • GET /sites/:site/tasks
  • Copy files from one site environment to another.
    • POST /sites/:site/files-copy/:source/:target
  • Deploy code from one site environment to another.
    • POST /sites/:site/code-deploy/:source/:target
  • Add a database.
    • POST /sites/:site/dbs
  • Copy a database from one site environment to another.
    • POST /sites/:site/dbs/:db/db-copy/:source/:target
  • Delete a database.
    • DELETE /sites/:site/dbs/:db
  • Move domain(s) from one site environment to another.
    • POST /sites/:site/domain-move/:source/:target
  • Deploy a specific VCS branch or tag to an environment.
    • POST /sites/:site/envs/:env/code-deploy
  • Delete a site environment database instance backup.
    • DELETE /sites/:site/envs/:env/dbs/:db/backups/:backup
  • Restore a site environment database instance backup.
    • POST /sites/:site/envs/:env/dbs/:db/backups/:backup/restore
  • Configure Live Development on an environment.
    • POST /sites/:site/envs/:env/livedev/:action
  • List an environment’s domains.
    • GET /sites/:site/envs/:env/domains
  • Get a domain record.
    • GET /sites/:site/envs/:env/domains/:domain
  • Delete a domain.
    • DELETE /sites/:site/envs/:env/domains/:domain
  • Add a domain name.
    • POST /sites/:site/envs/:env/domains/:domain
  • Purge the Varnish cache for a domain
    • DELETE /sites/:site/envs/:env/domains/:domain/cache

Evaluate replacement for the PEAR/Net_DNS2 package

Having to require PEAR as a repository kills the performance of Composer package updates, and we are only using a small subset of the functionality. We should evaluate whether rolling our own thing would be a better options or whether we should continue to build on the package to be lock-step with the Acquia Cloud codebase.

Implement a system that detects which property contains the collection

The Acquia\Rest\Collection class allows developers to set which property the collection is contained in. There are some API's that will use a different property for the collection but iterate over the same set of elements. In order to facilitate not having to create different classes, the SDK should have a system that allows you to define a list of possible elements that contain the collection.

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.