GithubHelp home page GithubHelp logo

Comments (4)

ChrisAlvares avatar ChrisAlvares commented on July 20, 2024

Another option is to have a file in your project (adwords_include.php), perhaps in a /lib directory with the correct code:

$path = dirname(__FILE__) . '/../../vendor/cmutter/google-adwords-api/src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

and then this to your autoload in the composer.json

"autoload": {
        "files":["app/lib/adwords_include.php"]
 }

from google-api-adwords-php.

ezk84 avatar ezk84 commented on July 20, 2024

That would require creating a new file and editing composer.json, which is at least double the effort :)

I would create a Pull Request but the change is so small I may as well post it here:

diff --git a/composer.json b/composer.json
index 48ee7b9..444e7a9 100644
--- a/composer.json
+++ b/composer.json
@@ -22,5 +22,6 @@
     },
     "autoload": {
         "classmap": ["src/Google/Api/Ads/AdWords/Lib"]
-    }
+    },
+    "include-path": ["src/"]
 }

After this composer will take care of adding the 'src/' directory to the include path itself instead of needing the user of the library to set this up themselves.

from google-api-adwords-php.

colinmutter avatar colinmutter commented on July 20, 2024

Thanks - that makes a lot more sense. Will test this and add it when I add the 4.2.2 release from Google in the next day or two.

from google-api-adwords-php.

colinmutter avatar colinmutter commented on July 20, 2024

Added in 4.4.0 release.

from google-api-adwords-php.

Related Issues (6)

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.