{"action":"created","issue":{"url":"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider/issues/1","repository_url":"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider","labels_url":"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider/issues/1/comments","events_url":"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider/issues/1/events","html_url":"https://github.com/jdesrosiers/silex-json-schema-provider/issues/1","id":159881024,"number":1,"title":"Class not found error","user":{"login":"niabot","id":2789252,"avatar_url":"https://avatars.githubusercontent.com/u/2789252?v=3","gravatar_id":"","url":"https://api.github.com/users/niabot","html_url":"https://github.com/niabot","followers_url":"https://api.github.com/users/niabot/followers","following_url":"https://api.github.com/users/niabot/following{/other_user}","gists_url":"https://api.github.com/users/niabot/gists{/gist_id}","starred_url":"https://api.github.com/users/niabot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niabot/subscriptions","organizations_url":"https://api.github.com/users/niabot/orgs","repos_url":"https://api.github.com/users/niabot/repos","events_url":"https://api.github.com/users/niabot/events{/privacy}","received_events_url":"https://api.github.com/users/niabot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-13T06:27:54Z","updated_at":"2016-06-14T12:44:54Z","closed_at":"2016-06-14T12:44:54Z","body":"I just installed silex-json-schema-provider using composer and get the following error once i try to register the JsonSchemaServiceProvider with my silex application.\r\n```\r\n[Mon Jun 13 07:54:10.545816 2016] [:error] [pid 16200] [client 192.168.0.146:5761] PHP Fatal error:  Class 'JDesrosiers\\\\Silex\\\\Provider\\\\JsonSchemaServiceProvider' not found in /var/www/silex/asys/ShopApplication.php on line 92, referer: http://localhost:8383/ts-asysshop/dist/index.html\r\n[Mon Jun 13 07:54:10.545869 2016] [:error] [pid 16200] [client 192.168.0.146:5761] PHP Stack trace:, referer: http://localhost:8383/ts-asysshop/dist/index.html\r\n[Mon Jun 13 07:54:10.545892 2016] [:error] [pid 16200] [client 192.168.0.146:5761] PHP   1. {main}() /var/www/silex/web/index.php:0, referer: http://localhost:8383/ts-asysshop/dist/index.html\r\n[Mon Jun 13 07:54:10.545909 2016] [:error] [pid 16200] [client 192.168.0.146:5761] PHP   2. asys\\\\ShopApplication->__construct() /var/www/silex/web/index.php:8, referer: http://localhost:8383/ts-asysshop/dist/index.html\r\n[Mon Jun 13 07:54:10.545925 2016] [:error] [pid 16200] [client 192.168.0.146:5761] PHP   3. asys\\\\ShopApplication->initServices() /var/www/silex/asys/ShopApplication.php:37, referer: http://localhost:8383/ts-asysshop/dist/index.html\r\n```\r\nIt basically tells me that autoload from composer isn't able to locate the class, because of some error inside the configuration of the class loader. But I'm not sure what is causing the issue. All other installed classes load just fine, even Jsv4. To get it running - for now - i copied your files (DescribedBy.php, JsonSchemaServiceProvider.php, Jsv4Validator.php) into my project and gave them a different namespace. Now JsonSchemaServiceProvider is found and works as intended.\r\n\r\nShopApplication.php\r\n``` php\r\nuse Silex\\Application;\r\nuse JDesrosiers\\Silex\\Provider\\JsonSchemaServiceProvider;\r\n\r\nclass ShopApplication extends Application {\r\n    function __construct() {\r\n        $this->register(new JsonSchemaServiceProvider());\r\n    }\r\n    // ...\r\n}\r\n```\r\n\r\ncomposer.json\r\n```\r\n{\r\n    \"require\": {\r\n        \"silex/silex\": \"^2.0.0\",\r\n\t\t\"symfony/security\": \"^3.0.0\",\r\n        \"doctrine/dbal\": \"^2.5.0\",\r\n\t\t\"jdesrosiers/silex-json-schema-provider\": \"~1.0\"\r\n    }\r\n}\r\n```\r\n\r\nautoload_psr4.php\r\n``` php\r\n<?php\r\n\r\n// autoload_psr4.php @generated by Composer\r\n\r\n$vendorDir = dirname(dirname(__FILE__));\r\n$baseDir = dirname($vendorDir);\r\n\r\nreturn array(\r\n    'Symfony\\\\Polyfill\\\\Util\\\\' => array($vendorDir . '/symfony/polyfill-util'),\r\n    'Symfony\\\\Polyfill\\\\Php70\\\\' => array($vendorDir . '/symfony/polyfill-php70'),\r\n    'Symfony\\\\Polyfill\\\\Php56\\\\' => array($vendorDir . '/symfony/polyfill-php56'),\r\n    'Symfony\\\\Polyfill\\\\Mbstring\\\\' => array($vendorDir . '/symfony/polyfill-mbstring'),\r\n    'Symfony\\\\Component\\\\Security\\\\' => array($vendorDir . '/symfony/security'),\r\n    'Symfony\\\\Component\\\\Routing\\\\' => array($vendorDir . '/symfony/routing'),\r\n    'Symfony\\\\Component\\\\PropertyAccess\\\\' => array($vendorDir . '/symfony/property-access'),\r\n    'Symfony\\\\Component\\\\Inflector\\\\' => array($vendorDir . '/symfony/inflector'),\r\n    'Symfony\\\\Component\\\\HttpKernel\\\\' => array($vendorDir . '/symfony/http-kernel'),\r\n    'Symfony\\\\Component\\\\HttpFoundation\\\\' => array($vendorDir . '/symfony/http-foundation'),\r\n    'Symfony\\\\Component\\\\EventDispatcher\\\\' => array($vendorDir . '/symfony/event-dispatcher'),\r\n    'Symfony\\\\Component\\\\Debug\\\\' => array($vendorDir . '/symfony/debug'),\r\n    'Silex\\\\' => array($vendorDir . '/silex/silex/src/Silex'),\r\n    'JDesrosiers\\\\Silex\\\\Provider\\\\' => array($vendorDir . '/jdesrosiers/silex-json-schema-provider/src'),\r\n    'Doctrine\\\\Common\\\\Cache\\\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'),\r\n    'Doctrine\\\\Common\\\\' => array($vendorDir . '/doctrine/common/lib/Doctrine/Common'),\r\n);\r\n```\r\ninstalled.json (partially)\r\n``` json\r\n   {\r\n        \"name\": \"geraintluff/jsv4\",\r\n        \"version\": \"v1.0.1\",\r\n        \"version_normalized\": \"1.0.1.0\",\r\n        \"source\": {\r\n            \"type\": \"git\",\r\n            \"url\": \"https://github.com/geraintluff/jsv4-php.git\",\r\n            \"reference\": \"1d4306d39030aa288979d6822070777e4034722e\"\r\n        },\r\n        \"dist\": {\r\n            \"type\": \"zip\",\r\n            \"url\": \"https://api.github.com/repos/geraintluff/jsv4-php/zipball/1d4306d39030aa288979d6822070777e4034722e\",\r\n            \"reference\": \"1d4306d39030aa288979d6822070777e4034722e\",\r\n            \"shasum\": \"\"\r\n        },\r\n        \"time\": \"2014-10-07 13:36:26\",\r\n        \"type\": \"library\",\r\n        \"installation-source\": \"dist\",\r\n        \"autoload\": {\r\n            \"classmap\": [\r\n                \"jsv4.php\",\r\n                \"schema-store.php\"\r\n            ]\r\n        },\r\n        \"notification-url\": \"https://packagist.org/downloads/\",\r\n        \"license\": [\r\n            \"MIT\"\r\n        ],\r\n        \"authors\": [\r\n            {\r\n                \"name\": \"Geraint Luff\",\r\n                \"email\": \"luffgd@gmail.com\"\r\n            }\r\n        ],\r\n        \"description\": \"A (coercive) JSON Schema v4 Validator for PHP\",\r\n        \"keywords\": [\r\n            \"Geraint Luff\",\r\n            \"JSON Schema\",\r\n            \"geraintluff\",\r\n            \"json\",\r\n            \"schema\",\r\n            \"v4\",\r\n            \"validator\"\r\n        ]\r\n    },\r\n    {\r\n        \"name\": \"jdesrosiers/silex-json-schema-provider\",\r\n        \"version\": \"v1.0.0\",\r\n        \"version_normalized\": \"1.0.0.0\",\r\n        \"source\": {\r\n            \"type\": \"git\",\r\n            \"url\": \"https://github.com/jdesrosiers/silex-json-schema-provider.git\",\r\n            \"reference\": \"efe3144ab74f35a51465205c163f15c782261741\"\r\n        },\r\n        \"dist\": {\r\n            \"type\": \"zip\",\r\n            \"url\": \"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider/zipball/efe3144ab74f35a51465205c163f15c782261741\",\r\n            \"reference\": \"efe3144ab74f35a51465205c163f15c782261741\",\r\n            \"shasum\": \"\"\r\n        },\r\n        \"require\": {\r\n            \"geraintluff/jsv4\": \"~1.0\",\r\n            \"silex/silex\": \"~2.0\"\r\n        },\r\n        \"require-dev\": {\r\n            \"phpunit/phpunit\": \"~4.5\",\r\n            \"symfony/browser-kit\": \"~2.6\"\r\n        },\r\n        \"time\": \"2016-06-06 06:40:44\",\r\n        \"type\": \"library\",\r\n        \"installation-source\": \"dist\",\r\n        \"autoload\": {\r\n            \"psr-4\": {\r\n                \"JDesrosiers\\\\Silex\\\\Provider\\\\\": \"src/\"\r\n            }\r\n        },\r\n        \"notification-url\": \"https://packagist.org/downloads/\",\r\n        \"license\": [\r\n            \"MIT\"\r\n        ],\r\n        \"authors\": [\r\n            {\r\n                \"name\": \"Jason Desrosiers\",\r\n                \"email\": \"jdesrosi@gmail.com\"\r\n            }\r\n        ],\r\n        \"description\": \"A Silex service provider for working with JSON Schema\",\r\n        \"keywords\": [\r\n            \"JSON Hyper-Schema\",\r\n            \"JSON Schema\",\r\n            \"hyper-schema\",\r\n            \"json\",\r\n            \"json-schema\",\r\n            \"jsv4\",\r\n            \"silex\"\r\n        ]\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider/issues/comments/225869464","html_url":"https://github.com/jdesrosiers/silex-json-schema-provider/issues/1#issuecomment-225869464","issue_url":"https://api.github.com/repos/jdesrosiers/silex-json-schema-provider/issues/1","id":225869464,"user":{"login":"niabot","id":2789252,"avatar_url":"https://avatars.githubusercontent.com/u/2789252?v=3","gravatar_id":"","url":"https://api.github.com/users/niabot","html_url":"https://github.com/niabot","followers_url":"https://api.github.com/users/niabot/followers","following_url":"https://api.github.com/users/niabot/following{/other_user}","gists_url":"https://api.github.com/users/niabot/gists{/gist_id}","starred_url":"https://api.github.com/users/niabot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niabot/subscriptions","organizations_url":"https://api.github.com/users/niabot/orgs","repos_url":"https://api.github.com/users/niabot/repos","events_url":"https://api.github.com/users/niabot/events{/privacy}","received_events_url":"https://api.github.com/users/niabot/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T12:44:53Z","updated_at":"2016-06-14T12:44:53Z","body":"I wonder why, but after removing and reinstalling of all (!) dependencies it is now working as expected. Composer must have really done something wrong. My bad for the wrong report."}}
{"actor":{"display_login":"niabot"}}