Code Monkey home page Code Monkey logo

Comments (13)

danielpost avatar danielpost commented on July 19, 2024 1

@jav666 I can reproduce on my end. I'll do some research and see if I can fix it.

from ups-php.

jav666 avatar jav666 commented on July 19, 2024 1

yes. works. ok, thank you very much!

from ups-php.

danielpost avatar danielpost commented on July 19, 2024

Did you include the Composer autoloader at the top of your file? require_once 'vendor/autoload.php';

from ups-php.

jav666 avatar jav666 commented on July 19, 2024

2024-05-28 12 54 31

yep.

from ups-php.

jav666 avatar jav666 commented on July 19, 2024

PHP version is 8.2.12

from ups-php.

danielpost avatar danielpost commented on July 19, 2024

@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.

jav666 avatar jav666 commented on July 19, 2024

but there is no "autoload.php" under this path '/vendor/abantecart/ups-php/vendor/autoload.php' ... and no "vendor" dir to

from ups-php.

jav666 avatar jav666 commented on July 19, 2024

just copy & paste?

from ups-php.

jav666 avatar jav666 commented on July 19, 2024

no, that doesn't work

from ups-php.

danielpost avatar danielpost commented on July 19, 2024

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.

danielpost avatar danielpost commented on July 19, 2024

@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.

abolabo avatar abolabo commented on July 19, 2024

@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.

jav666 avatar jav666 commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.