Nice FW but too many dependency
adrix71 opened this issue · 4 comments
I have finished studying the documentation and I repeat what I have already said; nice framework and done well and easy to use.
Unfortunately, 35 dependency (28 or 29 only for phpunit) are too many for me (i hate composer) and I'm not going to use Opulence.
If you can make a version without composer I'll be happy to use it otherwise I wish you good luck, you deserve it, but I'm looking for something else.
Why would having PHPUnit be a deal breaker for you? To be honest, this feels like a very strange thing to be against. This doesn't get in the way of you creating software, and Composer is the PHP standard. Also, what do you mean too many dependencies? Here's the framework's composer.json require
:
"require": {
"php": "^7.1",
"ext-openssl": "*",
"ext-mbstring": "*",
"jeremeamia/superclosure": "~2.2",
"psr/log": "~1.0"
}
Here is the skeleton project's require
:
"require": {
"php": "^7.1",
"monolog/monolog": "1.23.0",
"opulence/opulence": "1.1.*"
}
If you're looking for a full-stack framework that requires less than this, I don't think you'll find it. Frameworks are about making your life easier and preventing you from having to reinvent the wheel. If you're bothered by using Composer or by the fact that it requires (literally) several dependencies, I think you're getting way too caught up in the wrong things.
Also, just for comparison, here's Laravel's composer.json require
:
"require": {
"php": ">=7.0",
"ext-mbstring": "*",
"ext-openssl": "*",
"doctrine/inflector": "~1.1",
"erusev/parsedown": "~1.6",
"league/flysystem": "~1.0",
"monolog/monolog": "~1.12",
"mtdowling/cron-expression": "~1.0",
"nesbot/carbon": "~1.20",
"psr/container": "~1.0",
"psr/simple-cache": "^1.0",
"ramsey/uuid": "~3.0",
"swiftmailer/swiftmailer": "~6.0",
"symfony/console": "~3.3",
"symfony/debug": "~3.3",
"symfony/finder": "~3.3",
"symfony/http-foundation": "~3.3",
"symfony/http-kernel": "~3.3",
"symfony/process": "~3.3",
"symfony/routing": "~3.3",
"symfony/var-dumper": "~3.3",
"tijsverkoyen/css-to-inline-styles": "~2.2",
"vlucas/phpdotenv": "~2.2"
}
And here's Laravel's skeleton project's require
:
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0"
}
Excuse me, I did not want to accuse you. It is I who can not stand addictions in general. This is the reason why I am still looking for a framework that can go well and at this point I think I will never find it.
It is not so much a numerical question. I know perfectly well that there are frameworks that use many and many more dependencies on Opulence than the very fact that this dependency manager exists. It would have been better if they had not invented it.
I do not like for many reason. Eg:
-
I do not like that composer it was developed by Sympony developers not to provide a service to users but the maximum diffusion for sympony package.
-
I do not like how dependencies are managed by developers. (for example, the Superclosure that you only use in the RouterCollection file for the __sleep () and __wakeup () methods requires four different packages to work. More dependencies means more developers to rely on, hoping they will not be foolish and mentally impaired to develop acceptable versions of compatibility.
-
I do not like using a dependency manager to try to force developers to use standards (see all the psr block) that SHOULD BE PROVIDED BY THE LANGUAGE and not implemented with external package. Note please che PHP is a lunguage completely without standards. I find it nonsense to try to standarize it leave it to the sensitivity of the individual developer whether to implement this standard or not. If they are such important standards and if the interchangeability (whatever it means) is so important it should be provided by the same php engine along with many other things that are missing and will always be missing.
-
I do not like autoloading
And in general I do not like that to write code you have to resort to something done by others ... indeed you have to submit to a kind of imposition otherwise, automatically, a framework that does not use composer is considered not modern, not suitable , unprofessional ...
As if it were a dependency manager making the difference.
Again, I'm not meaning to be rude, but again your arguments are very strange to me. It sounds like you're paranoid of breaking changes, and therefore don't want to use other people's code. If that's the case why are you seeking out a framework at all? To address your bullet points:
- Who cares if Composer was built on top of Symfony? Symfony itself is abstracted from you when using Composer, and it drastically simplifies how you pull in dependencies. The days of PHP before Composer sucked. Pretty much every language out there uses dependency managers nowadays.
- I'm using packages that rely on semantic versioning. Yes, they could break semantic versioning, and that's a (very slight) risk you take with OSS. However, I argue that this is certainly not keeping you from being able to create successful products.
- I also agree that most PSRs are unnecessary and overarching. There is some utility in standardizing autoloading and code styles (even though I personally do not like PSR-2) simply because it simplifies contributing to OSS PHP projects.
- How could you be against autoloading? You'd honestly prefer a bunch of
require_once ...
calls at the top of each file instead of a single line in a composer.json config mapping namespaces to directories? How does this make your life any simpler?
I strongly urge you to reconsider your feelings on these topics. Ask yourself why pretty much every other developer out there (not just PHP) is using OSS with dependency managers. The answer is that it simplifies your life. The number of times you'll be burned by OSS is drastically outweighed by the amount of time it saves you from having to reinvent the wheel.