Git Product home page Git Product logo

Comments (8)

stof avatar stof commented on August 24, 2024

All classes are in the root namespace of the library which is Imagine. I don't see which place does not follow the PSR-0 standard here.

from imagine.

katanacrimson avatar katanacrimson commented on August 24, 2024

From what I read, he thinks that everything in Imagine\ should be in a specific package namespace?

If that's the case, _-1_. It seems ridiculous to me tbh; it would just be directory spam for the sake of having more subdirectories - something that java does that just makes it a mess to navigate a codebase with.
If you don't need another subdir, don't add one - adding unnecessary directory layers to cd through when coding is an inefficient programming practice.

Also, it'd break BC completely with everything using a previous version of the library.

from imagine.

stof avatar stof commented on August 24, 2024

Imagine is the package name

from imagine.

katanacrimson avatar katanacrimson commented on August 24, 2024

Package name and vendor name combined, right?

(That's what I think he's getting at - asking for something like Imagine\Imagine\everythingelsegoeshere, which again I find ridiculous)

from imagine.

avalanche123 avatar avalanche123 commented on August 24, 2024

I believe what is asked for is to split everything into packages like Imagine\Draw, Imagine\Image, etc. and ImageInterface and ImagineInterface in the top level violate that as they are not part of any package. I will rethink namespaces and packages, thanks

from imagine.

acleon avatar acleon commented on August 24, 2024

@stof, it's not PSR0 compatible as there's no vendor name, just the Imagine package name.

Thanks for your time @avalanche123 - I think the logical thing to do would be to add an "Avalanche" vendor name, like you have with your Symfony bundles. I don't mind doing the leg work on this if that's what you decide - I'm going to have to do it either way, even if it's just for my own fork.

from imagine.

Seldaek avatar Seldaek commented on August 24, 2024

Monolog, Twig, Assetic and I'd guess others follow the same scheme (LibName*). PSR0 defines \<Vendor Name>\(<Namespace>\)*<Class Name> which means \Vendor\ClassName is legit. The only thing is that the Vendor should be unique of course, but to me a library name (here Imagine) is unique enough, and constitutes a vendor.

Of course if your company is called Imagine too, you may have issues, but I'd give priority to opensource libraries since they are out in the wild, while adjusting your company's namespace for a given project should affect only you.

from imagine.

bobthecow avatar bobthecow commented on August 24, 2024

@Seldaek 👍

I feel like some projects should be released under the Avalanche vendor, but others are bigger than that and should be considered a 'vendor' of their own. Imagine is one of those projects, in my opinion.

But regardless of my opinion, @avalanche123 considered Imagine to be the vendor of this project, and he's the one who gets to decide who the vendor is :)

from imagine.

Related Issues (20)

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.