Comments (8)
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.
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.
Imagine is the package name
from imagine.
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.
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.
@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.
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.
@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)
- Deprecation messages in symfony 5.4 HOT 13
- Split getSupportedFormats into getSupportedInputFormats and getSupportedOutputFormats HOT 2
- Release a PHP 8.1 version HOT 3
- Segmentation fault with GD on 1.3.1 HOT 24
- Support for CMYK ? HOT 11
- curl error: 1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version HOT 9
- Unable to open remote jpg image HOT 1
- Issue reading GDImage object using \Imagine\Gd\Imagine read() method HOT 3
- Is there an inverse to getGdResource() HOT 7
- Gd\Drawer -> ellipse
- Why does Point class reject negative values...? HOT 3
- Hello, is this image library still being updated? I want him to be a replacement for intervention, because intervention is no longer updated. HOT 1
- `getImageAlphaChannel` returns incorrect value HOT 3
- Incorrect formula to calculate the linnear position. HOT 1
- Update min required PHP version and fix deprecation warnings HOT 3
- Error when file is coming from temp directory: Creating an image in "C:\Users\...\Temp\phpA6B2.tmp" format is not supported, please use one of the following formats: HOT 7
- Feature request: Add support for "setOption('jpeg:size', '800x800');"
- vulnerable libraries (jQuery) HOT 4
- Memory limit not throw new RuntimeException
- Saving Lossless Webp? HOT 5
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 imagine.