contributte/invoice

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');

Schermata 2020-06-15 alle 16 37 35

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');

Yes, I have do that, but the problem is the same
Schermata 2020-06-15 alle 16 44 35

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?

Schermata 2020-06-15 alle 18 44 18

Please see the screenshot

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

Thanks, I receive this error

Schermata 2020-06-15 alle 19 28 09

composer require nette/utils:^3.0 contributte/invoice:dev-master

Perfect! Very thanks :)