You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I fixed the problem in my code but this might help others out.
Maybe something for the manual.
Installed via composer - dvdoug/boxpacker 3.12.0
Example code produced this error
PHP Fatal error: Uncaught Error: Class "DVDoug\BoxPacker\Test\TestBox" not found
when using $packer->addBox( new DVDoug\BoxPacker\Test\TestBox(blah) )
The problem was i used these 4 USE commands from the manual, the first 2 cannot be used when autoloading.
But i still needed the last 2 for the TestBox class to be found.
use DVDoug\BoxPacker\Rotation; // Not required when autoloading
use DVDoug\BoxPacker\Packer; // Not required when autoloading
use DVDoug\BoxPacker\Test\TestBox; // use your own 'Box' implementation
use DVDoug\BoxPacker\Test\TestItem; // use your own 'Item' implementation
I also had to call the full namespace.
//$packer = new Packer();
$packer = new DVDoug\BoxPacker\Packer();
Great work btw, awesome utility!
Chris
The text was updated successfully, but these errors were encountered:
I fixed the problem in my code but this might help others out.
Maybe something for the manual.
Installed via composer - dvdoug/boxpacker 3.12.0
Example code produced this error
PHP Fatal error: Uncaught Error: Class "DVDoug\BoxPacker\Test\TestBox" not found
when using
$packer->addBox( new DVDoug\BoxPacker\Test\TestBox(blah) )
The problem was i used these 4 USE commands from the manual, the first 2 cannot be used when autoloading.
But i still needed the last 2 for the TestBox class to be found.
I also had to call the full namespace.
Great work btw, awesome utility!
Chris
The text was updated successfully, but these errors were encountered: