6 Replies - 1294 Views - Last Post: 12 June 2018 - 04:01 PM

#1 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3810
  • View blog
  • Posts: 13,848
  • Joined: 08-August 08

PHP related question

Posted 09 June 2018 - 08:47 AM

Ok, this is more of a rant than a question, but here goes:

I loathe composer. It has one job: make installing packages easier. When it does that, great. The problem is that it frequently doesn't, and then you're stuck trying to debug composer instead of working on your own code.

Case in point:
composer create-project symfony/framework-standard-edition my_project "3.4.*"

Straight from the manual, but it doesn't work.
The install is missing the all important public directory, and searches on the internet always end up back at the manual!
:crazy:

It's gotten so bad that every time I need to use composer I find myself taking deep breaths as I try to prepare for the worst.

Is This A Good Question/Topic? 0
  • +

Replies To: PHP related question

#2 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3810
  • View blog
  • Posts: 13,848
  • Joined: 08-August 08

Re: PHP related question

Posted 09 June 2018 - 09:18 AM

I forgot to add the main error message. It's

Quote

No input file specified.
which is of course because it can't find an index.php file, since the installer didn't put one in the public directory that it didn't create.
Was This Post Helpful? 0
  • +
  • -

#3 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4223
  • View blog
  • Posts: 13,380
  • Joined: 08-June 10

Re: PHP related question

Posted 10 June 2018 - 11:15 PM

Well, that's not a composer problem there, as composer only runs the specified Symfony script.
Was This Post Helpful? 0
  • +
  • -

#4 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3810
  • View blog
  • Posts: 13,848
  • Joined: 08-August 08

Re: PHP related question

Posted 11 June 2018 - 04:03 PM

True, and I got my projects mixed up: Laravel has a public directory.

Still, I think the point remains. Composer tries to abstract away too much, so when things go wrong it's a major hassle to fix them.
Was This Post Helpful? 0
  • +
  • -

#5 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2235
  • View blog
  • Posts: 6,780
  • Joined: 15-January 14

Re: PHP related question

Posted 11 June 2018 - 04:12 PM

My personal favorites are the standalone projects with no dependencies that still ask you to use Composer to install.
Was This Post Helpful? 1
  • +
  • -

#6 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5357
  • View blog
  • Posts: 14,255
  • Joined: 18-April 07

Re: PHP related question

Posted 12 June 2018 - 11:05 AM

View PostCTphpnwb, on 11 June 2018 - 04:03 PM, said:

True, and I got my projects mixed up: Laravel has a public directory.

Still, I think the point remains. Composer tries to abstract away too much, so when things go wrong it's a major hassle to fix them.



Honestly I think you are describing a much larger problem that all of software development industry is getting into, and which I don't like, dependency hell. With this comes major hassles to fix all the problems related to packages that you didn't write and have no idea how it all works together.

Just an example is most web projects that use NPM (node package manager). You specify like 4 or 5 packages (but often as many as 13) and those bring in THOUSANDS more dependencies which they themselves bring in their own dependencies. It is nuts! It is like software is becoming these little collections of micro services and packages. Sure it helps with single responsibility and can allow devs to focus on one particular part of a project, but come on, the number of dependencies is crazy.

I recently received a WordPress theme framework from a vendor we are working with. A simple theme on the front end really but developed with your typical stack like scss, jquery, gulp etc. All managed through NPM. I run the typical npm install on what they have defined is about 10 package dependencies to setup the pipeline. I see massive amount of packages go whizzing by my screen. When all was said and done, hundreds if not thousands of node_modules. For a damn theme!

Then of course with that many packages you are bound to have notices of vulnerabilities and such. I saw 97 of them.

This problem is widespread with all major languages and projects going towards this "it's easy, just install a package" mentality. Truly bonkers.
Was This Post Helpful? 2
  • +
  • -

#7 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3810
  • View blog
  • Posts: 13,848
  • Joined: 08-August 08

Re: PHP related question

Posted 12 June 2018 - 04:01 PM

Agreed. I guess I think of composer as the source of that problem, but you're right about npm doing it too.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1