Uncaught Error: Class 'Contributte\Invoice\Data\Company' not found
igianni84 opened this issue · 12 comments
Hi, as you can see, I receive the error
Fatal error: Uncaught Error: Class 'Contributte\Invoice\Data\Company' not found in /Applications/MAMP/htdocs/Varie/ddt.php:3 Stack trace: #0 {main} thrown in /Applications/MAMP/htdocs/Varie/ddt.php on line 3
My file php is:
<?php
$company = new Contributte\Invoice\Data\Company('John Doe', 'Los Angeles', 'Cavetown', '720 55', 'USA', '0123456789', 'CZ0123456789');
You must include composer's autoloader
require __DIR__ . '/vendor/autoload.php';
$company = new Contributte\Invoice\Data\Company('John Doe', 'Los Angeles', 'Cavetown', '720 55', 'USA', '0123456789', 'CZ0123456789');
Please use dev-master version, v3 does not contain Contributte namespace
Sorry... I have do that... but I have the same problem :(
It's weird, did you try to update autoloader? (composer dumpautoload
)
Yes, but nada...
What is the output of composer info contributte/invoice
, please?
You haven't dev-master, 2 solutions:
First: install dev-master composer require contributte/invoice:dev-master
Second: use WebChemistry instead of Contributte e.g. Contributte\Invoice\Data\Company -> WebChemistry\Invoice\Data\Company
composer require nette/utils:^3.0 contributte/invoice:dev-master
Perfect! Very thanks :)