Replies: 1 comment 1 reply
-
This may be a dumb question but are you using composer for the rest of you dependencies and do you have autoloading setup? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As the subject says, I'm getting an error when trying to create a new customer. The full error message is:
[13-May-2025 12:13:05 UTC] PHP Fatal error: Uncaught Error: Class "Netsuite\Classes\Customer" not found in /var/www/vhosts/apps.dchob.com/docs/ns_create_so.php:79 Stack trace: #0 {main} thrown in /var/www/vhosts/apps.dchob.com/docs/ns_create_so.php on line 79
Line 79 is:
$customer = new Customer();
Earlier in the script, I'm calling:
use Netsuite\Classes\Customer;
Just like I am for all the other namespaces (which are working fine). The class file is in the same directory as all the other namespaces I'm using:
[root@apps composer]# ls -al vendor/ryanwinchester/netsuite-php/src/Classes/Customer.php
-rw-r--r-- 1 apache www 16120 Jan 24 17:51 vendor/ryanwinchester/netsuite-php/src/Classes/Customer.php
I've double and triple checked spelling, path, case, basically anything I can think of, but can find no reason why the script is not finding the class.
The library is fully updated on the 2024.2 endpoint.
[jnichel@apps composer]$ composer update netsuite-php
Loading composer repositories with package information
Package "netsuite-php" listed for update is not locked.
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
No security vulnerability advisories found.
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions