Comments (13)
@jav666 I can reproduce on my end. I'll do some research and see if I can fix it.
from ups-php.
yes. works. ok, thank you very much!
from ups-php.
Did you include the Composer autoloader at the top of your file? require_once 'vendor/autoload.php';
from ups-php.
yep.
from ups-php.
PHP version is 8.2.12
from ups-php.
@jav666 It seems like it can be fixed by adding this line:
require_once __DIR__ . '/vendor/abantecart/ups-php/vendor/autoload.php';
That being said, this seems like a bug that needs fixing—for some reason the classes do not get included in the normal autoloader. I suspect it has something to do with how composer-merge-plugin is implemented.
from ups-php.
but there is no "autoload.php" under this path '/vendor/abantecart/ups-php/vendor/autoload.php' ... and no "vendor" dir to
from ups-php.
just copy & paste?
from ups-php.
no, that doesn't work
from ups-php.
Hmm, there is for me. I did run composer update
inside the ups-php
folder, so it's possible the file didn't exist before that. Give it a try and see if that works.
from ups-php.
@abolabo If I may ask, what's the logic behind closing this as completed? It seems like there's some kind of bug in the autoloading logic, since you need to manually run composer update
inside the package and include the nested autoloader file if you want to use this package.
The examples in their current form are broken.
from ups-php.
@danielpost there is bug in the composer require command which does not work with wikimedia merge-plugin. As you noted correctly classes from directories are ignored by composer bin during build.
If you download package from repo and run build with composer install command you will see your code will work fine.
I don't know a solution for installation from packagist.org (command composer require ...)
Probably you can suggest?
from ups-php.
ok, I had a look under ‘closed’ ... apparently everyone had the problem, because it didn't work from start to finish
from ups-php.
Related Issues (19)
- More Examples? HOT 2
- PackageResults does not work as expected HOT 3
- Missing Tracking api after upgrade to v1.0.2 HOT 1
- Update Codebase by UPS Documentation HOT 2
- Fatal error: Uncaught Error: Class "UPS/* not found HOT 4
- Implement library for drupal commerce ups module HOT 1
- Installation Question HOT 12
- Uncaught Error: Class "OneOfRateResponseResponseAlert" not found HOT 8
- Installation Issue - Class "UPS\OAuthClientCredentials\Configuration" not found HOT 7
- Cannot use "parent" when current class scope has no parent Error HOT 1
- Error in OneOfLabelRecoveryResponseLabelResults HOT 1
- Error in OneOfShipmentResponseShipmentResultsPackageResults HOT 2
- installation via composer miss-configured HOT 1
- License? HOT 2
- Example not working HOT 1
- Which host to use in production HOT 1
- an example below?
- Rating seems broken, Successful API call returns all NULL values for all entities
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 ups-php.