taxamo / taxamo-php

Other
10 stars 7 forks source link

Taxamo\calculateTaxOut vs Taxamo\CalculateTaxOut #14

Open milos-ilic opened 8 years ago

milos-ilic commented 8 years ago

I have some issue with classNames:

Case mismatch between loaded and declared class names: Taxamo\calculateTaxOut vs Taxamo\CalculateTaxOut

  1. at DebugClassLoader ->loadClass ('Taxamo\calculateTaxOut')
  2. at spl_autoload_call ('Taxamo\calculateTaxOut') taxamo/taxamo-php/lib/Taxamo/Swagger.php at line 273
  3. at APIClient ::deserialize (object(stdClass), 'calculateTaxOut') taxamo/taxamo-php/lib/Taxamo.php at line 726

I have changed Swager.php. Added ucfirst() to resolve this issue for now.

`

    + $class = "Taxamo\\".ucfirst($class);

`

Taxamo version from composer:

    {
        "name": "taxamo/taxamo-php",
        "version": "2.0.4",
        "source": {
            "type": "git",
            "url": "https://github.com/taxamo/taxamo-php.git",
            "reference": "cae61da6e482609d3b193d62bccc2c8294dd127a"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/taxamo/taxamo-php/zipball/cae61da6e482609d3b193d62bccc2c8294dd127a",
            "reference": "cae61da6e482609d3b193d62bccc2c8294dd127a",
            "shasum": ""
        },
        "require": {
            "ext-curl": "*",
            "ext-json": "*",
            "ext-mbstring": "*",
            "php": ">=5.3"
        },
        "require-dev": {
            "simpletest/simpletest": "*"
        },
        "type": "library",
        "autoload": {
            "classmap": [
                "lib/Taxamo/"
            ],
            "files": [
                "lib/Taxamo.php"
            ]
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "Apache"
        ],
        "authors": [
            {
                "name": "Taxamo",
                "homepage": "https://github.com/taxamo/taxamo-php/contributors"
            }
        ],
        "description": "Taxamo PHP Library",
        "homepage": "http://www.taxamo.com/",
        "keywords": [
            "api",
            "tax",
            "taxamo",
            "vat"
        ],
        "time": "2016-05-16 15:07:20"
    },
milos-ilic commented 8 years ago

Additional notice:

I use Symfony2 MVC. And this happens only when I switched in dev mode.

tlipski commented 8 years ago

This is something that we have to investigate, especially if it occurs under specific conditions.