Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Advantage of Installing in the Way You Recommend? #52

Closed
ChayimZaklad opened this issue Nov 13, 2014 · 6 comments
Closed

Advantage of Installing in the Way You Recommend? #52

ChayimZaklad opened this issue Nov 13, 2014 · 6 comments

Comments

@ChayimZaklad
Copy link

I've gotten your sample code to work without installing your library in your recommended fashion. I just included all the libary files, in required order, in my PHP code, and I commented out the require_once of bootstrap.php. This avoided dealing with shared server management to get them to install the way you recommend.

What advantages would I have if I get it installed the way you recommend instead? And, what disadvantages do I have doing it the way I have?

@floriandotpy
Copy link

If you haven't used composer before, check it out: https://getcomposer.org/

Composer helps you manage your dependencies during development and will create everything you need for autoloading the PHP classes (no need for explicit requires anymore).

When you're actually deploying your code to your server, you will already include the installed dependencies. So the "installation" as mentioned in the README is not actually meant for that part of the process.

Hope that answers your questions.

@neatville
Copy link

I get an error when I try to install it with composer. Both the composer.phar and the composer.json are in the same folder.
path:/var/www/html/apai-io$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package exeu/apai-io 1.0.0 could not be found.

Potential causes:

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

This is what my composer.json file looks like.

{
"name": "exeu/apai-io",
"type": "library",
"description": "Amazon Product Advertising PHP Library",
"keywords": ["Amazon", "ECS", "Product Advertising", "SOAP", "REST", "Products"],
"homepage": "https://github.com/Exeu/apai-io",
"license": "Apache-2.0",
"authors": [
{
"name": "Jan Eichhorn",
"email": "exeu65@googlemail.com",
"role": "Maintainer"
},
{
"name": "Dejan Spasic",
"email": "dejan.spasic@bitweise.biz",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/Exeu/apai-io/issues"
},
"minimum-stability": "dev",
"require": {
"php": ">=5.3.0",
"ext-curl": ""
},
"require-dev": {
"phpunit/phpunit": "4.3.
"
},
"autoload": {
"psr-0": { "ApaiIO": "lib/" }
},

"require": {
    "exeu/apai-io": "dev-master"
}

}

@dspasic
Copy link
Collaborator

dspasic commented Dec 21, 2014

I recommend to read and understand the excellent documentation on getcomposer.org.

Remove your current composer.json and execute:

/path/to/php composer.phar require "exeu/apai-io:1.*" 

@neatville
Copy link

My problem with composer has been fixed for a while now.

I see that there is a Config.dist.php file in the samples folder. Is that the only file that needs to be filled out to start running the examples, and using this library right away? (with the exception of the last line, I take it)

<?php
define('AWS_API_KEY', 'API KEY');
define('AWS_API_SECRET_KEY', 'SECRET KEY');
define('AWS_ASSOCIATE_TAG', 'ASSOCIATE TAG');
define('AWS_ANOTHER_ASSOCIATE_TAG', 'ANOTHER ASSOCIATE TAG');

@Exeu
Copy link
Owner

Exeu commented Dec 28, 2014

These are constants and should be used only in the examples.

@Exeu Exeu closed this as completed Dec 28, 2014
@Bhabatosh
Copy link

Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package exeu/apai-io 1.0.0 could not be found.
Problem 2
- Installation request for exeu/apai-io dev-master -> satisfiable by exeu/apai-io[dev-master].
- exeu/apai-io dev-master requires ext-curl * -> the requested PHP extension curl is missing from your system.

Potential causes:

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

my composer.json file content as follows:
{
"name": "exeu/apai-io",
"type": "library",
"description": "Amazon Product Advertising PHP Library",
"keywords": ["Amazon", "ECS", "Product Advertising", "SOAP", "REST", "Products"],
"homepage": "https://github.com/Exeu/apai-io",
"license": "Apache-2.0",
"authors": [
{
"name": "Jan Eichhorn",
"email": "exeu65@googlemail.com",
"role": "Maintainer"
},
{
"name": "Dejan Spasic",
"email": "dejan.spasic@bitweise.biz",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/Exeu/apai-io/issues"
},
"minimum-stability": "dev",
"require": {
"php": ">=5.3.0",
"ext-curl": "*"
},
"require": {
"exeu/apai-io": "dev-master"
},
"autoload": {
"psr-0": { "ApaiIO": "lib/" }
}
}

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

No branches or pull requests

6 participants