GithubHelp home page GithubHelp logo

Comments (8)

umpirsky avatar umpirsky commented on May 23, 2024

@MidnightDesign Thanks for the issue.

Actually there is. Similar package umpirsky/currency-list is used in moneyphp/money.

See https://github.com/moneyphp/money/blob/master/src%2FISOCurrencies.php#L31-L46.

from country-list.

MidnightDesign avatar MidnightDesign commented on May 23, 2024

Do you really think this is the way to go? It seems pretty fragile to me.

@Seldaek Can you give us your Composer-opinion on this?

from country-list.

Seldaek avatar Seldaek commented on May 23, 2024

This is safe as long as there are no batshit crazy custom installers in the game that relocate packages randomly. It's a similar pattern to what we do for binaries to find the autoloader really https://github.com/Seldaek/jsonlint/blob/master/bin/jsonlint#L20 and has the same constraint (no crazy custom installers).

from country-list.

MidnightDesign avatar MidnightDesign commented on May 23, 2024

Thanks for your opinion!

But isn't that a little different? In the case you mentioned, you're trying to initialize the autoloader itself. When autoloading is already wired up, I don't think that's the way to do it.

from country-list.

Seldaek avatar Seldaek commented on May 23, 2024

Well.. yeah you can for sure use a class to do the resolution, I am not saying your method is wrong, but IMO both are valid workable solutions. One uses a class as indirection which adds overhead while the other potentially does useless io/filesystem stats, but it's marginal either way I think.

from country-list.

umpirsky avatar umpirsky commented on May 23, 2024

Just wanted to add that it is not a primary use case to use this package with composer. Mainly because it is not limited to PHP at all.

from country-list.

MidnightDesign avatar MidnightDesign commented on May 23, 2024

Yeah, I got that. That's why I chose this title for the issue. :)

from country-list.

umpirsky avatar umpirsky commented on May 23, 2024

:)

from country-list.

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.