Comments (8)
hi! try to run the following command:
composer dumpautoload
from vin.
Still the same problem.
C:\xampp\php>php composer.phar require sunrise/vin
Using version ^1.1 for sunrise/vin
./composer.json has been updated
Running composer update sunrise/vin
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
C:\xampp\php>php composer.phar dumpautoload
Generating autoload files
Generated autoload files
C:\xampp\php>
Warning: The use statement with non-compound name 'InvalidArgumentException' has no effect in C:\xampp\htdocs\_test\test.php on line 2
Fatal error: Uncaught Error: Class "Sunrise\Vin\Vin" not found in C:\xampp\htdocs\_test\test.php:6 Stack trace: #0 {main} thrown in C:\xampp\htdocs\_test\test.php on line 6
from vin.
Please, show me all your code, the content of the index.php...
from vin.
<?php
use InvalidArgumentException;
use Sunrise\Vin\Vin;
try {
$vin = new Vin('WVWZZZ1KZ6W612305');
} catch (InvalidArgumentException $e) {
// It isn't a valid VIN...
}
$vin->getVin(); // returns "WVWZZZ1KZ6W612305"
$vin->getWmi(); // returns "WVW"
$vin->getVds(); // returns "ZZZ1KZ"
$vin->getVis(); // returns "6W612305"
$vin->getRegion(); // returns "Europe"
$vin->getCountry(); // returns "Germany"
$vin->getManufacturer(); // returns "Volkswagen"
$vin->getModelYear(); // returns [2006]
from vin.
you should add to the top of the index.php the following code:
require __DIR__ . '/vendor/autoload.php';
from vin.
Still didn't work but I found the vendor directory in php directory from xampp, so I copied it to htdocs folder and I added the line but I still get one more error:
Warning: The use statement with non-compound name 'InvalidArgumentException' has no effect in C:\xampp\htdocs\_test\test.php on line 4
from vin.
you don't use namespace
, because you may remove the following code:
use InvalidArgumentException;
from vin.
it's not problem of the package, it's PHP)
from vin.
Related Issues (13)
- The VinInterface should not describe the constructor
- The certificate is expired for API doc site HOT 3
- Parse and get model year HOT 1
- Problem about CI integration HOT 2
- Failed to create an object with valid VIN HOT 1
- Possibility to read out the vehicle model HOT 2
- Dependency Dashboard
- Fix Scrutinizer Coverage
- missing WMI HOT 3
- Missing WMI Tesla China Built
- Missing Volvo WMI
- Car Parts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vin.