Installing Facebook-php-ads-sdk in cakephp 3 with composer

Okay, they're sorely missing Composer and Cakephp 3.0. I am trying to install https://github.com/facebook/facebook-php-ads-sdk

in my project, made all the changes to composer.json:

{
    "name": "cakephp/app",
    "description": "CakePHP skeleton app",
    "homepage": "http://cakephp.org",
    "type": "project",
    "license": "MIT",
    "require": {

        "php": ">=5.4.16",
        "cakephp/cakephp": "~3.0",
        "mobiledetect/mobiledetectlib": "2.*",
        "cakephp/migrations": "~1.0",
        "cakephp/plugin-installer": "*",
      "facebook/php-ads-sdk": "2.3.*"

    },
    "require-dev": {
        "psy/psysh": "@stable",
        "cakephp/debug_kit": "~3.0",
        "cakephp/bake": "~1.0"
    },
    "suggest": {
        "phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
        "cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
    },
    "autoload": {
        "psr-4": {
            "App\\": "src"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Test\\": "tests",
            "Cake\\Test\\": "./vendor/cakephp/cakephp/tests"
        }
    },
    "scripts": {
        "post-install-cmd": "App\\Console\\Installer::postInstall",
        "post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump"
    },
    "minimum-stability": "dev",
    "prefer-stable": true

}

      

RUNning the composer im unchanged and without installation.

What am I doing wrong?

+3


source to share


1 answer


Ok, the process is pretty simple and READ THE GUIDE

Step 1: Update your composer .json by adding:

       "facebook/php-ads-sdk": "2.3.*" 

      

inside "require".

Step 2: updating the linker

Step 3: go to vendor / facebook / php -ads-sdk and run: composer installation --no-dev



Step 4: update your composer .json by adding:

  "classmap": [
    "vendor/facebook/php-ads-sdk"
  ]

      

inside "startup: {}"

Step 5: running composer dump-autoload

PROFIT

+1


source







All Articles