Athari / YaLinqo

Yet Another LINQ to Objects for PHP [Simplified BSD]
https://athari.github.io/YaLinqo
BSD 2-Clause "Simplified" License
439 stars 39 forks source link

how to add them to my project if I have no composer? #58

Closed NickLoveHub closed 2 years ago

NickLoveHub commented 2 years ago

Is there an easy way to introduce them? To be honest, it's little hard for a newman like me, what I want is just an php file, and it's solve everything

Athari commented 2 years ago

Nowadays almost everything is distributed through package managers, so you're making your life hard for no reason.

If you insist on choosing the path of pain and suffering, using YaLinqo without Composer and autoloader is as simple as copying the YaLinqo directory from GitHub (you can download a zip with source files) into your project directory and referencing the files you need using require_once 'YaLinqo/Enumerable.php' and the like. If you use it like this, importing namespace with use \YaLinqo\Enumerable is optional, but it'll allow you to use class names without full namespace prefixes. (Correct me if I'm wrong as I haven't used PHP for ages.)

I remind you, with Composer it'll be just one command line. Even if you're new to PHP and development in general, you should familiarize yourself with package managers as they're a crucial part of modern development. I think installing Composer should be more or less straightforward, so please don't be afraid of it. 😉